I wrote C++ Program to sum two numbers. During the Simulation I got correct result but in synthesis.Solution1/.autopilot/db/Adder.pragma.1.cpp:1, error. Please let me know, why I am getting that error message during Synthesis.
Asked
Active
Viewed 1,025 times
1 Answers
0
Post some code!! However, follow the tutorial: you cannot synthesize for a lot of different reasons: it seems that the pragmas (used to define the interfaces of your RTL block) are not defined!! Use this link page 63, chapter 4: Interface Synthesis
Update 16/03/2017 11h55:
Please use this code:
void adders(int inA, int inB, int sumAB)
{
#pragma HLS INTERFACE s_axilite port=inA
#pragma HLS INTERFACE s_axilite port=inB
#pragma HLS INTERFACE s_axilite port=sumAB
sumAB = inA + inB; }
It will synthesize correctly:

Leos313
- 5,152
- 6
- 40
- 69
-
#include "Adder.h" void adders(in1_t inA, in2_t inB, out_t sumAB) { #pragma HLS INTERFACE ap_ctrl_none port=return // Prevent IO protocols on all input ports #pragma HLS INTERFACE ap_none port=in3 #pragma HLS INTERFACE ap_none port=in2 #pragma HLS INTERFACE ap_none port=in1 sumAB = inA + inB; } – Saras Mar 16 '17 at 10:26
-
you can find an update on the previous answer. **Please accept the answer if it was helpful** – Leos313 Mar 16 '17 at 10:56
-
No, for me it is not working. Header file #ifndef ADDERS_H_ #define ADDERS_H_ #include
#include – Saras Mar 16 '17 at 12:17#include #include #include using namespace std; // Types and top-level function prototype //int adders(int in1, int in2, int in3); #include "ap_int.h" typedef ap_int<8> in1_t; typedef ap_int<8> in2_t; typedef ap_int<8> out_t; void Adder(in1_t inA, in2_t inB, out_t sumAB); #endif -
Test bench code ; #include
#include "ap_int.h" #include "Adder.h" int main() { in1_t inA; in2_t inB; out_t sumAB; inA=15; inB=15; sumAB = inA + inB; Adder(inA, inB, sumAB); cout << "A = "<< inA; printf("\n"); cout << "B = " << inB; printf("\n"); cout << "SUM = "<< sumAB; printf("\n"); } Error: The top function "Adder"has no output. Possible causes are 1. Output parameters are passed by value 2. intended outputs (parameters or global variables) are never written – Saras Mar 16 '17 at 12:17 -
Accept the edit and add the code in the question in the correct form, please. – Leos313 Mar 16 '17 at 12:45
-
No, it is not working. Showing Error during syntheis: top function "Adder"has no output. Possible causes 1. Output parameters are passed by value 2. intended outputs (parameters or global variables) are never written Header file #ifndef ADDERS_H_ #define ADDERS_H_ #include
#include – Saras Mar 17 '17 at 04:40#include #include #include using namespace std; int adders(int in1, int in2, int in3); #include "ap_int.h" typedef ap_int<8> in1_t; typedef ap_int<8> in2_t; typedef ap_int<8> out_t; void Adder(in1_t inA, in2_t inB, out_t sumAB); #endif -
Ok: write a new question with ALL THE FILES used in the project. I will answer with the same file's re- written in the right way – Leos313 Mar 17 '17 at 05:56