Reformat Counter
This commit is contained in:
@ -11,7 +11,7 @@ module Counter
|
|||||||
|
|
||||||
var logic[WIDTH-1:0] countervalue;
|
var logic[WIDTH-1:0] countervalue;
|
||||||
|
|
||||||
always @(posedge clock or posedge reset)
|
always @(posedge clock or posedge reset) begin
|
||||||
if (reset) begin
|
if (reset) begin
|
||||||
// Reset the counter to 0
|
// Reset the counter to 0
|
||||||
countervalue <= '0;
|
countervalue <= '0;
|
||||||
@ -32,6 +32,7 @@ module Counter
|
|||||||
countervalue <= countervalue - 1;
|
countervalue <= countervalue - 1;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
assign binout = countervalue;
|
assign binout = countervalue;
|
||||||
endmodule
|
endmodule
|
Reference in New Issue
Block a user