Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

verilog code for 16 bit counter

Status
Not open for further replies.

amarj

Newbie level 4
Joined
Apr 27, 2011
Messages
5
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,312
i need verilog code for 16 bit synchronous counter with synchronous hold..pls help me out..
 

is it with synchronous reset?
 

is it with synchronous reset?
ya...with synchronous reset and synchronous hold..

---------- Post added at 09:13 ---------- Previous post was at 08:48 ----------

module(clk,hold,reset,q);
input clk,hold,reset;
output [15:0]q;
reg [15:0]q;
initial q=15'b0000000000000000;
always @(posedge clk)
begin
if (reset)
q=15'b0000000000000000;
else if (hold)
q=q;
else
q=q+1;
end
endmodule

im getting the simulation correct but i need get output on fpga . Every time i apply a monopulse count its jumping from 0 to 129.. wats the prob???
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top