Advertisement
Maco153

BinaryCounter4bit

Apr 20th, 2020
1,090
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // file: BinCounterfour.v
  2. // author: @maco
  3.  
  4. `timescale 1ns/1ns
  5.  
  6. module bin_counter_4bits(input clk, reset, output reg [3:0]count);
  7.  
  8. always @(posedge clk, posedge reset) begin  
  9. if (reset == 1)  
  10. count <= 4'd0;  
  11. else    count <= count + 1;
  12. end
  13.  
  14. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement