Answered step by step
Verified Expert Solution
Question
1 Approved Answer
verilog for 4 bit counter code and testbench 1. synchronous counter 2. design 4bit up counter with active-high enable signal 3. and with active-low asynchrnous
verilog for 4 bit counter code and testbench
1. synchronous counter
2. design 4bit up counter with active-high enable signal
3. and with active-low asynchrnous reset signal(when active-low reset='0' -> reset)
//verilog for 4 bit counter//
module count_4bit (clk, rst,dout); input clk, rst; output [3:0] dout; reg [3:0] dout; wire clk, rst; initial dout= 0; always @ (posedge clk) begin if (rst) dout<= 0; else begin if (dout!=4'b1111) dout<= dout+1; else dout<=0; end end endmodule
This is my code. Is it correct?pls help!!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started