This commit is contained in:
2025-08-18 07:18:32 +03:00
commit 12dcc9d232
27 changed files with 1910 additions and 0 deletions

19
chapter4/pc.v Normal file
View File

@@ -0,0 +1,19 @@
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