@@ -21,10 +21,8 @@ or tb_ext_integer_vector.vhd
2121#include <stdio.h>
2222#include <stdlib.h>
2323#include <stdint.h>
24+ #include "vhpidirect_user.h"
2425
25- extern int ghdl_main (int argc , char * * argv );
26-
27- uint8_t * D [1 ];
2826const uint32_t length = 5 ;
2927
3028/*
@@ -34,7 +32,7 @@ const uint32_t length = 5;
3432 [2/3, 3/3), while incrementing each value by two.
3533*/
3634static void exit_handler (void ) {
37- uint i , j , z , k ;
35+ unsigned i , j , z , k ;
3836 TYPE expected , got ;
3937 k = 0 ;
4038 for (j = 0 ; j < 3 ; j ++ ) {
@@ -80,43 +78,3 @@ int main(int argc, char **argv) {
8078 // Start the simulation
8179 return ghdl_main (argc , argv );
8280}
83-
84- // External string/byte_vector through access (mode = extacc)
85-
86- void set_string_ptr (uint8_t id , uint8_t * p ) {
87- D [id ] = p ;
88- }
89-
90- uintptr_t get_string_ptr (uint8_t id ) {
91- return (uintptr_t )D [id ];
92- }
93-
94- // External string/byte_vector through functions (mode = extfnc)
95-
96- void write_char (uint8_t id , uint32_t i , uint8_t v ) {
97- D [id ][i ] = v ;
98- }
99-
100- uint8_t read_char (uint8_t id , uint32_t i ) {
101- return D [id ][i ];
102- }
103-
104- // External integer_vector through access (mode = extacc)
105-
106- void set_intvec_ptr (uint8_t id , uintptr_t * p ) {
107- D [id ] = (uint8_t * )p ;
108- }
109-
110- uintptr_t get_intvec_ptr (uint8_t id ) {
111- return (uintptr_t )D [id ];
112- }
113-
114- // External integer_vector through functions (mode = extfnc)
115-
116- void write_integer (uint8_t id , uint32_t i , int32_t v ) {
117- ((int32_t * )D [id ])[i ] = v ;
118- }
119-
120- int32_t read_integer (uint8_t id , uint32_t i ) {
121- return ((int32_t * )D [id ])[i ];
122- }
0 commit comments