+ 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

    [syntax=c] #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[/syntax]

    SOURCE CODE

    [syntax=c]#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;
    }
    [/syntax]



    TEST CODE

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

    •   Alt15th April 2017, 05:35

      advertising

        
       

--[[ ]]--