diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-31 11:17:56 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-31 11:17:56 +0200 |
commit | 5640b7d6078a681e33e85f06920394204f41c875 (patch) | |
tree | 96ebae5ed0626ae5238fe8b794e50e0cb9d87e7c /tests/simple/forgen01.v | |
parent | 04843bdcbeb62a202a6372ea5464de8c7ea66820 (diff) |
Added test cases from 2012 paper on comparison of foss verilog synthesis tools
Diffstat (limited to 'tests/simple/forgen01.v')
-rw-r--r-- | tests/simple/forgen01.v | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/simple/forgen01.v b/tests/simple/forgen01.v new file mode 100644 index 00000000..70ee7e66 --- /dev/null +++ b/tests/simple/forgen01.v @@ -0,0 +1,20 @@ +module uut_forgen01(a, y); + +input [4:0] a; +output y; + +integer i, j; +reg [31:0] lut; + +initial begin + for (i = 0; i < 32; i = i+1) begin + lut[i] = i > 1; + for (j = 2; j*j <= i; j = j+1) + if (i % j == 0) + lut[i] = 0; + end +end + +assign y = lut[a]; + +endmodule |