Forum Discussion
Altera_Forum
Honored Contributor
15 years agovht test bench examples
Hello,
I am specifying altera to generate a .vht test bench for my vhdl project. I want to modify this test bench so that I can specify the input signals to be some value at different times instead of the current undefined (U). SIGNAL clk : STD_LOGIC; . . clk : IN STD_LOGIC; . . . clk => clk, . -- code that executes only once WAIT; END PROCESS init; always : PROCESS -- optional sensitivity list -- ( ) -- variable declarations BEGIN clk <='1'; wait for 10 ns; clk <='0'; wait for 10 ns; -- code executes for every event on sensitivity list --WAIT; I have been trying to find for hours some example modified test bench files that I can work off. The above code does not change the clock signal in the signal viewer in modelsim-altera at all. thank you12 Replies
- Altera_Forum
Honored Contributor
Sorry, the wait signal in my code is commented out. I copied your code exactly as you specified in the section the vht generated test bench says to put code you want to run indefinetly. However it is still not showing up on my signal viewer.
- Altera_Forum
Honored Contributor
--- Quote Start --- The above code does not change the clock signal in the signal viewer in modelsim-altera at all. --- Quote End --- Because you have told the process to wait (stop) after toggling the signal once. For a clock, what you want is
and the process will repeat in an infinite loop repeating these waits, and hence generate a clock. Cheers, Daveprocess begin clk <= '0'; wait for 10 ns; clk <= '1'; wait for 10 ns; end process;