刚开始学习 HLS 和 XSDk。目前我正在使用数字系列。
N
我的目标是按顺序打印Tera 终端中的时间序列。在编译程序代码时,它只返回最后一个值。
我的代码:
void Numberseries1(ap_uint<32> seed, ap_uint<32> &dout) {
static ap_uint<32> reg[15];
int result=1;
int i;
for(i=0; i < 15;i++) if (result<seed) {
result *= 2; reg[i] =result; dout= reg[i];
}
}
例如:N=10
,它只返回值1024
。而不是预期结果:16,32,64,128,256,512,1024,
我需要做什么才能让“数字系列”16,32,64,128,256,512,1024
在 Tera 终端中按顺序打印。