Hi Ralph,
Thank you for your reply.
I use co_memory, not co_stream, as CoValidator HDL Testbench Generator can't create testbench with co_memory.
Here is my code in HW process.
CODE
void edge_detect(co_memory shared_mem, co_memory memory_sum, co_memory memory_sqsum, co_signal data_ready, co_signal data_done)
{
int32 i,signal_data;
unsigned char *data_in;
int *data_sum, *data_sqsum;
#ifdef MONITOR
IF_SIM(cosim_logwindow log;)
IF_SIM(log = cosim_logwindow_create("edge_detect");)
#endif
co_signal_wait(data_ready, &signal_data);
data_in = co_memory_ptr(shared_mem);
data_sum = co_memory_ptr(memory_sum);
data_sqsum = co_memory_ptr(memory_sqsum);
for(i=0; i<NUMBER_DATA; i++)
{
data_sum[i] = data_in[i];
data_sqsum[i] = data_in[i]*data_in[i];
}
co_signal_post(data_done,25);
}
other code works well even after generating HDLs, but after I just changed my HW process to the above, it does'nt work, can you please diagnose the hardware design?
Another question, for example I have 3 processes, named A, B, C. The sequence must be A->B->C.
because of some reasons, process B can't implemented using HW, but process A & C can implemented using HW.
so if process A and C are HW process, and B is a SW process, Can Impulse C do it? If it can ,how?
A(sw)->B(sw)->C(sw) Impulse C can
A(hw)->B(hw)->C(hw) Impulse C can
A(hw)->B(sw)->C(hw) Impulse C can??