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
Select Answer
temp must be strictly explicitly initialized to 0 inside an initial block before it can be used
temp
0
initial
A continuous assign statement requires a delay value (e.g., #5) to be synthesizable
assign
#5
The output y is implicitly a wire but needs to be a reg to be driven by temp
output y
wire
reg
Continuous assign statements can strictly only drive net types (like wire), but temp is statically declared as a reg