What does this Verilog code do?

Joined
Nov 5, 2012
Messages
1
Reaction score
0
I'm sorry all I'm just needing help. I'm in an intro class and have no idea what this code is supposed to do but I need it for a project:

module timer(sig_1sec, clk);
input clk;
output sig_1sec;
reg sig_1sec;
reg [24:0] value;

//0x18023D8 in hex is equal to 25,175,000 in decimal
//for a faster clock 'h6008f6
//for an even faster clock 'h300000
parameter val_1sec='hc011ec;

always @ (posedge clk)
begin
if(value>val_1sec)
begin
sig_1sec<=~sig_1sec;
value<=25'b0;
end
else
value<=value + 1;
end
end module


Pretty sure I copied that perfectly can help ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top