Block1
module block1 (clk, inA, outA, outB, outC);
input clk, inA;
output outA, outB, outC;
reg outA, outB, outC;
always @ (posedge clk) begin
outA = inA;
outB = outA;
outC = outB;
end
endmodule
Block2
module block2 (clk, inA, outA, outB, outC);
input clk, inA;
output outA, outB, outC;
reg outA, outB, outC;
always @ (posedge clk) begin
outC = outB;
outA = inA;
outB = outA;
end
endmodule
Block3
module block3 (clk, inA, outA, outB, outC);
input clk, inA;
output outA, outB, outC;
reg outA, outB, outC;
always @ (posedge clk) begin
outB = outA;
outA = inA;
outC = outB;
end
endmodule
Code the following DUT blocks using 3 different ordering:
module ordering1 (clk, inA, outA, outB, outC);
input clk, inA;
output outA, outB, outC;
//reg outA, outB, outC;
block1 block1_inst (.clk(clk), .inA(inA), .outA(outA), .outB(outB), .outC(outC));
block2 block2_inst (.clk(clk), .inA(inA), .outA(outA), .outB(outB), .outC(outC));
block3 block3_inst (.clk(clk), .inA(inA), .outA(outA), .outB(outB), .outC(outC));
Error:
Error (12014): Net "outA", which fans out to "outA", cannot be assigned more than one value
Error (12015): Net is fed by "block1:block1_inst|outA"
Error (12015): Net is fed by "block2:block2_inst|outA"
Error (12015): Net is fed by "block3:block3_inst|outA"
Error (12014): Net "outB", which fans out to "outB", cannot be assigned more than one value
Error (12015): Net is fed by "block1:block1_inst|outB"
Error (12015): Net is fed by "block2:block2_inst|outB"
Error (12015): Net is fed by "block3:block3_inst|outB"
Error (12014): Net "outC", which fans out to "outC", cannot be assigned more than one value
Error (12015): Net is fed by "block1:block1_inst|outC"
Error (12015): Net is fed by "block2:block2_inst|outC"
Error (12015): Net is fed by "block3:block3_inst|outC"
How to overcome this issue? Thanks.
I have removed reg
but the code is still having error after checking the other forum.