A single VHDL character
value is represented in C/C++ as a single byte. VHDL character
values are exactly identical to C/C++ char
literals and are also equal to their ASCII numeric values. For example, the VHDL character value 'm
’ is equivalent to the C/C++ char
literal 'm
’ or decimal value 109.
Example code:
// Put a 'T' on signal "myChar," where "myChar" is defined as
// signal myChar : character;
const char tVal = 'T';
int myChar = loader.get_port_number("myChar");
loader.put_value(myChar, &tVal);