Graphical Symbol of Four-bit binary counter with parallel load
Four-bit binary counter with parallel load
Functional Table of Four-bit binary counter with parallel load
fpga verilog code example
Verilog HDL of Four-bit binary counter with parallel load
module Bin-Counter-4bit-Par_Load (
output reg [3: 0] A-count, // Data output
output C-out, //Output any
input [3: 0] Data-in, // Data input
input Count, //Active high to count
Load, //Active high to load
CLK, // Positive-edge sensitive
Clear //Active low
);
assign C-out = Count & (~Load) & (A_count == 4'b111l);
always @ (posedge CLK, negedge Clear)
If (~Clear) A_count <= 4'b0000;
else If (Load) A_count <= data-in;
else If (Count) A_count <= A_count + l'bl;
else A_count <= A_count; //redundant statement
endmodule
No comments:
Post a Comment