Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎07-13-2020

Cosim fails to open file (limit on the number of ports in Vivado 2019.2?)

I have attached a very simple test which deliberately yields a lot of RTL ports if the number of entries in the array is large:

void testFunction(int array[entries]) {
#pragma HLS array_partition variable=array complete dim=0
  for (int i = 0; i < entries; i++) {
    array[i] += 1;

Even if it passes csim and synthesises in Vivado 2019.2 (and Vivado 2020.1), I get the following error during cosimulation before it crashes, if my array contains more than 508 entries:

## run all
WARNING: file ../tv/cdatafile/c.testFunction.autotvin_array_508.dat could not be opened
Failed to open file "../tv/cdatafile/c.testFunction.autotvin_array_508.dat"!
ERROR: Simulation using HLS TB failed.
$finish called at time : 110 ns : File "/test/test/solution1/sim/verilog/testFunction.autotb.v" Line 63135
## quit

The file that causes the Warning/Error is generated by the software, but it is completely empty. Note that if I run the same test using Vivado 2019.1, everything works fine, and the c.testFunction.autotvin_array_508_V.dat file now contains:

[[transaction]] 0

Playing around with my test, I can't seem to go above ~1530 RTL ports in Vivado 2019.2 without getting the same error, which makes me wonder if there is a limit on the number of ports? If not, what is causing this issue and is it supposed to be like this?

1 Reply
Registered: ‎07-13-2020

Apparently there's a OS limitation of the number of files that can be open at the same time, and for some reason the number of files that are opened have changed between the Vivado HLS versions. To work around the issue, one can simply increase the number of file that can be open at the same time, e.g. in Linux bash

ulimit -Sn <number of open files>

0 Kudos