improvements in muxtree/select_leaves test
authorClifford Wolf <clifford@clifford.at>
Sun, 18 Jan 2015 12:24:01 +0000 (13:24 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 18 Jan 2015 12:24:01 +0000 (13:24 +0100)
tests/simple/muxtree.v

index 46c78d4cfe5b5ac4e9017c3e7057000ab048db88..1fb1cea5ec7e76d1e3084fcb6cb1e2bd94f796d0 100644 (file)
@@ -73,8 +73,11 @@ endmodule
 
 // test case for muxtree with select on leaves
 
-module select_leaves(input C, D, output reg Q);
+module select_leaves(input R, C, D, output reg Q);
        always @(posedge C)
-               Q <= Q ? Q : D ? 1'b1 : Q;
+               if (!R)
+                       Q <= R;
+               else
+                       Q <= Q ? Q : D ? D : Q;
 endmodule