I am trying to take the result of a module and assign it to an input of another module, however I keep getting an error about declaring net types. I feel like I'm missing part of the syntax rules here, but I've been unable to find a solution. Any help much appreciated!
Some nonsense code to demonstrate:
module m1(SW, LED); input SW; output LED; reg [3:0] out; reg [1:0] x; assign x = out[1:0]; moduleA mA(.in(SW), .out(out)); moduleA mB(.in(x), .out(LED));