Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > What does this Verilog code do?

Reply
Thread Tools

What does this Verilog code do?

 
 
mp_91 mp_91 is offline
Junior Member
Join Date: Nov 2012
Posts: 1
 
      11-05-2012
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 ?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Verilog Code to VHDL Code pplnet VHDL 0 12-09-2009 04:18 PM
Does VHDL have a statement similar to "event" in Verilog? news reader VHDL 2 07-03-2007 09:07 AM
VHDL/Verilog code for DMA Controller lovely VHDL 1 04-12-2004 04:30 PM
Re: How to convert VHDL/ verilog code to layout? Poly Diffusion VHDL 2 02-09-2004 05:00 PM
where to find DCT/IDCT for JPEG/JPEG2000 VHDL/VERILOG source code? walala VHDL 0 08-01-2003 09:44 PM



Advertisments