我需要与工具的减法器进行比较。但是,它给出了以下错误:
E, WANOTL (tool.v, 19 | 11): A net is not a legal lvalue in this context [9.3.1 (IEEE)].
在线:
assign wresult00 = wResult[0];
assign wresult01 = wResult[1];
我试图纠正它,但我不能
module tool (x, y, B_in,S,Bout);
input wire x,y,B_in;
output reg S,Bout;
wire[1:0] wResult;
reg regX,regY,regB_in;
wire wresult00,wresult01;
assign wResult= (regX - regY) - regB_in;
assign wresult00 = wResult[0];
assign wresult01 = wResult[1];
always @*
begin
Bout <= wresult01;
S <= wresult00;
regX <= x;
regY <= y;
regB_in <= B_in;
end
谢谢