|
这人问题一直很郁闷,
之前9。0也是这个问题,
比如我有两个模块
一个top.v主模块,内容:
module top(clk,rst,spi_clk,spi_in,spi_out,spi_cs,sf_ok,sf_clk);
input clk; //50Mhz时钟输入
input rst; //复位
input spi_clk; //
input spi_in; //
output spi_out; //
input spi_cs; //
spi (rst,spi_clk,spi_in,spi_out,spi_cs);
endmodule
一个spi.v子模块
module spi(rst,spi_clk,spi_in,spi_out,spi_cs);
input rst; //
input spi_clk; //
input spi_in; //
input spi_out; //
input spi_cs; //
reg[7:0] buffer;
always @ (negedge spi_clk) //
begin
if(rst==0 || spi_cs==1) //
begin
buffer<=8'd0;
end
else
begin
buffer={buffer[6:0],spi_in};
end
end
endmodule
比如我现在要仿真SPI子模块,如何仿真?
之前在9.0版本中也是如此,
听说只能仿真主模块,子模块要仿真需要置顶,再综合,再创建仿真时序文件,再仿真
但实际这样做也不行,也是出错
如图,: 只有一个主模块时,仿真没有任何问题,求教,大家平时如何进行仿真的?就是时序仿真,内置的,附上文件,求指点如何仿真?
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|