2012-06-20 56 views
2

我是verilog的初学者。verilog级联的方向

几乎所有连接的例子如下。

wire [3:0] result; 
reg a, b, c, d; 

result = {a, b, c, d}; 

以下可能吗?

wire [3:0] result; 
wire a, b, c, d; 

{a, b, c, d} = result; 

回答

4

分配的LHS(左手侧)做允许级联。

module mod1; 

wire [3:0] result; 
wire a, b, c, d; 

reg e,f,g,h; 

{a, b, c, d} = result; //Invalid, not in procedural construct 

assign {a, b, c, d} = result; //Valid 
assign {a,{b,c},d} = result; //Valid 

initial 
    {e, f, g, h} = result; //Valid 

endmodule 
+0

非常感谢〜 – user1467945