[英]Assign localparam with concatenation satement?
Here's what I'm trying to do . 这就是我想要做的。 .
。 .
。
localparam nine1 = {3{4'b0000}, 4'b1001};
localparam nine2 = {2{4'b0000}, 2{nine1}};
Is it possible to assign a localparam
with a concat satement and then use that localparam
in another localparam
assignment? 是否可以分配具有
localparam
的localparam,然后在另一个localparam
分配中使用该localparam
? It seems like it would work, but I might have fuddled something up. 似乎可行,但我可能已经搞砸了。 This is not system verilog by the way.
顺便说一下,这不是系统verilog。
Well, the error was that I wasn't wrapping my replication statements
in {}
inside the concatenation
. 好吧,错误是我没有将
replication statements
包装在concatenation
中的{}
。
localparam nine1 = {{3{4'b0000}}, 4'b1001};
localparam nine2 = {{2{4'b0000}}, {2{nine1}}};
Subtle, but important. 细微但重要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.