+ Post New Thread
Results 1 to 1 of 1
  1. #1
    Newbie level 3
    Points: 65, Level: 1

    Join Date
    Apr 2017
    Posts
    4
    Helped
    0 / 0
    Points
    65
    Level
    1

    Error occuring in Vivado HLS 2015.4 while Synthesizing the program

    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;
    }
    Last edited by BradtheRad; 15th April 2017 at 06:24. Reason: Added code formatted window

    •   Alt15th April 2017, 05:35

      advertising

        
       

--[[ ]]--