summaryrefslogtreecommitdiff
path: root/regFile_tb.v
diff options
context:
space:
mode:
Diffstat (limited to 'regFile_tb.v')
-rw-r--r--regFile_tb.v24
1 files changed, 12 insertions, 12 deletions
diff --git a/regFile_tb.v b/regFile_tb.v
index 10839d0..59c2edd 100644
--- a/regFile_tb.v
+++ b/regFile_tb.v
@@ -10,10 +10,10 @@ module regFile_tb ();
reg we, hb, lb;
wire [15:0] dataA;
wire [15:0] dataB;
-
+
initial begin
clk = 1'b0;
-
+
regA = 3'h0;
regB = 3'h0;
regDest = 3'h0;
@@ -21,7 +21,7 @@ module regFile_tb ();
hb = 1'b0;
lb = 1'b0;
dataIn = 16'h0;
-
+
#2
regA = 3'h1;
regDest = 3'h1;
@@ -29,26 +29,26 @@ module regFile_tb ();
we = 1'b1;
hb = 1'b1;
lb = 1'b1;
-
+
#2
regB = 3'h1;
regA = 3'h2;
dataIn = 16'hBEEF;
lb = 1'b0;
-
+
#2
lb = 1'b1;
-
+
#2
regDest = 3'h2;
hb = 1'b0;
dataIn = 16'h9876;
-
+
#2
hb = 1'b1;
lb = 1'b0;
dataIn = 16'h2345;
-
+
#2
regB = 3'h7;
regDest = 3'h7;
@@ -56,18 +56,18 @@ module regFile_tb ();
hb = 1'b0;
we = 1'b1;
dataIn = 16'hFFCC;
-
+
#2
lb = 1'b1;
hb = 1'b1;
we = 1'b0;
-
+
#5
$stop;
end
-
+
always #1 clk = !clk;
-
+
regFile regFile_inst (
.clk(clk),
.regA(regA),