cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aripod
Explorer
Explorer
585 Views
Registered: ‎04-18-2017

Generic parameter not changing in simulation

Jump to solution

Hello,

I have some generic parameters defined in my entity

entity WIZ820_interface is
    generic(                        
            DIV_1 : integer := 250; 
            DIV_2 : integer := 125;--<-DEBUGING125000; 
            CLK_SPI : integer := 125 
       );  
    Port ( clk : in STD_LOGIC;

The first time I ran the simulation, DIV_2 was 125000. Then, I changed the .vhd file to 125 like shown in the snipper, but when I reset the simulation, DIV_2 is still 125000 and not 125 as I want. Is there something to change, besides in the .vhd code?

Thanks for the help.

0 Kudos
1 Solution

Accepted Solutions
amaccre
Moderator
Moderator
535 Views
Registered: ‎04-24-2013

Hi @aripod ,

 

If the above suggestions do not work for you, try deleting the .sim directory from your project.

It will be recreated automatically when you run simulation again.

Best Regards
Aidan

------------------------------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if this answered your question
Give Kudos to a post which you think is helpful and may help other users
------------------------------------------------------------------------------------------------------------------

View solution in original post

4 Replies
shameera
Moderator
Moderator
582 Views
Registered: ‎05-31-2017

Hi @aripod ,

Can you once try by disabling incremental Compilation from Vivado Settings --> SImulation -->Advance --> uncheck "Enable Incremental Compilation" and see if it helps ?

0 Kudos
dpaul24
Scholar
Scholar
569 Views
Registered: ‎08-07-2014

@aripod,

Also try out Vivado Settings --> SImulation --> Reset Behavioral Simulation

------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem

0 Kudos
amaccre
Moderator
Moderator
536 Views
Registered: ‎04-24-2013

Hi @aripod ,

 

If the above suggestions do not work for you, try deleting the .sim directory from your project.

It will be recreated automatically when you run simulation again.

Best Regards
Aidan

------------------------------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if this answered your question
Give Kudos to a post which you think is helpful and may help other users
------------------------------------------------------------------------------------------------------------------

View solution in original post

ronnywebers
Advisor
Advisor
526 Views
Registered: ‎10-10-2014

This is a kind of old, annoying bug in Vivado, where a change in a constant or generic does not retrigger a regeneration of the simulation files. 

Indeed as @amaccre suggest, you'll can first try to 'end' the simulation, and then relaunch it. 

If that didn't work, (I know for sure that in Vivado 2017.2 this often was not sufficient), you'll needed to manually delete the simulation files (delete the entire .sim folder), so Vivado is forced to generate them again.

I recently tried the same in 2018.2 and there it seems to be fixed, though I should double-check that again.

What version are you working with?

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos