34. Procedural Constructs

Question.1

Why does the below Verilog code fail to compile/elaborate?

module assign_test(input a, input b, output y);
    reg temp;
    assign temp = a & b;
    assign y = temp;
endmodule

 

Need Help? Refer to the Quick Guide below

Select Answer