我想做一個4位輸入模3模塊。我不斷收到錯誤「實例化不允許在連續區域,除了檢查器實例」。我不確定我做錯了什麼。verilog:實例化是不允許在連續區域,除了檢查實例
module divisible_3(
input [3:0] a,
output div3);
wire xnor30;
wire xnor21;
wire and32;
wire xnor10;
wire xnor_and;
wire andxnor_and;
begin
always @ (*)
two_input_xnor xnor1 (a[3], a[0], xnor30);
two_input_xnor xnor2 (a[2], a[1], xnor21);
two_input_and and1 (a[3], a[2], and32);
two_input_xnor xnor3 (a[1], a[0], xnor10);
two_input_and and2 (xnor30, xnor21, xnor_and);
two_input_and and3 (and32, xnor10, andxnor_and);
two_input_or or1 (xnor_and, andxnor_and, div3);
end
endmodule
[multiplier 4-bit verilog using half and full adders]可能的副本(https://stackoverflow.com/questions/20842388/multiplier-4-bit-with-verilog-using-just-half-and -full-adders) – Qiu