diff options
Diffstat (limited to 'tests/xilinx_ug901/tristates_1.v')
-rw-r--r-- | tests/xilinx_ug901/tristates_1.v | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/xilinx_ug901/tristates_1.v b/tests/xilinx_ug901/tristates_1.v new file mode 100644 index 000000000..0038a9989 --- /dev/null +++ b/tests/xilinx_ug901/tristates_1.v @@ -0,0 +1,17 @@ +// Tristate Description Using Combinatorial Always Block
+// File: tristates_1.v
+//
+module tristates_1 (T, I, O);
+input T, I;
+output O;
+reg O;
+
+always @(T or I)
+begin
+ if (~T)
+ O = I;
+ else
+ O = 1'bZ;
+end
+
+endmodule
|