| |||
| Home > Behavioral Modules > Tube > Function and operation of module |
The tube module is used to perform program message and simulation termination control. It acts as a one-way communications port through which ASCII information can be passed.
Messages are written, one byte at a time, to the tube model
location. In the default system this is address range 0x2000 0000 to 0x2FFF FFFF,
detected by the model using the external enable XCSN[2].
These bytes are buffered until a terminating control character is
written to the tube, or the buffer overflows (default buffer length
is 80 characters). The message is then printed by the simulator,
and written to the output text file. An example message is:
# ** Note: TUBE: Hard Reset
In this example the message Hard Reset has
been passed to the tube. The program running on the microcontroller
can also terminate simulation by writing a control character to
the tube with no message to produce the following assertion:
# ** Failure: TUBE: Program exit
All user messages sent to the simulator display are also recorded in the output text file.
The tube module only accepts the ASCII control characters shown in Table 6.11.
Table 6.11. Valid tube ASCII control characters
ASCII character | Decimal value | Tube function |
|---|---|---|
Control D (^D) | 04 | Exit test |
Linefeed | 10 | Print output |
Carriage return | 13 | Print output |
Other standard alphanumeric characters will be stored in the buffer until displayed. The values for commonly used display characters are shown in Table 6.12.