summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick McKinney <nick@kmonkey.net>2016-12-29 15:57:28 -0600
committerNick McKinney <nick@kmonkey.net>2016-12-29 15:57:28 -0600
commit47983fc7710df0f2ab0bf5e27255d9d9e30ad1b7 (patch)
tree81ec9d5248da6450c3b67dfaaa0a2f10832e810f
parent7a8184a7c5b1e15c8c3446feb3a927b0fc347242 (diff)
add initial zero values for registers
-rw-r--r--regFile.v11
1 files changed, 11 insertions, 0 deletions
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] <= {