summaryrefslogtreecommitdiff
path: root/tests/hana/test_parse2synthtrans_case_1_test.v
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-01-05 11:13:26 +0100
committerClifford Wolf <clifford@clifford.at>2013-01-05 11:13:26 +0100
commit7764d0ba1dcf064ae487ee985c43083a0909e7f4 (patch)
tree18c05b8729df381af71b707748ce1d605e0df764 /tests/hana/test_parse2synthtrans_case_1_test.v
initial import
Diffstat (limited to 'tests/hana/test_parse2synthtrans_case_1_test.v')
-rw-r--r--tests/hana/test_parse2synthtrans_case_1_test.v26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/hana/test_parse2synthtrans_case_1_test.v b/tests/hana/test_parse2synthtrans_case_1_test.v
new file mode 100644
index 00000000..348c566a
--- /dev/null
+++ b/tests/hana/test_parse2synthtrans_case_1_test.v
@@ -0,0 +1,26 @@
+module demultiplexer1_to_4 (out0, out1, out2, out3, in, s1, s0);
+output out0, out1, out2, out3;
+reg out0, out1, out2, out3;
+input in;
+input s1, s0;
+reg [3:0] encoding;
+reg [1:0] state;
+ always @(encoding) begin
+ case (encoding)
+ 4'bxx11: state = 1;
+ 4'bx0xx: state = 3;
+ 4'b11xx: state = 4;
+ 4'bx1xx: state = 2;
+ 4'bxx1x: state = 1;
+ 4'bxxx1: state = 0;
+ default: state = 0;
+ endcase
+ end
+
+ always @(encoding) begin
+ case (encoding)
+ 4'b0000: state = 1;
+ default: state = 0;
+ endcase
+ end
+endmodule