UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor runrun
Visitor
247 Views
Registered: ‎08-22-2019

Vivado 2019.1 error : when run $finish through task

Jump to solution

Current I turn to use Vivado 2019.1

The simulation hang at $finish. This testbench would run successfully in old version e.g. 2018.1 and 2018.2

 

Because the simulation will end with 2-3 situations, I use "task" to do some end process to prevent repeat write code for ending. Below is example

initial begin
...
...
...
   $display("simulation end"):
   sim_end;
end

task sim_end;
begin
   $fclose(file_ptr1);
   $fclose(file_ptr2);
   $finish;
end
endtask

 

When simulation run to $finish, Vivado pop-up an warning window :

err1.png

Vivado will hang ==> at bottom keep loading at "Current time : 79292ns ..." ==> cannot press "cancel"

 

If I press "OK" in pop-up window, another window pop-up

err2.png

When "OK", it back to 1st warning window.  It is looping between 2 warning windows, if I just press "OK".

 

Finally, I found I need click "X" in warning windows.  Then simulation would stop successfull.

run: Time (s): cpu = 00:04:47 ; elapsed = 00:03:30 . Memory (MB): peak = 7932.930 ; gain = 0.000 ; free physical = 39796 ; free virtual = 126806
xsim: Time (s): cpu = 00:05:02 ; elapsed = 00:03:37 . Memory (MB): peak = 7932.930 ; gain = 0.000 ; free physical = 39796 ; free virtual = 126806
INFO: [USF-XSim-96] XSim completed. Design snapshot 'test_dl_behav' loaded.
INFO: [USF-XSim-97] XSim simulation ran for 100ms
launch_simulation: Time (s): cpu = 00:05:12 ; elapsed = 00:03:47 . Memory (MB): peak = 7932.930 ; gain = 0.000 ; free physical = 39796 ; free virtual = 126806

 

 

I don't know why it try to open something, I don't have any open file or read in task.

For testing I comment all code in task and only keep $finish.  The problem still appear.

task sim_end;
begin
// $fclose(file_ptr1);
// $fclose(file_ptr2);
   $finish;
end
endtask

 

 

Finally, I found move the "ending process code" out of task, the problem disappear.

initial begin
...
...
...
   $display("simulation end"):
   $fclose(file_ptr1);
   $fclose(file_ptr2);
   $finish;
   sim_end;
end


task sim_end;
begin
   $fclose(file_ptr1);
   $fclose(file_ptr2);
   $finish;
end
endtask

 

 

In my testcase, there are 2-3 situations the simulation will stop.  I don't want repeatly write "end processing code" 2-3 times.

How to solve it, I think it is problem of 2019.1.

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
150 Views
Registered: ‎05-31-2017

Re: Vivado 2019.1 error : when run $finish through task

Jump to solution

Hi @runrun ,

This is a known issue and a CR is already in place for this issue. The only way to overcome this is to clicking on X to dismiss the dialog box and repeat until the dialog box goes away.

View solution in original post

0 Kudos
2 Replies
Visitor runrun
Visitor
166 Views
Registered: ‎08-22-2019

Re: Vivado 2019.1 error : when run $finish through task

Jump to solution

Anyone would help?

I google longtime and still cannot find the solution.

0 Kudos
Moderator
Moderator
151 Views
Registered: ‎05-31-2017

Re: Vivado 2019.1 error : when run $finish through task

Jump to solution

Hi @runrun ,

This is a known issue and a CR is already in place for this issue. The only way to overcome this is to clicking on X to dismiss the dialog box and repeat until the dialog box goes away.

View solution in original post

0 Kudos