赞
踩
vio vio_i (
.clk(clk),
.probe_in0(din0),
...
.probe_out0(dout0),
...
);
ila ila_i (
.clk(clk),
.trig_in(trig_in0),
.trig_in_ack(trig_in0_ack),
.trig_out(trig_out0),
.trig_out_ack(trig_out0_ack),
.probe0(din0),
...
);
create_clock -period <时钟周期> -name <时钟名称> [get ports <端口名>] #创建时钟
set property PACKAGE_PIN <引脚号> [get ports <端口名>] #约束端口引脚位置
set property IOSTANDARD <引脚标准> [get ports <端口名>] #约束端口引脚标准,支持通配符,如<端口名>[*]
set clock groups -asynchronous -group [get clocks -include generated clocks <时钟名称>] \
-group [get clocks-include generated clocks <时钟名称>] #设置异步时钟
set_false_path -through [port <端口号>] #不检查通过<端口号>路径的时序
set_false_path -to [port <端口号>] #不检查到<端口号>路径的时序
set property CONFIG_VOLTAGE 1.8 [current design] #设置电压
set property CONFIG_MODE_SPIX4 [current design] #设置SPI模式
set property BITSTREAM.GENERAL.COMPRESS TRUE [current design] #设置bit是否压缩
set property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current design] #设置SPI位宽
set property BITSTREAM.CONFIG.SPI_32BIT_ADDR Yes [current design] #SPI Flash大于256Mb才需要
set property BITSTREAM.CONFIG.CONFIGRATE 85.0 [current design] #设置SPI的加载时钟
set property BITSTREAM.CONFIG.EXTMASTERCCLK_EN disable [current design] #使用外部时钟驱动Flash
# set property BITSTREAM.CONFIG.EXTMASTERCCLK_EN DIV-1 [current design]
set property BITSTREAMCONFIG.SPI_FALL_EDGE YES [current design] #设置SPI的数据加载时钟边沿
set property BITSTREAM.CONFIG.UNUSEDPIN Pullup [current design] #设置未使用管脚的默认电平
set property BITSTREAM.CONFIG.CONFIGFALLBACK Enable [current design] #打开看门狗功能
`timescale 1 ns / 1 ps
module sensor_tb;
reg clk; //输出信号使用wire
reg rst;
reg tready;
initial
fork
#0 begin clk = l'bl; rst = l'bl; tready = 1'b0; end
#10 rst = 1'b0;
$display("\n## tb : @Time : %0t tready is asserted\n",$time);
#20 tready = 1'b1;
#1320 tready = 1'b0;
#1330 tready = 1'b1;
join
always #5 clk = !clk;
sensor_sim sensor_sim i (
.cmac_clk(clk),
.rst_send(rst),
.tx_tready(tready)
);
endmodule
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。