Skip to content

Commit 4443905

Browse files
committed
fix(examples/vhdl/array_axis_vcs): add stubs.c
1 parent cf6804d commit 4443905

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

examples/vhdl/array_axis_vcs/run.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@
2222

2323
# vu.set_sim_option('modelsim.init_files.after_load',['runall_addwave.do'])
2424

25+
c_nobj = join(root, 'src', 'test', 'stubs.o')
2526
c_obj = join(root, 'src', 'test', 'main.o')
27+
print(os.popen('gcc -fPIC -rdynamic -c '+join(root, 'src/**/stubs.c')+' -o '+c_nobj).read())
2628
print(os.popen('gcc -fPIC -rdynamic -c '+join(root, 'src/**/main.c')+' -o '+c_obj).read())
2729

30+
for tb in lib.get_test_benches(pattern='*tb_py_*', allow_empty=False):
31+
tb.set_objects([c_nobj])
32+
2833
for tb in lib.get_test_benches(pattern='*tb_c_*', allow_empty=False):
2934
tb.set_objects([c_obj])
3035

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
#include <stdint.h>
4+
5+
void write_byte ( uint8_t id, uint32_t i, uint8_t v ) {
6+
printf("ERROR write_byte: THIS IS A STUB\n");
7+
exit(1);
8+
}
9+
10+
uint8_t read_byte ( uint8_t id, uint32_t i ) {
11+
printf("ERROR read_byte: THIS IS A STUB\n");
12+
exit(1);
13+
return 0;
14+
}

0 commit comments

Comments
 (0)