-------------- 为什么FIFO仿真输出总是高阻态啊?------------
只有FIFO仿真也是这样
module fifotest;
reg clk;
reg datain;
reg countx;
reg wr_req;
reg rd_req;
wire dataout;
wire full;
wire empty;
initial
begin
clk <= 1'b0;
countx<=7'h0;
datain<=8'ha3;
end
always
#5 clk <= ~clk;
always @( negedge clk )
begin
countx <= countx + 7'h1;
if( countx==7'd40 )
datain <= datain+8'h1;
else if( countx==7'd50 )
begin
wr_req <=1'b1;
// wr_req <= !full;
end
else if( countx==7'd60 )
begin
rd_req <=1'b1;
// rd_req <= !empty;
end
else
begin
wr_req <= 1'b0;
rd_req <= 1'b0;
end
end
rx_fifo U1( .clock(clk),
.data(datain),
.rdreq(rd_req),
.wrreq(wr_req),
.empty(empty),
.full(full),
.q(dataout) );
endmodule 哎,刚接触FPAG,网上到处也没找到,但找到如何从Quartus自动启动仿真,出乎意料正常了,可能先去自己加的文件不够,但也没报错,也不知道先前缺什么文件
页:
[1]