From 47983fc7710df0f2ab0bf5e27255d9d9e30ad1b7 Mon Sep 17 00:00:00 2001 From: Nick McKinney Date: Thu, 29 Dec 2016 15:57:28 -0600 Subject: add initial zero values for registers --- regFile.v | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'regFile.v') diff --git a/regFile.v b/regFile.v index 7410847..3220aa0 100644 --- a/regFile.v +++ b/regFile.v @@ -25,6 +25,17 @@ module regFile ( assign dataA = register[regA]; assign dataB = register[regB]; + initial begin + register[0] = 16'h0; + register[1] = 16'h0; + register[2] = 16'h0; + register[3] = 16'h0; + register[4] = 16'h0; + register[5] = 16'h0; + register[6] = 16'h0; + register[7] = 16'h0; + end + always @(posedge clk) begin if(we) begin register[regDest] <= { -- cgit v1.2.3