cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
389 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
Highlighted
Moderator
Moderator
339 Views
Registered: ‎04-24-2013

Re: Generic parameter not changing in simulation

Jump to solution

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
Highlighted
Moderator
Moderator
386 Views
Registered: ‎05-31-2017

Re: Generic parameter not changing in simulation

Jump to solution

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
Highlighted
Scholar
Scholar
373 Views
Registered: ‎08-07-2014

Re: Generic parameter not changing in simulation

Jump to solution

@aripod,

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

--------------------------------------------------------------------------------------------------------
FPGA enthusiast!
All PMs will be ignored
--------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Moderator
Moderator
340 Views
Registered: ‎04-24-2013

Re: Generic parameter not changing in simulation

Jump to solution

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

Highlighted
Advisor
Advisor
330 Views
Registered: ‎10-10-2014

Re: Generic parameter not changing in simulation

Jump to solution

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