Implemented Task Add in c an vhdl. Still testing
This commit is contained in:
@@ -3,8 +3,18 @@
|
||||
#include "system/float_word.h"
|
||||
|
||||
int task_add_run( void * task ) {
|
||||
add_config* taskConfig = (add_config*) task;
|
||||
|
||||
// TODO
|
||||
for(uint32_t i = 0; i < DATA_CHANNEL_DEPTH; ++i) {
|
||||
float chnl1, chnl2;
|
||||
data_channel_read(taskConfig->sources[0], (uint32_t*) &chnl1);
|
||||
data_channel_read(taskConfig->sources[1], (uint32_t*) &chnl2);
|
||||
|
||||
float_word result;
|
||||
result.value = chnl1 + chnl2;
|
||||
|
||||
data_channel_write(taskConfig->sink, result.word);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user