Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error occuring in Vivado HLS 2015.4 while Synthesizing the program

Status
Not open for further replies.

Thaus

Newbie level 3
Newbie level 3
Joined
Apr 11, 2017
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
66
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;
}

 

Attachments

  • Error Code.PNG
    Error Code.PNG
    36.8 KB · Views: 118
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top