6.5.3. 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 0x20000000 to 0x2FFFFFFF, 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 are stored in the buffer until displayed. The values for commonly used display characters are shown in Table 6.12.

Table 6.12. Commonly used ASCII alphanumeric characters

ASCII

character

Decimal

value

0-9

48-57

a-z

97-122

A-Z

65-90

space

32

_

95

#

35

Copyright © 2001 ARM Limited. All rights reserved.ARM DDI 0226A
Non-Confidential