4 input [3:0] rf__read_0_1a,
5 output wire [31:0] rf__rdata_0_1a,
6 input [3:0] rf__read_1_1a,
7 output wire [31:0] rf__rdata_1_1a,
8 input [3:0] rf__read_2_1a,
9 output wire [31:0] rf__rdata_2_1a,
10 input [3:0] rf__read_3_3a,
11 output wire [31:0] rf__rdata_3_3a,
12 output wire [31:0] spsr,
14 input [3:0] write_reg,
15 input [31:0] write_data
18 reg [31:0] regfile [0:15];
22 for (i = 0; i < 16; i = i + 1)
26 assign rf__rdata_0_1a = ((rf__read_0_1a == write_reg) && write) ? write_data : regfile[rf__read_0_1a];
27 assign rf__rdata_1_1a = ((rf__read_1_1a == write_reg) && write) ? write_data : regfile[rf__read_1_1a];
28 assign rf__rdata_2_1a = ((rf__read_2_1a == write_reg) && write) ? write_data : regfile[rf__read_2_1a];
29 assign rf__rdata_3_3a = ((rf__read_3_3a == write_reg) && write) ? write_data : regfile[rf__read_3_3a];
30 assign spsr = regfile[4'hF];
32 always @(posedge clk or negedge Nrst)
34 for (i = 0; i < 16; i = i + 1)
37 regfile[write_reg] <= write_data;