Implemented Task Add in c an vhdl. Still testing

This commit is contained in:
schoeffelbe82781
2024-11-13 09:58:47 +01:00
parent 0d1b73e3e0
commit 344619c957
2 changed files with 80 additions and 12 deletions
+11 -1
View File
@@ -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;
}