Results 1 to 9 of 9

Thread: VHDL compiler

  1. #1
    Join Date
    Sep 2011
    Posts
    57
    Rep Power
    1

    Default VHDL compiler

    Hi ,

    Is there a VHDL compiler that will compile the code and translate it into a schematic with primitive components . I have used Quartus and Xilinx their compliers synthesize away some parts of the code and also they use their mega cores .

    I just need to see what my VHDL code translates to , irrespective of what FPGA i am targeting.

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Texas Y'all
    Posts
    2,128
    Rep Power
    1

    Default Re: VHDL compiler

    Megawizard IP cores are only present if you instanatiate them. The synthesis tools don't magically inject megawizards, instead they map your HDL to FPGA primatives like multipliers, RAMs, LUTs, etc... The synthesized results are different since they are different technologies and a different set of primatives.

    So what are you trying to do since I'm scratching my head wondering why someone would want to do this?

  3. #3
    Join Date
    Sep 2011
    Posts
    57
    Rep Power
    1

    Default Re: VHDL compiler

    When i compiled this vhdl file , quartus showed these figures one is RTL and other is Post Map . I understand the compiler used LUT in Post Map in order to make it faster and also it doesnt consume any FF. The code was for a simple up counter , what i wanted to see at least at RTL level was the Counter Schematic .

    See files attached .
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2004
    Location
    Texas Y'all
    Posts
    2,128
    Rep Power
    1

    Default Re: VHDL compiler

    To be clear really the only schematic is that last screenshot you attached. The other two are really just representations of the logic. The LUT is not an optimization, it *is* the implemation of your combinational logic since FPGAs do not have primitives like AND, OR, and NOT gates. instead lookup tables are used where the inputs of your logic wire up to the LUT address line, and the LUT itself is populated with all the possible combinations of outputs. This is not specific to Altera FPGAs, this is how FPGAs work in general. If you look at the device handbook and study the LE or ALUT structure this will probably make more sense.

  5. #5
    Join Date
    Oct 2008
    Posts
    3,553
    Rep Power
    1

    Default Re: VHDL compiler

    I think Bad Omen has covered your question, but Id like to point out several problems with your code:

    1. You should no use std_logic_arith and numeric_std in the same bit of code. They conflict. You should use the standard numeric_std rather than the non-standard std_logic_arith.

    2. cont is missing from the process sensitivity list. THis is going to create a missmatch between simulation and reality (as the synthesisor ignores the sensitivity list). Also, you cannot write the code the way you have because you are asking it to count infinitly quickly if KEY(1) = '0'. You need a clock in your circuit for a counter.

    3. The LEDG assignment should be outside the process.

  6. #6
    Join Date
    Sep 2011
    Posts
    57
    Rep Power
    1

    Default Re: VHDL compiler

    Badomen you are right , i think i didnt use the right word, the compiler didnt optimize it, it just implements the combintorial logic' truth table into a LUT . This bring me back to my original question i want to see the combintorial logic , i need a compiler that shows me that instead of LUT's .

    The Schematic "Counter_Schenatic" is made by me manually .

    Tricky the answer to your reply is , i connected it to KEY(1) to test it on board , yes i should have used clock and divide by 50 to see the LEDS blinking . This was just a test to see DE2-115 works .

    Regards ,
    Last edited by FPGA_guru011; December 15th, 2011 at 06:59 AM.

  7. #7
    Join Date
    Aug 2004
    Location
    Texas Y'all
    Posts
    2,128
    Rep Power
    1

    Default Re: VHDL compiler

    I don't know of any tools that can take HDL and turn it into a schematic. Quartus II can perform the opposite conversion though. The RTL viewer view is the closest you'll get to this but like I mentioned before it's just showing you the functional equivalent of how it is actually implemented in the device.

    Sometimes I perform HDL to schematic conversions to get a better understanding of the functionality but I do this manually with the assumption that it's just a functional equivalent and it is not really how it would be implemented in any real device (FPGA or ASIC). If this wasn't the case then we wouldn't need synthesis tools and chips would take forever to design as a result. After I complete that then I normally switch back to my usual "how many LUTs wide and deep would this logic be?" mode since I typically optimize my HDL knowing it's going into an FPGA.

  8. #8
    Join Date
    Dec 2007
    Location
    Bochum Germany
    Posts
    5,792
    Rep Power
    1

    Default Re: VHDL compiler

    I understand the compiler used LUT in Post Map in order to make it faster and also it doesnt consume any FF. The code was for a simple up counter , what i wanted to see at least at RTL level was the Counter Schematic.
    Tricky the answer to your reply is , i connected it to KEY(1) to test it on board , yes i should have used clock and divide by 50 to see the LEDS blinking . This was just a test to see DE2-115 works .
    But it doesn't work, at least not count regularly. A combinational counter description can't be synthesized to any meaningful FPGA logic. That's why you see only gates (LUT) instead of FFs.

    In my opinion, both Quartus RTL and gate level schematics are more or less readable. I'm inspecting it frequently to reveal possible design errors. In the present case, the RTL schematic has all necessary information to see, that the design doesn't work as a counter. With some VHDL experience, you see it from the VHDL text as well.

  9. #9
    Join Date
    Sep 2011
    Posts
    57
    Rep Power
    1

    Default Re: VHDL compiler

    But it doesn't work, at least not count regularly.
    what do you mean the code or the design ??

    A combinational counter description can't be synthesized to any meaningful FPGA logic. That's why you see only gates (LUT) instead of FFs.

    Well the compiler just looks at the truth table and for all the possible logic inputs synchronized with rising edge , connects the gates in the LE so that LUT can output that specific reponse. Just like in Karnapgh mapping .

    but when i complied the schematic i got the same RTL as the shematic .
    Also i wanted to edit my 4-bit counter to count down , guess what in altera components all types of FF have only "Q" output , they are without "/Q" output .
    Attached Images Attached Images

Similar Threads

  1. FIR compiler II vs FIR Compiler I
    By SlowClock in forum IP Discussion
    Replies: 0
    Last Post: May 17th, 2011, 10:42 AM
  2. VHDL compiler existing
    By rizwan in forum Quartus II and EDA Tools Discussion
    Replies: 2
    Last Post: February 2nd, 2011, 07:41 AM
  3. Replies: 15
    Last Post: June 14th, 2010, 12:51 PM
  4. Quartus VHDL compiler returns error 10818
    By Luckiest in forum Quartus II and EDA Tools Discussion
    Replies: 4
    Last Post: July 5th, 2007, 03:58 AM
  5. compiler?
    By clansdown in forum Linux Forum
    Replies: 0
    Last Post: April 4th, 2005, 06:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •