请帮我^ ^
回答:
一个正常的信道端设置并关闭,每一次数据传输的连接。
此外,一个Streaming chanend 设置了连接,并且该函数的范围内保持其打开。
这是一个有点像分组交换与电路交换。这意味着streaming chan速度更快(虽然两者都是相当快),由于没有建立密切的开销,但它占据的路径通过开关。这在一个单一的tile不是一个问题,你只受限于chanends,但在双tile的系统,你通常只能从tile与tile中得到4条路径,所以streaming channels应小心翼翼的通过tile使用。DJ kit采用单一的tile,所以streaming chan的使用是好的。
该协议是不同的,所以你不能混用streaming/no streaming channel渠道终端类型。
一个通道是由两端和中间的连接。编译器需要照顾的细节,但该位在发送/接收是在chanend功能.
回复:
#include <xccompat.h>
#define streaming
extern void dsp_biquad(streaming chanend c_dsp,S32_T biquad_id);
...
int main()
{
chan c_mix_out;
streaming chanend c_dsp;
on tile[AUDIO_IO_CORE]:
{
thread_speed();
audio(c_mix_out, null, null, c_adc);
}
on tile[AUDIO_IO_CORE]:
{
thread_speed();
dsp_biquad(c_dsp,0);
}
...
}
但是编译器提供了以下错误:1. local variable `c_dsp' has type chanend
2. only local variables of type chan allowed in a multi-tile main
如何解决这些问题呢?
回答:
您不能声明chanend - 只有chan..
因此,更换为
streaming chanend c_dsp;
通过streaming chan c_dsp;