diff --git a/system/main.c b/system/main.c index 75d00873da..15332f571d 100644 --- a/system/main.c +++ b/system/main.c @@ -132,7 +132,8 @@ int main(int argc, char **argv) for (int j = 0; j < num_tasks; j++) { // from the "global input" i, extract the input bits for the task j - task_inputs[j] = i & ((input_size - 1) << (j * __builtin_popcount(input_size - 1))); + task_inputs[j] = (i >> (j * (__builtin_popcount(input_size - 1) ))) & (input_size - 1); + printf("Task %d: %d\n", j, task_inputs[j]); } // load the system in the halted state at the beginning of the task; Write input to register @@ -187,7 +188,7 @@ int main(int argc, char **argv) inputs[i] = i; deltas[i] = end_count - start_count; - // printf("Delta: %lu\n", deltas[i]); + printf("Delta: %lu\n", deltas[i]); } // // Write to serial port