1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
233 B
Verilog

module pc(
input clk,
input rst,
input inc,
output[7:0] out
);
reg[3:0] pc;
always @(posedge clk, posedge rst) begin
if (rst) begin
pc <= 4'b0;
end else if (inc) begin
pc <= pc + 1;
end
end
assign out = pc;
endmodule