projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab54ce1
)
Added tests/simple/repwhile.v
author
Clifford Wolf
<clifford@clifford.at>
Fri, 6 Jun 2014 15:47:20 +0000
(17:47 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Fri, 6 Jun 2014 15:47:20 +0000
(17:47 +0200)
tests/simple/repwhile.v
[new file with mode: 0644]
patch
|
blob
diff --git a/tests/simple/repwhile.v
b/tests/simple/repwhile.v
new file mode 100644
(file)
index 0000000..
8c5b4b3
--- /dev/null
+++ b/
tests/simple/repwhile.v
@@ -0,0
+1,20
@@
+module test001(output [63:0] y);
+ function [7:0] mylog2;
+ input [31:0] value;
+ begin
+ mylog2 = 0;
+ while (value > 0) begin
+ value = value >> 1;
+ mylog2 = mylog2 + 1;
+ end
+ end
+ endfunction
+
+ genvar i;
+ generate
+ for (i = 0; i < 64; i = i+1) begin
+ localparam tmp = mylog2(i);
+ assign y[i] = tmp;
+ end
+ endgenerate
+endmodule