Forum Discussion
AFera1
New Contributor
6 years agoError Code (121014): Net HEX2, HEX1, HEX0 cannot be assigned to more than one value. If someone can help that would be greatly appreciated.
module bcd_seven_seg(SW,HEX0,HEX1,HEX2,LEDG); input [9:0] SW; output [6:0] HEX0, HEX1, HEX2; output [9:0] LEDG; wire [6:0] hex0,hex1,hex2; assign HEX0 = ~hex0; assign HEX1 = ~hex1; a...
ak6dn
Regular Contributor
6 years agoOn these lines:
bcd_seven_seg_behavioral u0(SW[3:0],HEX0);
bcd_seven_seg_behavioral u1(SW[7:4],HEX1);
bcd_seven_seg_behavioral u2(SW[9:8],HEX2);
the second arg HEXn is an OUTPUT of this function.
And nowhere do you assign a value to 'hexN' before using it.
I think the above lines want to be:
bcd_seven_seg_behavioral u0(SW[3:0],hex0);
bcd_seven_seg_behavioral u1(SW[7:4],hex1);
bcd_seven_seg_behavioral u2(SW[9:8],hex2);
otherwise you are assigning a value to HEXn via the assign statements, and also the bcd_seven_seg_behavioral module output.
Note verilog is a case sensitive language.