0
いいえ、私にとっては機能しません。合成中にエラーが表示されています。先頭の機能Adder
には出力がありません。考えられる原因は次のとおりですVIVADO HLS合成エラー
- 出力パラメータが
ヘッダファイル
#ifndef ADDERS_H_
#define ADDERS_H_
#include <cmath>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdlib>
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
テストベンチコード
を書かされることはありません値#include <stdio.h>
#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");
}
コンテンツを貼り付ける際に、Stackoverflowの書式に従うのが難しい。 – Saras
加算器には戻り値の型が 'void'です。 AをBに追加しようとしていますか? int Adder(int a、int b){return a + b;} –
ご回答ありがとうございます。私の誤りを指摘している場所。私は理解できません。はい、私はVIVADO HLS 2014を使用して2つの数字を追加しています。3.1 – Saras