mirror of
https://github.com/MPSU/APS.git
synced 2025-09-15 09:10:10 +00:00
Обновление тестбенчей
This commit is contained in:
@@ -30,8 +30,6 @@ module lab_06_tb_data_mem;
|
||||
|
||||
int err_cnt = 0;
|
||||
|
||||
static bit simulation_finished;
|
||||
|
||||
data_mem DUT (.*);
|
||||
|
||||
task read_request(input logic [31:0] address, output logic [31:0] data);
|
||||
@@ -173,8 +171,10 @@ module lab_06_tb_data_mem;
|
||||
random_test();
|
||||
|
||||
$display("\nTest has been finished\nNumber of errors: %d\n", err_cnt);
|
||||
simulation_finished = 1;
|
||||
$finish;
|
||||
#5;
|
||||
$display("You're trying to run simulation that has finished. Aborting simulation.")
|
||||
$fatal();
|
||||
end
|
||||
|
||||
logic [31:0] ram_data;
|
||||
@@ -275,13 +275,6 @@ module lab_06_tb_data_mem;
|
||||
$display("Error at %t. ram[%d][31:24] is unstable without write request", $time(), $sampled(addr_reg));
|
||||
end
|
||||
|
||||
|
||||
always @(posedge clk_i) begin
|
||||
if(simulation_finished) begin
|
||||
$finish;
|
||||
end
|
||||
end
|
||||
|
||||
always @(posedge clk_i) begin
|
||||
if (err_cnt >= 10) begin
|
||||
$display("\nTest has been stopped after 10 errors"); $stop();
|
||||
|
Reference in New Issue
Block a user