2023-10-20 09:48:18 +00:00
|
|
|
module program_counter (input clock, reset,
|
|
|
|
input [31:0] new_pc,
|
|
|
|
output reg [31:0] pc);
|
|
|
|
|
2023-10-22 13:41:39 +00:00
|
|
|
always @ (posedge clock, posedge reset) begin
|
|
|
|
if (reset == 1'b1)
|
2023-10-20 09:48:18 +00:00
|
|
|
pc <= 32'b0;
|
|
|
|
else
|
|
|
|
pc <= new_pc;
|
|
|
|
end
|
|
|
|
|
|
|
|
endmodule
|