Multiple VHDL source files simulation with Active-HDL - Page 1
Forum section: electronics / general

author: mn
author_rank: Contributor
timestamp: March 24, 2017, 07:14:01 am
content: I am using Active-HDL to write VHDL codes. I am able to write ans simulate one file codes but when it comes to multiple source files and components, the simulation doesn't work! It seems that there is a problem finding components in other source files. Please see the attached picture.As you can see in the left pane, the test bench is selected as the top level. Any idea for that? the code is pretty simple and should work!

author: ale500
author_rank: Frequent Contributor
timestamp: March 24, 2017, 08:39:38 am
content: And you did add the file to the project, didn't you ?

author: mn
author_rank: Contributor
timestamp: March 24, 2017, 08:42:28 am
content: Yes. The workspace browser confirms that. Also, the compile all command actually compiles with the order. Please see the attachment.

author: rstofer
author_rank: Super Contributor
timestamp: March 24, 2017, 04:29:32 pm
content: When you want to instantiate a separately compiled entity, you need to prefix the entity name with 'work.' as inInst_DMA : entity work.DMA PORT MAP (...);Instantiation from one of my projects...

author: mn
author_rank: Contributor
timestamp: March 24, 2017, 04:48:46 pm
content: Sorry, but got the same result! Please see the picture and source files. Thing is that ISE will run the simulation correctly. I don't know what is wrong with Active-HDL.I have stuck at this problem. Any idea is welcomed.

author: rstofer
author_rank: Super Contributor
timestamp: March 24, 2017, 05:56:00 pm
content: In your entity fa, remove the component ha and let the work.ha do the work.I know absolutely NOTHING about ActiveHDL, I am taking my clues from an ISE project with over 20 externally compiled entities. I have no idea what ActiveHDL expects.

author: mn
author_rank: Contributor
timestamp: March 24, 2017, 06:52:00 pm
content: Same result... I am getting disappointed with Active-HDL. I also tried a simple NOT gate (one entity for the not and the other for port map) but the output doesn't change...

author: deebee
author_rank: Newbie
timestamp: March 24, 2017, 06:58:14 pm
content: I tried your design and it works fine for me in activehdl, I changed the instantiations back to component rather than entity, i.e.u1: fa port map( i1, i2, ci, s, co );instead ofu1: entity work.fa port map( i1, i2, ci, s, co );You have a component declaration so you don't need the second one, the second one is if you remove the component declarationSo there is nothing really wrong with your code. Not sure what else?

author: mn
author_rank: Contributor
timestamp: March 24, 2017, 07:57:19 pm
content: Can you zip the workspace? Thanks in advance

author: rstofer
author_rank: Super Contributor
timestamp: March 24, 2017, 08:37:19 pm
content: Declaring a component within an upper level architecture brings along a maintenance headache. If the component changes, the changes need to be reflected twice in the upper level. Once where the component is declared and again where it is instantiated.It's simply a matter of style and, for the moment, I prefer work.xxx. I could probably be talked out of it...

author: deebee
author_rank: Newbie
timestamp: March 24, 2017, 09:29:25 pm
content: Zip of my workspace added, this was created with version 10.3 that comes with lattice diamond. Your screenshot seems to show version 10.1 so I don't know if it will load in directly.As for declaring a component, most of the companies I have worked with do it this way, sometimes just because it is a long time standard practice (very important in the conservative ASIC world, we don't like to change what works, screwing things up gets very expensive), but I think more importantly is that instantiating with the entity syntax doesn't work well when using vhdl configurations. Configurations are often used on larger ASIC projects. For your own personal projects then whatever gets it done is fine really. Anyway VHDL is somewhat verbose and long winded at times so you just get used to the extra typing

author: mn
author_rank: Contributor
timestamp: March 25, 2017, 11:59:29 am
content: It seems that there is a problem with the version 10.1 that I have.Dear Deebee, please check your private messages.