Verilog: Can you put “assign” statements within always@ or begin/end statements?

后端 未结 7 2129
北海茫月
北海茫月 2020-12-18 10:34

Is this allowed?

input w;
     input [8:0]y;
     output reg [8:0]x;
     always@(w)
     begin


     //x[0] or A is never on in any next state
     as         


        
7条回答
  •  情歌与酒
    2020-12-18 11:07

    Yes, but you don't want to. Since x[] doesn't depend on x[] the order doesn't matter. Just use <= instead of assign =.

提交回复
热议问题