4 Bit Synchronous Up Counter (Verilog) : Program
4 Bit Synchronous Up Counter (Verilog) : Program
Program:
module counter (C, SLOAD, Q);
input C, SLOAD;
output [3:0] Q;
always @(posedge C)
begin
if (SLOAD)
tmp = 4'b1010;
else
end
assign Q = tmp;
endmodule
input C, S;
output [3:0] Q;
always @(posedge C)
begin
if (S)
tmp = 4'b1111;
else
end
assign Q = tmp;
endmodule