cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
s002wjhw
Voyager
Voyager
1,416 Views
Registered: ‎06-26-2015

read input file for HLS

Jump to solution

got a @E Simulation failed: SIGSEGV error.  any ideas? try to read a input .txt file as input

using 2017.2 version

#include "ap_cint.h"

int main () {

  FILE * pFile;
  char path[] = "e:/input_test.txt";
  int n;
    pFile = fopen( path,"r");
    int16 data[300];
 
    n=0;
    while(fscanf (pFile, "%d", &data[n]) != EOF)
     {
        n++;
     }

    for(n=0; n<20; n++){
     printf("data[%d]=%d \n",n,data[n]);
    }

}

0 Kudos
1 Solution

Accepted Solutions
s002wjhw
Voyager
Voyager
1,406 Views
Registered: ‎06-26-2015
NVM wrote the input file too big

View solution in original post

0 Kudos
1 Reply
s002wjhw
Voyager
Voyager
1,407 Views
Registered: ‎06-26-2015
NVM wrote the input file too big

View solution in original post

0 Kudos