|
楼主 |
发表于 2011-12-14 19:25:35
|
显示全部楼层
module GATE_1;
reg IN0,IN1,IN2,IN3;
reg S1,S0;
wire OUTPUT;
MUX4_TO_1 MYMUX(OUTPUT,IN0,IN1,IN2,IN3,S1,S0);
initial
begin
IN0=1;IN1=0;IN2=1;IN3=0;
#1 $display("IN0=%b,IN1=%b,IN2=%b,IN3=%b\N",IN0,IN1,IN2,IN3);
S1=0;S0=0;
#1 $display("S1=%b,S0=%b,OUTPUT=%b\n",S1,S0,OUTPUT);
S1=0;S0=1;
#1 $display("S1=%b,S0=%b,OUTPUT=%b\n",S1,S0,OUTPUT);
S1=1;S0=0;
#1 $display("S1=%b,S0=%b,OUTPUT=%b\n",S1,S0,OUTPUT);
S1=1;S0=1;
#1 $display("S1=%b,S0=%b,OUTPUT=%b\n",S1,S0,OUTPUT);
end
endmodule
module MUX4_TO_1(out,i0,i1,i2,i3,s1,s0);
output out;
input i0,i1,i2,i3,s1,s0;
wire s1_n,s0_n;
wire y0,y1,y2,y3;
not (s1_n,s1);
not (s0_n,s0);
and (y0,i0,s1_n,s0_n);
and (y1,i1,s1_n,s0);
and (y2,i2,s1,s0_n);
and (y3,i0,s1,s0);
or (out,y0,y1,y2,y3);
endmodule
这样子为什么综合不了啊
提示错了:Error: Can't synthesize current design -- Top partition does not contain any logic |
|