Files
2025-08-18 07:18:32 +03:00

20 lines
231 B
Verilog

module pc (
input rst,
input clk,
output reg [31:0] pc,
output reg [31:0] next_pc
);
always @(posedge clk) begin
if(rst) begin
pc <= 0;
end
else begin
next_pc <= pc;
pc <= pc + 1;
end
end
endmodule