Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
module ConditionalIncrement(
input clk,
input reset,
output reg [31:0] count
);
always @(posedge clk or posedge reset) begin
if(reset) count <= 3;
else if(count < 5) count <= count + 1;
end
endmoduleCoding works best on desktop or with an external keyboard.