diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-06 15:51:12 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-06 15:51:12 -0800 |
commit | e8f4dc739c5cf1129800aaa88df3f7c6f9c99360 (patch) | |
tree | 3e596dbfc741fcd4cde58b3d098b94dd8f3f8c78 /techlibs | |
parent | 20ca795b87b810063cdcee6e92e3922281f6b092 (diff) | |
download | yosys-e8f4dc739c5cf1129800aaa88df3f7c6f9c99360.tar.gz yosys-e8f4dc739c5cf1129800aaa88df3f7c6f9c99360.tar.bz2 yosys-e8f4dc739c5cf1129800aaa88df3f7c6f9c99360.zip |
Cope WIDTH of ff/latch cells is default of zero
Diffstat (limited to 'techlibs')
-rw-r--r-- | techlibs/common/simlib.v | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/techlibs/common/simlib.v b/techlibs/common/simlib.v index 9b6008140..a1e0c1575 100644 --- a/techlibs/common/simlib.v +++ b/techlibs/common/simlib.v @@ -1464,7 +1464,7 @@ module \$dff (CLK, D, Q); parameter WIDTH = 0; parameter CLK_POLARITY = 1'b1; -parameter INIT = {WIDTH{1'bx}}; +parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}}; input CLK; input [WIDTH-1:0] D; @@ -1484,7 +1484,7 @@ module \$dffe (CLK, EN, D, Q); parameter WIDTH = 0; parameter CLK_POLARITY = 1'b1; parameter EN_POLARITY = 1'b1; -parameter INIT = {WIDTH{1'bx}}; +parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}}; input CLK, EN; input [WIDTH-1:0] D; @@ -1506,7 +1506,7 @@ parameter WIDTH = 0; parameter CLK_POLARITY = 1'b1; parameter SET_POLARITY = 1'b1; parameter CLR_POLARITY = 1'b1; -parameter INIT = {WIDTH{1'bx}}; +parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}}; input CLK; input [WIDTH-1:0] SET, CLR, D; @@ -1540,7 +1540,7 @@ parameter WIDTH = 0; parameter CLK_POLARITY = 1'b1; parameter ARST_POLARITY = 1'b1; parameter ARST_VALUE = 0; -parameter INIT = {WIDTH{1'bx}}; +parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}}; input CLK, ARST; input [WIDTH-1:0] D; @@ -1563,7 +1563,7 @@ module \$dlatch (EN, D, Q); parameter WIDTH = 0; parameter EN_POLARITY = 1'b1; -parameter INIT = {WIDTH{1'bx}}; +parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}}; input EN; input [WIDTH-1:0] D; @@ -1585,7 +1585,7 @@ parameter WIDTH = 0; parameter EN_POLARITY = 1'b1; parameter SET_POLARITY = 1'b1; parameter CLR_POLARITY = 1'b1; -parameter INIT = {WIDTH{1'bx}}; +parameter INIT = {WIDTH > 0 ? WIDTH : 1{1'bx}}; input EN; input [WIDTH-1:0] SET, CLR, D; |