soft terminal

TERMINAL - Operational Overview
Modified by on 6-Nov-2013
Once the design is processed and downloaded into the physical FPGA device, the instrument can be
used. Displays and controls for the instrument can be found on the device's associated instrument
panel. This panel enables you to effectively use the instrument in your design.
The following sections detail initialization of the instrument, how the associated instrument panel is
accessed, and subsequent use of the panel to send and receive text to/from the processor.
Initialization
After an external reset, you will need to initialize the Terminal module. This is a very simple procedure
that involves:
●
●
Writing to the Interrupt Control register and setting the txempty (INTCTRL.1) and rxnempty
(INTCTRL.5) bits, thereby enabling interrupts.
Writing 22h to the address for the Interrupt Status register, to ensure that the interrupt-generating
txempty and rxnempty flags in the Status register (STATUS.1 and STATUS.5 respectively) are
cleared. The txshempty flag (STATUS.3) which is initially set to '1' on reset will also be cleared by
this write.
Accessing the TERMINAL Device's Instrument Panel
The host computer is connected to the target Terminal module using the IEEE 1149.1 (JTAG) standard
interface. This is the physical interface, providing connection to physical pins of the FPGA device in
which the instrument has been embedded.
The Nexus 5001 standard is used as the protocol for communications between the host and all
devices that are debug-enabled with respect to this protocol. This includes the Terminal module, as
well as other Nexus-compliant devices such as debug-enabled processors, frequency generators, logic
analyzers, counters and digital I/O modules.
All such devices are connected in a chain – the Soft Devices chain – which is determined when the
design has been implemented within the target FPGA device and presents within the Devices view
(Figure 1). It is not a physical chain, in the sense that you can see no external wiring – the
connections required between the Nexus-enabled devices are made internal to the FPGA itself.
Figure 1. Nexus-enabled devices appearing in the Soft Devices chain.
The controls for a Terminal module used in a design can be accessed from the Devices view. Simply
double-click on the icon representing the TERMINAL instrument whose controls you wish to access, in
the Soft Devices region of the view. The Instrument Rack - Soft Devices panel will appear, with the
chosen instrument added to the rack (Figure 2).
Figure 2. Accessing the Terminal module's instrument panel.
Each TERMINAL instrument that you have included in the design will appear, when double-clicked, as
an instrument in the rack (along with any other Nexus-enabled devices).
Sending and Receiving Text
After an external reset, the instrument is effectively ready for use straight away. See the previous
section on Initialization for setting up the instrument's interrupt generation capabilities.
If data is available in the Transmit Buffer (sent from the processor), the instrument will start sending it,
via the Soft JTAG Chain, for display in the instrument panel. Figure 3 illustrates an example of
displayed text. The text itself was typed on a remote PS/2 keyboard attached to a NanoBoard. The
processor, having obtained the textual data using an intermediate PS2_W Controller, has then sent
out this text to the connected Terminal module.
Figure 3. Example text sent from the processor and displayed in the Terminal module's instrument panel.
If text is typed directly into the instrument panel, the Receiver will automatically start receiving it, via
the Soft JTAG Chain, to be subsequently read by the processor. Figure 4 illustrates an example of
locally-typed text, destined to be read and processed by the embedded software code running on the
target processor.
Figure 4. Example text entered directly into the Terminal module's instrument panel.
Text can be sent and received concurrently (i.e. the Terminal module is Full Duplex by nature).
Unlike the WB_UART8 component, the Baud Rate is not user definable for the Terminal module.
Instead, the instrument operates at maximum possible speed, dependent on the transmission
medium used for the JTAG link between the NanoBoard and the PC. This operational speed can vary
considerably. For example, the maximum Baud Rate using a USB connection can be in the range
2000 – 2200 Baud. For a parallel port connection, this can be as high as 7000 Baud.
Additional Panel Functions
The instrument panel for the TERMINAL device provides several additional functions related to the
text currently displayed. These features are summarized in the following sections.
Copying Text
The panel allows you to copy text to the clipboard. To do so, simply drag to highlight the text you wish
to copy. A menu will appear, giving you the option to copy to the clipboard (Figure 5).
Figure 5. Copying highlighted text to the clipboard.
Saving Text
Should you wish to save the currently displayed text, you can do so. The panel enables you to save its
content in a log file. Simply click on the Save To File button at the bottom left of the panel. The
Choose File To Save Terminal Log dialog will appear, from where you can nominate where, and under
what name, the resulting log file (*.log) is saved. Figure 6 illustrates an example generated log file.
Figure 6. Saving all text to a designated log file.
Clearing Text
To clear all current text from the panel, simply click on the Clear button at the bottom left of the
panel. All text will be cleared and the text cursor will be repositioned at the top left corner of the text
window.
Source URL: http://techdocs.altium.com/display/FPGA/TERMINAL+-+Operational+Overview#comment-0
Download PDF