File tree Expand file tree Collapse file tree
examples/vhdl/array_axis_vcs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323# vu.set_sim_option('modelsim.init_files.after_load',['runall_addwave.do'])
2424
25+ c_nobj = join (root , 'src/test/stubs.o' )
26+ print (os .popen ('gcc -fPIC -rdynamic -c ' + join (root , 'src/**/stubs.c' )+ ' -o ' + c_nobj ).read ())
27+
28+ vu .set_sim_option ("ghdl.elab_flags" , ["-Wl," + c_nobj ])
29+
2530c_obj = join (root , 'src/test/main.o' )
2631# This can be executed externally, should C sources be more complex than a single file.
2732print (os .popen ('gcc -fPIC -rdynamic -c ' + join (root , 'src/**/*.c' )+ ' -o ' + c_obj ).read ())
Original file line number Diff line number Diff line change 1+ #include <stdio.h>
2+ #include <stdlib.h>
3+ #include <stdint.h>
4+
5+ // get_param is used by GHDL to retrieve parameter values (integers).
6+ uint32_t get_param (uint32_t w ) {
7+ printf ("ERROR get_param: THIS IS A STUB\n" );
8+ exit (1 );
9+ return 0 ;
10+ }
11+
12+ // get_param is used by GHDL to retrieve pointers to the base addresses of the buffers.
13+ uintptr_t get_addr (uint32_t w ) {
14+ printf ("ERROR get_addr: THIS IS A STUB\n" );
15+ exit (1 );
16+ return (uintptr_t )NULL ;
17+ }
You can’t perform that action at this time.
0 commit comments