Home Forums Gamescan Chat42 About
* Login   * Register * FAQ    * Search
It is currently Sat 06-21-2025 2:40PM

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Verilog help
PostPosted: Tue 03-31-2009 5:43PM 
Offline
Sergeant

Joined: Sun 08-28-2005 1:24PM
Posts: 41

Source: Fidelity
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.


Top
 Profile E-mail  
    
 Post subject: Re: Verilog help
PostPosted: Tue 03-31-2009 9:00PM 
Offline
Colonel
User avatar

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.


Top
 Profile E-mail  
    
 Post subject: Re: Verilog help
PostPosted: Wed 04-01-2009 4:46PM 
Offline
Sergeant

Joined: Sun 08-28-2005 1:24PM
Posts: 41

Source: Fidelity
Figured it out....Quartus actually only supports a subset of the Verilog language and timing delays is one of the features that isn't supported.


Top
 Profile E-mail  
    
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group