first commit

This commit is contained in:
2025-04-06 00:11:28 -04:00
commit 6206025f5a
16 changed files with 930 additions and 0 deletions

18
rtl/common/register.sv Normal file
View File

@@ -0,0 +1,18 @@
module register #(
parameter WIDTH = 32,
parameter RESET = 0
) (
input logic clock,
input logic reset,
input logic write_en,
input logic [WIDTH-1:0] next,
output logic [WIDTH-1:0] value
);
always_ff @(posedge clock, posedge reset)
if(reset)
value <= RESET;
else if(write_en)
value <= next;
endmodule