最近在调LATTICE的ice5lp4k的fpga小程序,使用官方综合软件通过后,用modelsim6.5综合后仿真和布局布线后仿真。前者功能正常,后者testbench的激励信号传递异常,共有4个输入激励,其中两个能传递给逻辑电路UUT,另外两个输入正确,UUT接收为随机状态。
更改过引脚分配,综合后提示没有明确的warning指示。testbench 逻辑很简单,没发现什么异常(但一直怀疑是这的问题)。后仿真编译和开始仿真过程没有提示问题,各种仿真所需的文件也都添加进工程中。这几天一直僵持在这,大神们帮帮忙,看是哪里的问题??!
- testbench 内容如下:
复制代码
//-----------------------------------------------------------------------------
//
// Title : driver_3k3_hipak_standard_tb
// Design : driver_3k3_2
// Author : Aldec, Inc
// Company : Aldec, Inc
//
//-----------------------------------------------------------------------------
//
// File : driver_3k3_hipak_standard_TB.v
// Generated : Sun Nov 4 16:25:14 2018
// From : E:icecube2_workspace3k3_driverdriver_3k3aldecdriver_3k3_2srcTestBenchdriver_3k3_hipak_standard_TB_settings.txt
// By : tb_verilog.pl ver. ver 1.2s
//
//-----------------------------------------------------------------------------
//
// Description :
//
//-----------------------------------------------------------------------------
`timescale 1ns / 1ns
module driver_3k3_hipak_standard_tb;
//Internal signals declarations:
reg fault=0;
wire LED_TRIG;
wire IN_TD350;
wire fault_optical;
reg clk=0;
reg UVLO=0;
wire LED_FAULT;
reg IN=1;
always
#200 clk = ~clk;
initial
begin
UVLO = 1;
fault = 1;
IN = 1;
# 10000
IN = 0;
# 10000
IN = 1;
# 10000
IN = 0;
# 10000
IN = 1;
# 10000
IN = 0;
# 10000
IN = 1;
end
initial
begin
UVLO = 1;
# 5000;
UVLO = 0;
#10000;
UVLO = 1;
end
initial
begin
fault = 1;
#31000;
fault = 0;
#38000;
fault = 1;
end
// Unit Under Test port map
driver_3k3_hipak_standard UUT (
.fault(fault),
.LED_TRIG(LED_TRIG),
.IN_TD350(IN_TD350),
.fault_optical(fault_optical),
.clk(clk),
.UVLO(UVLO),
.LED_FAULT(LED_FAULT),
.IN(IN));
initial
$monitor($realtime,,"ps %h %h %h %h %h %h %h %h ",fault,LED_TRIG,IN_TD350,fault_optical,clk,UVLO,LED_FAULT,IN);
endmodule
一周热门 更多>