diff options
author | Udi Finkelstein <github@udifink.com> | 2017-09-26 06:25:42 +0300 |
---|---|---|
committer | Udi Finkelstein <github@udifink.com> | 2017-09-26 06:25:42 +0300 |
commit | 64eb8f29adcc3e6ee92e083ae0fee3aaf85dbbc4 (patch) | |
tree | 845429786f8f0b8e39aece33fa4c2932ed81217e /tests | |
parent | 29f8acf09586c34222923139511ef64c00eccc8b (diff) | |
download | yosys-64eb8f29adcc3e6ee92e083ae0fee3aaf85dbbc4.tar.gz yosys-64eb8f29adcc3e6ee92e083ae0fee3aaf85dbbc4.tar.bz2 yosys-64eb8f29adcc3e6ee92e083ae0fee3aaf85dbbc4.zip |
Add $size() function. At the moment it works only on expressions, not on memories.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/simple/functions01.sv | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/simple/functions01.sv b/tests/simple/functions01.sv new file mode 100644 index 000000000..0fa1da6bd --- /dev/null +++ b/tests/simple/functions01.sv @@ -0,0 +1,15 @@ +module functions01; +wire [3:0]x; +wire [$size(x)-1:0]x_size; +wire [$size({x, x})-1:0]xx_size; +wire [3:0]w[0:5]; + +// +// The following are not supported yet: +// + +//wire [$size(w)-1:0]w_s; +//wire [$bits(x)-1:0]x_bits; +//wire [$bits({x, x})-1:0]xx_bits; + +endmodule |