Simulation process done without 0 error, but showing error during synthesis. I am unable to find the error. please point out me what wrong i did.
I am getting an error like this in HLS tool during synthesis "In File included from E:/thaus/fact_L/facoriall/solution1/.autopilot/db/fact.pragma.1.cpp:1"
Please find the attachment.
HEADER FILE
Code C - [expand ] 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef FACTORIAL_H_
#define FACTORIAL_H_
#include <cmath>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdlib>
using namespace std;
#include "factorial.h"
#include "ap_int.h"
typedef ap_int< 128 > in1_t;
typedef ap_int< 1024 > out_t;
int factorial( in1_t N) ;
#endif
SOURCE CODE
Code C - [expand ] 1
2
3
4
5
6
7
8
9
10
11
12
13
#include "factorial.h"
int factorial( in1_t N)
{
#pragma HLS INTERFACE s_axilite port=N bundle=a
#pragma HLS INTERFACE s_axilite port=return bundle=a
int i;
out_t fact = 1 ;
for ( i= 1 ; i<= N; i++ )
{
fact = fact* i;
}
return fact;
}
TEST CODE
Code C - [expand ] 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <stdlib.h>
#include "ap_int.h"
#include "factorial.h"
int main( )
{
in1_t N = 30 ;
out_t fact;
int i;
fact= 1 ;
factorial( N, fact) ;
for ( i= 1 ; i<= N; i++ )
{
fact = fact* i;
}
cout << "cout of fact: " << fact;
}
Error Code.PNG
36.8 KB · Views: 100
Last edited by a moderator: Apr 15, 2017