From 556e815c4b3075783c0f0a2f42f0ba3d79252494 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 23 Jan 2021 10:22:20 -0500 Subject: [PATCH] Cleaned up regfile x0 tied to gnd --- wally-pipelined/src/regfile.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wally-pipelined/src/regfile.sv b/wally-pipelined/src/regfile.sv index 78238a823..738683efd 100644 --- a/wally-pipelined/src/regfile.sv +++ b/wally-pipelined/src/regfile.sv @@ -44,8 +44,8 @@ module regfile #(parameter XLEN=32) ( // reset is intended for simulation only, not synthesis always_ff @(negedge clk or posedge reset) - if (reset) for(i=0; i<32; i++) rf[i] <= 0; - else if (we3 & (a3 != 0)) rf[a3] <= wd3; + if (reset) for(i=1; i<32; i++) rf[i] <= 0; + else if (we3) rf[a3] <= wd3; assign #2 rd1 = (a1 != 0) ? rf[a1] : 0; assign #2 rd2 = (a2 != 0) ? rf[a2] : 0;