FPGAwarrior
Newbie level 5
I have VHDL code with about 20 processes. One process, I call Main_Loop has a variable I called gate. If certain conditions are met, the value of gate changes. Most processes are triggered by a gate value. I need a testbench that will allow me to jump to a certain process. For example.
This tb process changes gate to 30. However, after the process is "turned on" by 30. My code then changes gate to 31. Now when I run Modelsim, my code never changes to 31 due to the tb.
I could change the above "wait" to wait for 10ns and write another tb process like:
or just use...
How does one un-define an integer like my gate value or is there another/better way?
[moderator action: added CODE tags]
Code:
process -- testbench code
begin
if gate = 2 then
gate <= to_unsigned(30, 6);
wait;
end if;
end process;
This tb process changes gate to 30. However, after the process is "turned on" by 30. My code then changes gate to 31. Now when I run Modelsim, my code never changes to 31 due to the tb.
I could change the above "wait" to wait for 10ns and write another tb process like:
Code:
process -- tb code
if gate = 30 then
gate <= "release state";
wait;
end if;
end process;
or just use...
Code:
gate <= "release state";
How does one un-define an integer like my gate value or is there another/better way?
[moderator action: added CODE tags]
Last edited by a moderator: