[Contents] [Prev: 3 Common User Interface] [Next: 5 Logic Engine Assembler (LEASMB)]
The LE Panel tool is used to display information from the LE board on the PC screen and to send information from the PC keyboard to the LE board. It is in effect a virtual display which serves the same purpose as the lights, switches, and push buttons on the LE board, but which offers a more powerful interface. Signals wired to the lights, switches and push buttons of the LE board can be grouped and displayed in a number of formats. Signals wired from the switches and push buttons can be controlled from the PC. This capability allows the user to interact with the LE board entirely from the PC host. Displays can be constructed that are best suited to the current needs of the design. And since the display is easily reconfigured, the user can change the display as the need arises. Each configuration can be saved to disk to be retrieved at a later time.
The LE Panel tool has two major tasks. The first is to take user input from the keyboard and react to it. The second is to read information from the LE board and display it on the screen. This is accomplished by having one process for each task. The user input process takes all input from the user, manages all the menus and windows and sends information to the LE board. The panel update process reads information from the LE board and displays it in the proper format in the panel window.
The panel update process can operate in two modes: continuous update or user update. In continuous update mode the panel update process is continuously running and updating the display. This gives the panel the feel of the light panel on the LE board since the signal values are displayed almost instantaneously. The rate at which the display can be updated depends on the speed and load of the host processor. In user update mode the user requests all updates. Each request causes the panel update process to perform one update of the display and then become dormant. Although this mode may not be very useful while debugging, it is handy to be able to turn off the panel update process while doing other tasks on the computer.
The LE Panel tool can also control the operation of the clock on the LE board. When in run mode the clock is controlled from the LE board. Alternatively, the clock can be pulsed from the panel. This will turn the clock off if it was in run mode and issue a single pulse of the clock. When the clock is in run mode and running at a high rate, the panel update process may not be able to keep up with the changing signals and the values displayed may be invalid.
The main part of the LE panel display consists of 24 label fields, I/O field pairs. The label field of each pair is used to associate a name with a group of signals and the I/O field is used to display the group of signals in one of several formats. The I/O field can be configured to be an input field, in which case it is used to display the value of a group of switches or buttons from the LE board, or an output field, in which case it is used to display the value of a group of lights from the LE board. Input fields can also be configured to accept input from the user, thus overriding the physical switches and buttons on the LE board. The user input is then sent to the LE board in place of the switches and buttons.
From the perspective of the host, the switches and buttons behave identically and will both be referred to as switches. Associated with each switch is a register which can be written by the PC host. The output of each switch is connected to the output of its corresponding register. Normally, the output of the register is disabled and the output of the switch is enabled. The PC host can take control of the switches by disabling the output of the switches and enabling the output of the registers. In addition to the 28 registers associated with the switches, there are 4 hidden registers which are accessible from the PC host which do not have an associated switch or button.
In addition to the 24 label, I/O fields, the panel has 12 toggle input fields. Each can be mapped to one switch or button signal, creating a field that behaves like a toggle switch. Whenever one of these fields is selected it toggles the value of the signal to which it is mapped.
All communication between the LE board and the PC host is done over the parallel port. The LE board contains numerous registers to store data or to control the behavior of the board. All of these registers can be written or read. The LE Panel tool assumes that it is the only process that is writing to these registers, so when it puts the LE board in a certain mode of operation, it expects it to remain in that mode until otherwise instructed. If another process is also writing to the LE board, the LE Panel tool can get confused about the state of the LE board. It is always best to run only one application that accesses the LE board at a time.
When the LE Panel tool is opened, a window similar to figure should appear. In the upper left corner is the number assigned by DESQview to this window. To the right of the number is the title of the window. The LE Panel tool uses the window title to display the current file name. Whenever the current file name changes, for instance when a new configuration is loaded, the title of the window will change. The configuration shown in figure is simply an example. Upon startup, LE Panel loads its initial configuration from the file init.cfg.
Upon startup, the LE Panel tool first changes the current directory to the path indicated by the HOME environmental variable. If the variable is not set or the path does not exist, the current directory will be the directory from which the LE Panel tool was started (initially set to \le\config). It then tries to load the file init.cfg from the current directory. If this file does not exist a bell will sound. If after reading the mode of operation from init.cfg it is necessary to communicate with the LE board, it is first determined if the board is responding to requests. If so, the LE Panel is configured to that mode of operation. If not, the mode of operation is set to the default. For more information about configuration files and the various modes of operation, see sections 4.4 and 4.8.
The LE Panel window consists of five kinds of fields: Menu, Status, Label, I/O, and Switch fields. The purpose of each will be described in the following sections.
The status field is located in the upper right of the LE Panel window. The status field consists of four flags as illustrated in Fig. 2. The File Modified flag indicates whether the configuration of the panel has been modified since the last save or load. If the file has been modified an asterisk (*) will be displayed for this flag. The remaining three flags indicate the current mode of operation. The Input Source flag indicates whether input to the LE board comes from the board or the LE Panel. If input comes from the LE Board, Board is displayed, otherwise Panel is displayed for this flag. The Update Status flag indicates the status of the panel update process. When the panel update process is running, Update is displayed for this flag. The Clock Status flag indicates the status of the clock on the LE board. If the clock is running, Clock is displayed for this flag.
There are five commands that change the mode of operation: Update Once, Update Continuous, Pulse Clock, Run Clock, and Input from Panel/Board. In addition, when a new configuration file is loaded with the Load File command, the mode of operation may change. For details on these commands see Section 4.10.
To change the mode of operation, the LE Panel tool must communicate
with the LE board.
Before doing this it first determines if the board is responding.
If so, the command is executed.
If not,
a message to that effect is displayed and the mode of operation
is changed to the default (input from board, panel update process
stopped, clock stopped).
To remove the displayed message, hit
the
The label and I/O fields are used to give a name
and a view to a group of signals.
An I/O field can be configured to be an input or output field.
An input field can be configured
to display any of up to 16 of the buttons or switches of the LE board.
These can be displayed in either hexadecimal, decimal, octal, or binary.
An output field can be configured to display
any of up to 16 of the lights of the LE board.
These can be displayed
in either hexadecimal, decimal, octal, binary, or symbolically.
An I/O field that has been configured as an input field is highlighted
while output fields are not.
When a label field is selected, a field definition
dialog box as shown in Fig.
will be opened.
The dialog box
indicates the current configuration of this label, I/O field pair.
From here the label field and its associated I/O field can be
reconfigured.
The field definition dialog box consists of five
sections: the label, I/O, display, and signal definition sections
along with the Done field.
Since this menu has a text input field,
the TAB key is used to move between fields.
Also, the
The label definition field is used to assign a name of up to 8
characters to this group of signals.
This name will be displayed
in the label field.
The only limitation is that a comma (`,')
cannot appear in the label.
The I/O definition section consists of 3 fields: off, input, and
output.
One of these can be selected to configure the I/O field
as either inactive, an input, or an output field.
The field that
is currently selected is highlighted.
The display definition section consists of 5 fields: hex, dec,
oct, bin, and sym.
These are used to configure the contents of
the I/O field to be displayed as either hexadecimal, decimal,
octal, binary, or symbolically. The field that is currently selected
is highlighted.
If the field is configured as an input field,
the sym field configures the I/O field to be displayed as binary.
The signal definition section is used to define which signals
are to be grouped and displayed in the I/O field.
Signals are
specified by their number (0-31 for input fields and 0-127 for
output fields); a group of signals is specified by a list of signal
numbers or signal ranges separated by commas and terminated with
a semi-colon.
A signal range is specified by two signal numbers separated by a
dash (`-'); it defines a list of signals beginning
with the first signal number in the pair and ending with the second
signal number of the pair.
These can be in either increasing or decreasing order.
For instance, the signal groups: 12-5;,
12,11,10-7,6,5;, and 12,11,10,9,8,7,6,5;
are equivalent.
Signal groups can consist of non-sequential signal
numbers and can contain replicated signal numbers.
For instance
the signal group: 1,13,9,5-7,6,1; is legal.
Signal groups can contain up to 16 signals.
Chapter 9. describes how
the lights, buttons, and switches are numbered on the LE board.
The Done field is used to accept the current configuration.
If there are no errors in the configuration the field definition
menu is closed.
If there are errors, a bell will sound and the
field definition menu will remain open.
At any time the
A signal group is interpreted as a binary number with the most
significant bit being the leftmost signal in the group and the
least significant bit being the rightmost.
Whenever an update
is done the value of all the signal groups are read from the LE
board, converted to their appropriate format and displayed in
the I/O field.
The I/O field is not changed after reconfiguration
until an update is completed.
The value displayed in an I/O field is right justified in the
field.
In the case of hexadecimal, decimal, and octal formats,
the letters `H', `D', and `O'
are displayed in the leftmost position
of the field respectively, to indicate the format of the display.
In the case of binary format, no indicator is displayed.
In the case of a symbolic display, a symbol of up to 8 characters
is displayed, followed by a four-digit hexadecimal number enclosed
in brackets, representing the value of the signal group.
If no symbol is mapped to the current value of the signal group, only
the hexadecimal value is displayed.
Upon closing a field definition menu configured as an output with
symbolic display, the user is prompted for the symbol map file name.
Section 4.9 discusses how to create mapping files for symbolic
display.
An I/O field that has been configured as an input
field operates in two different modes.
When input is being taken
from the LE board (board appears in the status field),
the input field will display a value from the switches and buttons
on the board.
If the input field is selected a bell will sound
and nothing will happen.
When input is being taken from the panel
(panel appears in the status field), the switches and buttons
are disabled and the switch register on the LE board is enabled.
The contents of this register is displayed in the input field.
Selecting the input field in this mode allows the user to modify
the contents of the switch register.
When selected, a field will
appear directly below the input field with the current value being
displayed.
A new value can be entered into this field and registered
upon hitting the enter key.
The new value is entered in the format
that the field is configured to display.
Note that the input
field is not changed until an update is completed.
There are 12 switch fields located along the bottom
of the LE Panel window.
Each of these is used to give a name
to a single switch or button signal on the LE board.
The Switch fields operate in two modes.
When input is being taken from the
LE board, the switch fields operate in field-definition mode.
If a switch field is selected in this mode, a field definition
menu is displayed as illustrated in Figure 4.
This menu has three
fields: the label definition field, the switch definition field,
and the done field.
The label definition field is used to give
a name of up to 5 characters to this signal.
The name will be displayed in the switch field.
The switch definition field is
used to define the switch that this field will control.
Switches are specified by their number (0-31).
The done field is used to
accept the current field definition.
When input is being taken from the panel, the switches and buttons
on the board are disabled, the switch register on the LE board
is enabled and the switch fields operate in toggle mode.
If a switch field is selected in this mode, the value of the switch
will be toggled on the LE board.
The current value of the switch
does not get displayed in the switch field.
If it is desired
to display the switch values, a label, I/O field can be used.
Any configuration of the panel can be saved to a
file for later retrieval.
When a configuration is saved, the
current configuration of all the label, I/O and switch fields
is written to a file along with the state of the status field.
When a file is retrieved, the configuration is restored to the
state it was in when saved.
It may not be possible to restore
the state of the status field if the LE board is not responding.
In this case a message will be displayed and the mode of operation
will be: input source - board, panel update process - stopped,
clock - stopped.
There are three commands that pertain to the saving
and retrieval of configuration files: Load File,
Save File, and
Save File As.
See Section 4.10 for details about these and
other commands.
In addition, the Exit command will prompt the
user whether to save a file that has been modified; if an output
field has been reconfigured to display its value symbolically,
the user will be prompted for the name of the symbol file to be
loaded.
Symbol files are used to define a symbol map to map
signal group values to symbolic names.
When an output field is
configured to display its value symbolically, the symbol map is
searched for the current value of the signal group.
If found,
the symbol corresponding to that value is displayed in the output
field.
Symbol files are simple text files that can be created
using any text editor.
The first line of the file must contain
the number (in decimal) of entries that follow.
The subsequent
lines contain one entry per line.
Each entry consists of a value
(in hexadecimal) followed by its corresponding symbol of up to
8 characters.
Below is a table of all the commands and menu selections
for the LE Panel tool.
The first column is the key stroke for the command.
The second
column contains the title of the menu that contains this command
as a selection.
The third column contains a description of the command.
This table can be viewed within the LE Panel tool by
selecting the help menu item or by hitting the F12
function key.
[Contents]
[Prev: 3 Common User Interface]
[Next: 5 Logic Engine Assembler (LEASMB)]
4.5 Label and I/O Fields
Figure 12. Label, I/O Field Definition Menu
4.6 Using Input Fields
4.7 Switch Fields
Figure 13. Switch Field Definition Menu
4.8 File I/O
4.9 Symbol Files
4.10 Key Bindings and Menu Selections
Key Stroke
Menu
Description
F1
Activate File Menu.
F2
Activate Display Menu.
F3
Activate Clock Menu.
F4
Activate Tools Menu.
F5
File
Load File:
The user is prompted for a configuration file to be loaded.
This file will become the new current file.
If the current configuration has been modified since the last save,
the user is prompted to save or abort the changes before loading
the new file.
The modification flag in the status field is cleared after the
new file is loaded.
F6
File
Save File:
The current configuration is saved into the current file and the
modification flag in the status field is cleared.
File
Save File As:
The current configuration is saved into a named file.
The user is prompted for a file name.
If the file exists, it is overwritten, otherwise it is created.
The saved file becomes the current file.
The modification flag in the status field is cleared.
F7
File
Clear Configuration:
All fields of the current configuration are cleared and the
modification flag is set, the input source flag is set to
board, the panel update process is stopped
and the clock is stopped.
F8
Display
Update Once:
Request a single update from the panel update process.
This will cause the panel update process to be stopped if it is
currently in continuous update mode.
If the LE board is not responding, a message to that effect
will be displayed and no update will occur.
Display
Update Continuous:
Put the panel update process into continuous update mode.
If it is already in continuous update mode, nothing happens.
If the LE board is not responding, a message to that effect will
be displayed and the panel update process will be stopped.
Display
Input from Panel/Board:
Toggle the source of input between the board and the panel.
This also affects the behavior of the switch fields.
The status field will reflect the current source of input.
If the LE board is not responding, a message to that effect
will be displayed and the source of input will be set to board.
F9
Clock
Pulse Clock:
Issue one pulse of the LE board clock.
This will stop the clock if it is currently in run mode.
If the LE board is not responding, a message to that effect
will be displayed and no pulse will occur.
Clock
Run Clock:
Put the LE board clock in run mode.
The clock will run at the rate set by the controls on the LE board.
If the LE board is not responding, a message to that effect will
be displayed and the clock will not be put in run mode.
F10
Tools
LE Assembler:
Start up an LE Assembler process in a new window.
If one is already running, make it the topmost window.
F11
Tools
Terminal:
Start up a terminal emulator process in a new window.
F12
Help:
Display this table in the help window.
File
Exit:
Exit the LE Panel tool.
If the configuration has been modified since the last save, the
user is prompted to save or abort these changes.