3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-04 10:20:24 +00:00

$size() now works with memories as well!

This commit is contained in:
Udi Finkelstein 2017-09-26 08:36:45 +03:00
parent 64eb8f29ad
commit 17f8b41605
2 changed files with 7 additions and 3 deletions

View file

@ -2,13 +2,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];
wire [3:0]y[0:5];
wire [$size(y)-1:0]y_size;
wire [3:0]z[0:5][0:7];
wire [$size(z)-1:0]z_size;
//
// 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;