I've been trying to learn how to program a FPGA using verilog for awhile. However, I seem to be having trouble with simple delays and forcing values internally. For example, when I try to simulate the following in Quartus:
Quote:
module top(clk);
output clk; reg clk;
initial begin clk = 0; end
always begin #15 clk=1; #15 clk=0; end
endmodule
the clk signal never changes values (staying at 0). I would appreciate any help.
Joined: Sun 09-12-2004 8:22PM Posts: 657 Location: somewhere
Source: Fidelity
Not sure, but try this:
Code:
always begin #15; clk=1; #15; clk=0; end
As the time delays are statements, them being on the same line as you changing clk's value, there may have been a problem there. Also, if this loops through, the only thing I see that's output comes after clk has been changed from 1 back to 0.
And as I've never seen or heard of this language before tonight, theres a pretty good chance that this is all completely off and wrong.
_________________ if you woke up as me everyday, you'd hate yourself too.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum