每当我创建 VHDL 设计时,我都会有很多模块。这些模块中的每一个都连接到一个主文件,因此所有内容都被合成。但我想为这些模块中的每一个编写单独的测试平台,并为全局流程编写一个。如果我能做一些事情将所有这些测试平台连接在一起并让它们连续运行,在一次运行中测试我的整个设计,那就太好了。我怎么能这样做?我喜欢使用 GHDL 和断言。是否可以创建一个超级测试平台?或者迭代它们的shell脚本会更好吗?
在ModelSim中使用测试平台而不是".do"文件有什么好处?
".do"文件允许我强制和检查端口.测试平台似乎做了完全相同的事情.那么为什么要使用测试平台而不是".do"文件呢?
谢谢!
我尝试开发备用内存代码,但仿真在 Vivado 中卡住了。我不能确切地说它是否被卡住,但模拟没有运行。我已附上我无法清楚表达的问题的图片。代码的测试平台位于此处。在尝试获取仿真波形时,Vivado并没有给出仿真,而在Icarus Verilog中完全可以工作,并且在GTK Wave中仿真波形清晰。
module trial_tb;
reg clk;
reg rst_n;
reg bist_enable;
reg we;
reg [5:0] wraddr;
reg data_in;
reg re;
reg [5:0] rdaddr;
wire data_out;
wire repair_fail;
wire repair_finish;
integer m;
integer idx;
SRAM_repair uut (clk, rst_n, bist_enable, we, wraddr, data_in, re, rdaddr, data_out, repair_fail, repair_finish);
initial
begin
clk = 0;
rst_n <= 0;
bist_enable <= 0;
rdaddr <= 'b0;
wraddr <= 'b0;
we <= 1'b0;
re <= 1'b0;
data_in <= 1'b0;
#5.0 rst_n <= 1;
#5.0 bist_enable …
Run Code Online (Sandbox Code Playgroud) 任何人都可以帮助我创建一个测试平台或仅为我的以下代码创建输入代码吗?我正在使用赛灵思。
module fsmb (input rst,clk,a,
output reg x);
parameter sta = 2'b00, stb = 2'b01, stc = 2'b10,
std = 2'b11;
reg[1:0] st, nst;
always @(posedge clk)
begin
if (rst)
st <= 2'b00;
else
st <= nst;
end
always @*
begin
st = nst; x =0'b0;
case (st)
sta: if(a) nst = stb;
else nst = sta;
stb: if(a) nst = stc;
else nst = stb;
stc: begin
if(a) nst = stc;
else nst = std;
x =1'b1;
end
std: …
Run Code Online (Sandbox Code Playgroud) test-bench ×4
verilog ×2
vhdl ×2
fpga ×1
ghdl ×1
input ×1
intel ×1
modelsim ×1
unit-testing ×1
verification ×1
vivado ×1