Altera_Forum
Honored Contributor
15 years agoSimulation
My testbench couldn't generate clock wave.
The code is : //-------------------------- always //@ (SYS_RST, SYS_CLK) // optional sensitivity list // @(event1 or event2 or .... eventn) begin // code executes for every event on sensitivity list // insert code here --> begin if (SYS_RST == 1) begin SYS_CLK = 0; end else begin# (SYS_CLK_PERIOD/2) SYS_CLK = ~ SYS_CLK; end @eachvec; // --> end end //---------------------------------- Following is the snapshot of the waveform and there must be something wrong with always block. Hope someone can point it out. https://www.alteraforum.com/forum/attachment.php?attachmentid=3816