void config_function(void * arg) { co_process test_function_three_proc, function_three_proc, stub_function_three_proc; co_stream stream_test_function = co_stream_create("stream_test_function", INT_TYPE(32), 8); co_stream stream_stub_test = co_stream_create("stream_stub_test", INT_TYPE(32), 8); co_stream stream_function_stub = co_stream_create("stream_function_stub", INT_TYPE(32), 8); test_function_three_proc = co_process_create("test_function_three", (co_function)test_function_three, 2, stream_stub_test, stream_test_function); function_three_proc = co_process_create("function_three", (co_function)function_three, 2, stream_test_function, stream_function_stub); stub_function_three_proc = co_process_create("stub_function_three", (co_function)stub_function_three, 2, stream_function_stub, stream_stub_test); co_process_config(function_three_proc, co_loc, "PE0"); co_process_config(stub_function_three_proc, co_loc, "PE0"); }
// // Impulse C configuration function // void config_BubbleSort(void *arg) { co_stream input; co_stream output; co_process Sorter_process; co_process producer_process; co_process consumer_process; input = co_stream_create("input", INT_TYPE(STREAMWIDTH), STREAMDEPTH); output = co_stream_create("output", INT_TYPE(STREAMWIDTH), STREAMDEPTH); producer_process = co_process_create("Producer", (co_function)Producer, 1, input); Sorter_process = co_process_create("Sorter", (co_function)Sorter, 2, input, output); consumer_process = co_process_create("Consumer",(co_function)Consumer, 1, output); co_process_config(Sorter_process, co_loc, "pe0"); }
void config_hello(void * arg) { co_process my_function_proc, my_test_function_proc; co_stream stream_in = co_stream_create("stream_in", INT_TYPE(32), 8); co_stream stream_out = co_stream_create("stream_out", INT_TYPE(32), 8); my_function_proc = co_process_create("my_function", (co_function)my_function, 2, stream_in, stream_out); my_test_function_proc = co_process_create("my_test_function", (co_function)my_test_function, 2, stream_out, stream_in); co_process_config(my_function_proc, co_loc, "PE0"); }
co_architecture co_initialize(void *arg) { co_stream input; co_stream output; input=co_stream_create("input",INT_TYPE(32),1024); output=co_stream_create("output",INT_TYPE(32),1024); co_process_create("Producer",(co_function)Producer, 1, input); co_process_create("Consumer",(co_function)Consumer, 1, output); /* Architecture Initialization */ co_stream_attach(input,XPAR_PLB_BUBBLESORT_ARCH_0_BASEADDR+0,HW_INPUT); co_stream_attach(output,XPAR_PLB_BUBBLESORT_ARCH_0_BASEADDR+16,HW_OUTPUT); return(NULL); }
void config_function(void * arg) { co_process test_function_five_proc, function_five_proc, stub_function_five_proc; co_stream stream_test_function1 = co_stream_create("stream_test_function1", INT_TYPE(32), 8); co_stream stream_test_function2 = co_stream_create("stream_test_function2", INT_TYPE(32), 8); co_stream stream_test_function3 = co_stream_create("stream_test_function3", INT_TYPE(32), 8); co_stream stream_stub_test = co_stream_create("stream_stub_test", INT_TYPE(32), 8); co_stream stream_function_stub1 = co_stream_create("stream_function_stub1", INT_TYPE(32), 8); co_stream stream_function_stub2 = co_stream_create("stream_function_stub2", INT_TYPE(32), 8); test_function_five_proc = co_process_create("test_function_five", (co_function)test_function_five, 4, stream_stub_test, stream_test_function1, stream_test_function2, stream_test_function3); function_five_proc = co_process_create("function_five", (co_function)function_five, 5, stream_test_function1, stream_test_function2, stream_test_function3, stream_function_stub1, stream_function_stub2); stub_function_five_proc = co_process_create("stub_function_five", (co_function)stub_function_five, 3, stream_function_stub1, stream_function_stub2, stream_stub_test); co_process_config(function_five_proc, co_loc, "PE0"); co_process_config(stub_function_five_proc, co_loc, "PE0"); }