This document was ed by and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this report form. Report 445h4w
Copyright National Semiconductor 1993 Re-formatted by K. Imrie 2004
OPLAjr Manual p. 2
OPALjr Software Version 2.0 April 1993
6.2
Copyright National Semiconductor Corporation, 1993
OPALJR MANUAL Table Of Contents NOTE: This version of the manual does not include the v2.01 corrections. If you require a printed manual with the latest drawings, examples, and corrections, please our Applications Group and request a full copy of OPALjr with manual. Added note: Not now ed.
1.0 1.1 1.2 1.3
2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7
3.0 3.1 3.2 3.3 3.4 3.5 3.6
4.0 4.1 4.2 4.3
5.0 5.1 5.2
INTRODUCTION The OPALjr Package How OPAL Works The OPAL Concept
2
DOS GRAPHICAL SHELL
4
8.0
14
VEC File EQN File
APPENDIX
16
Devices ed 8.1.1 Buried s 8.2 Useful Conversions 8.2.1 Conversions Of Flip-Flops
Command Line Mouse Operations Keyboard Help Menu The View Modules Modules Menu Utilities Menu
9.0 9.1 9.2 9.3 9.4
WINDOWS GRAPHICAL SHELL 5
9.5 9.6 9.7 9.8
Mouse Operations Help Menu View Modules Modules Menu Utilities Menu The Windows Menu
OPALJR DESIGN MODULES
6
EQN2JED (Equations To JEDEC) PAL2GAL JED2EQN (JEDEC To Equations)
DESIGN ELEMENTS IN OPALJR Signal Types Signal Extension
Six-Bit Cascadable Shift 6.1.1 Design 6.1.2 The Basic Equation File 6.1.3 Creating The JEDEC Map
7.1 7.2
EQN FILE FORMAT DESCRIPTION
8.1
6.0 DESIGN EXAMPLES IN THE EQN FILE FORMAT 10 6.1
7.0
More Examples In The EQN File Format 6.2.1 6-Bit Cascadable Shift 6.2.2 8-Bit Synchronous Cascadable Counter 6.2.3 10-Bit Synchronous Up/Down Counter 6.2.4 16-Bit To 4-Bit Priority Encoder 6.2.5 16-Bit To 1-Bit Multiplexer 6.2.6 Hexadecimal Decoder For A 7-Segment Display 6.2.7 3-Bit Counter With 7-Segment Display Output 6.2.8 15-Bit Up-Down Counter
9
ERROR MESSAGES
17
Common Messages (0000-0099) Messages While Reading An EQN File (0100-0199) 18 Messages While Reading A VEC File (0300-0399) 20 Messages While Reading A JEDEC File (0400-0499) 21 Messages From EQN2JED (1400-1599) Messages From JED2EQN (1800-1999) Messages From PAL2GAL (2000-2199) Messages From JED2XPT (3400-3600)
1.0
INTRODUCTION The OPALjr software package consists of graphical shell environments for both DOS and Windows, three executable modules (EQN2JED.EXE, JED2EQN.EXE and PAL2GAL.EXE), a set of library device files, a set of examples and this on-disk manual. The example entry files contain Boolean equations and command labels which are written in the EQN file format. The entry files are used by the module EQN2JED to create JEDEC maps which contain the programming data for a target device. By creating your own entry files, you can use the OPAL software package as part of a complete PLD (Programmable Logic Device) design development system.
OPLAjr Manual p. 3 The OPALjr software disk is ready to run immediately on an IBM PC or compatible system. The INSTALL program should be used to install the software on your hard disk or another floppy disk. OPALjr is not copy protected, so you may make working copies for all of your personal computer systems. For additional copies of the software and this manual, or to request information regarding the full OPAL package, your local National Semiconductor sales representative. For technical assistance or to report software bugs, the appropriate office listed below: Region US and Canada Europe Asia Japan
THE OPALJR PACKAGE OPALjr is a functional subset of the full OPAL package. It is designed to: a) provide free low-level entry design for all NSC low-density PAL and GAL devices; b) demonstrate the syntax and capabilities of the full OPAL PLD development software package, including for higher-density MAPL devices. 1.2
HOW OPAL WORKS The ultimate goal of any PLD software package is to create a JEDEC map of the PLD fuse states that can be ed to a device programmer. The JEDEC map contains device-dependent data, such as pin assignment, the number of fuses per product term, the type of , and so on. Traditional PLD software packages require that you know details of the device architecture before you can create a JEDEC map. Historically, this was acceptable, since the complexity and density of the available programmable logic devices was limited. Devices with greater complexity and density are more difficult to utilise effectively and efficiently. The current generation of PLD software packages strives to be device-independent; a design can be constructed without any knowledge of the device targeted for the design. The designers need not worry about the architecture of the target device. They are free to concentrate on the design of the system.
The Open Programmable Array Language (OPAL) software package is designed to take this a step further. Instead of only providing device independence, we also supply tool independence. All of the file formats ed (OPAL, PLA, EQN, JEDEC) are completely "open" and compatible with recognised software tools such as the industry-standard ESPRESSO logic minimiser. This approach results in a highly modular software system which gives the designer visibility and control over every step of the logic design and implementation process. The designer has the freedom to alter a design at any step of the compilation, and to utilise familiar tools.
1.3
THE OPAL CONCEPT
The OPAL language is a high-end solution which is included only in the full PAL package. This language gives the designer the choice of using state-machine language, multi-level Boolean equations, enhanced truth-table functions, or any combination of the three. This gives the designer freedom to choose the implementation which best suits the specific design task. For a centre platform, the logic is compiled into the industry-standard Berkeley PLA format, which is the input format for the popular Espresso logic minimiser. At this level, the logic is the most compact. Designers with specific optimisation techniques can incorporate those techniques into the software by manipulating the PLA data. Two such tools, developed by National Semiconductor, are the "FITMAPL1" and "FITMAPL2" programs, which will take a generic PLA table and partition it into the individual arrays present in the MAPL1 and MAPL2 product family. FITMAPL1 and FITMAPL2 and the PLA file format are only available with the full OPAL package. At the lowest level, the logic can be expressed in the standard sum-of-products (SOP) format. This format can be compiled into the JEDEC map of a specific PLD. No further logic manipulation is done at this level, so designers who want the highest degree of control over the logic processing can enter designs at this level. However, even at this level, OPAL does provide for automatically mapping the logic into a specific PLD via an automatic pin assignment option. This feature is available in both OPAL and OPALjr.
OPLAjr Manual p. 4
2.0 DOS GRAPHICAL SHELL (OPAL.EXE) OPAL-DOS requires a DOS version of 2.0 or above to run. OPAL-DOS is a very powerful graphical shell that can be utilised to perform any operation in PLD design provided with OPAL software.
2.1
COMMAND LINE
Synopsis: opal [filename.ext][options] where filename is usually the OPAL entry file (optional). Options: -h or -? -m
-n
-v
-x
Display help screen. Use minimum shell memory for swapping. This is useful for floppydisk systems. Don't include help file into memory. This is useful for systems with limited memory. Displays version number of the OPAL-DOS shell itself, not the full OPAL software package. Don't show OPAL title screen.
MOUSE OPERATIONS The following table shows the different operations which can be performed by the mouse.
Select a file in a dialog box
Select an option from a list in a dialog box Select a field to modify in a dialog box List possible options in a field in a dialog box
Move the cursor Scroll down one line at a time in the editor screen or a dialog box listing files or options Quick Scroll
Mark a block of data
Mouse Action Click on the item Click on the field Click on the directory name Click on the action button Click on the field Click on the up/down arrow on top of the scroll bar Click on the new location Click on the down arrow in the bottom of the scroll bar Point to the highlighted area of the scroll bar and drag the mouse up or down Point to the beginning of the block and drag the mouse to the end
Point to the field and click
2.3
KEYBOARD OPERATION All actions performed by the mouse can be performed by the keyboard. In this section the functions that can be performed by the keyboard are listed along with the keystrokes to press. Operation Access the Top-Level menu bar Access a submenu
2.2
Operation Select a Menu Item Toggle a check field in a dialogue box Display contents of a directory in an open file dialog box Perform an action in a Dialog box Display Options of a field in a dialog box Scroll up/down in a display area
Double-click on the filename, or click on the filename and then click OK button Double-click on the option Point to the field
Select a submenu item
Highlight a field in a dialog box Select an item in a dialog box Toggle a check field List options of dialog box field Exit a dialog box without saving changes
2.4
Keystroke
or
Then use right and left arrow keys to move to the item then <Enter>
or use up/down arrow keys, then <Enter>
or arrow keys Highlight item then <Enter> <Space>
<Esc>
THE HELP MENU
The OPAL-DOS shell provides an online help for all menu items and the editor. To access the help on a specific item, highlight that item and press
. A screen containing an explanation of the item and its operation will appear. To exit a help screen, press <Esc>. In the editor screen,
will display a summary of the editor commands. Some Help screens contains some keywords that contain further details about the subject. To access these topics, use the arrow keys to move to the desired keyword and press <Enter> or click on the highlighted keyword.
OPLAjr Manual p. 5
2.5
THE VIEW MODULES MENU This menu is very useful during a design phase, when the is compiling the source file for the first time. This menu contains selections that allow the to view the different output files of the last executed procedure. Any of the following files can be quickly opened and displayed if they were an output or an input of the last executed procedure. EQN File JEDEC Map GAL File LIS File LOG File
This is the equation file created by PLA2EQN, or JED2EQN. This is the JEDEC file created by EQN2JED, or FITMAPL2. This file is created by the PAL2GAL or XOR2GAL modules. This is the list file created by EQN2JED or EQN2OPL. This is the log file created by OPL2PLA.
2.6
THE MODULES MENU Selecting any of these items will invoke a Module Execution dialog box to prompt for options and parameters. Only EQN and JED modules are available in OPALjr. 2.7
3.1
MOUSE OPERATIONS OPAL-WIN is compatible with a mouse. The mouse operations in OPAL-WIN are the same as those in the Windows environment. Refer to the Windows Manual for more information. 3.2
The OPAL-DOS shell provides an online help for all menu items and the editor. To access the help on a specific item, highlight that item and press
. A screen containing an explanation of the item and its operation will appear. To exit a help screen, press <Esc>. In the editor screen,
will display a summary of the editor commands. Some Help screens contain some keywords that contain further details about the subject. To access these topics, use the arrow keys to move to the desired keyword and press <Enter> or click on the highlighted keyword.
3.3
VIEW MODULES MENU This menu is very useful during a design phase, when the is compiling the source file for the first time. This menu contains items that allow the to view the different outputs of the last executed procedure. EQN File
UTILITIES MENUS
All of the selections directly correspond to the modules with the same name except for Device Selection. The Device Selection is actually the same as running EQN2JED with the -d@selfile option. The output will be a log file showing all devices capable of accommodating the design. A dialog box will appear to allow the to input the equation file name, and to specify one of the four device choices or a file that lists the devices that the wishes to select from.
3.0 WINDOWS GRAPHICAL SHELL (OPALWIN.EXE) This is an MS-Windows 3.x application and will be referred to as OPAL-WIN. OPAL-WIN gives the a complete PLD design environment with the power and ease of MS-Windows. It is assumed that the is already familiar with the Windows environment. Therefore, details of menu, Window and help operations are not provided except in special cases. The is advised to refer to the Windows Manual for more detail.
HELP MENU
JEDEC Map GAL File LIS LOG File
This is the Equation file output by PLA2EQN or JED2EQN. This is the JEDEC file output by EQN2JED or FITMAPL2. This file is output by the PAL2GAL or XOR2GAL. This is the list file created by EQN2JED or EQN2OPL. This is the log file output by most procedures.
3.4
THE MODULES MENU This menu contains items that will execute any of the main design procedures. Selecting any of these items will invoke a Module Execution dialog box. Only EQN to JED modules are available in OPALjr. 3.5
THE UTILITIES MENU This menu contains OPAL modules that are not included in the other menus. Selecting any of these items will invoke a module execution dialog box. 3.6
THE WINDOWS MENU Unlike OPAL-DOS, OPAL-WIN has the ability to open several files at once. This menu contains functions that are designed to manage multiple windows.
OPLAjr Manual p. 6
4.0
OPALJR DESIGN MODULES This chapter contains command-line descriptions of the OPALJr modules and utilities. 4.1 EQN2JED (EQUATIONS TO JEDEC) EQN2JED converts basic sum-of-products Boolean equations to a device-specific JEDEC file. The JEDEC file contains all the necessary design details which can be ed to a device programmer for programming the target PLD. The JEDEC file is fully compatible with JEDEC standard 3B which is ed by industry-standard device programmers. A variety of information is stored to the .log file. Primarily, it documents the final fitting of the design with a detailed description of how each pin was used and what label it represents. It also includes information on the utilisation of the device resources, and a diagram (DIP or PLCC) of the device and the labels assigned to the exterior pins. Enhanced for the GAL16V8 and GAL20V8 devices is incorporated. Different GAL modes are evaluated automatically to fit a design into the device. For a design with only combinatorial outputs, it is not possible to use Medium-PAL mode if more than six outputs are I/Os. This is because there are 6 combinatorial I/Os and 2 dedicated outputs in Medium-PAL mode. Instead Small-PAL mode is used. However, it is possible to use ed-PAL mode to get more than six combinatorial I/Os for such a design. The trade-off is that the clock and OE pins are not used.
The name of any device that fits will be printed to the screen. The fitting status for every device will be written to the log file. Device-utilisation statistics and pin assignments will also be written to the log file for any device that fits. Synopsis: eqn2jed [options] eqnfile where eqnfile is the equations file. The default extension is .eqn. Options: -b -c -d device -d @selfile
-e errfile
-f
EQN2JED has the ability to perform device selection. When supplied with a device-selection file (using the -d @selfile option on the command line, or CHIP design @selfile in the equation file), the module will attempt to fit the equation file design into each of the devices listed in the selection file. This is available for all devices, except for the MAPL devices, which have their own fitter. There are predefined selection files called: ALL To attempt to fit into any device TTL To attempt to fit into any TTL device ECL To attempt to fit into any ECL device CMOS To attempt to fit into any CMOS device
-g logfile
Select old versions of the 16V8 and 20V8 devices. Enable the security fuse on the device. Override the device name in the equation file. If the argument following the -d flag begins with the character @, the remaining text is interpreted as a device-selection filename, as discussed above. There are predefined selectors called ALL, TTL, ECL, and CMOS. The selfile has a default extension of .sel. Specify the error log file for error messages instead of directing them to the standard error stream. This is provided since neither DOS nor UNIX C-Shell provides a way to redirect the errors. Default extension is .err. Turn on the automatic pinassignment switch. The JEDEC file created reflects the pin assignment if successful. The pin list in the original EQN file (if any) is no longer valid. The pin assignment is indicated by the pin-out diagram in the log file that is created by EQN2JED. If the -f option fails to assign the pins, it does not mean that there is no solution. In such cases, the designer may have to if the design will fit into the PLD and then manually assign the pins before compiling with EQN2JED again. Specify a different name for the log file; the default extension is .log.
OPLAjr Manual p. 7 -j
-k
-l listfile
-m
-n
-o outfile
-r -s -u ues
-v vecfile
Select JEDEC PLCC package for the chip diagram in the log file. For ECL parts, a 24-pin Quad Cerpak is selected. Select non-JEDEC PLCC package for the chip diagram in the log file. For ECL parts, a 24-pin Quad Cerpak is selected. Specify the list file name. The list file contains a listing of the equation source file with all warning and error messages at the corresponding lines. The default extension is .lis. Produce a full JEDEC map as output which programs every location in the device. Without this option, unused sections of the device are not programmed, which results in a smaller JEDEC map. The old log file will be deleted. This is often desirable since the program appends to the log file, if it exists, and it can become quite large after a number of successful calls to the module. Specify the output JEDEC file name. If no -o option is specified, the input file name is used with the extension .jed. Retain repeating product for PALs. Shuts off diagnostic messages. Specify the Electronic Signature as ues for GAL devices in ASCII format (8 bits per character). If only hexadecimal characters are used, it will use a hexadecimal representation (4 bits per character). Specify the input test vector file name. The vector file must conform to the JEDEC standard for defining vectors. The vector file is appended to the JEDEC file. Each individual vector is tested to ensure that vector characters are valid for the pins they are assigned to. This feature ensures that vectors are defined correctly, however, it does not perform any simulation to ensure that the vector has the correct output response for the given inputs. The default extension is .vec.
Example: eqn2jed -f -s -dgal16v8 6_shift The above command invokes the EQN2JED module. The input is the EQN file called 6_SHIFT.EQN. The output file will be 6_SHIFT.JED, by default. As specified by the options, pin declaration and assignment will be done automatically and no diagnostic messages will be displayed on the screen. Also, the device specified in the equation file will be overridden by the GAL16V8.
4.2
PAL2GAL
The PAL2GAL module converts a PAL JEDEC file into a GAL JEDEC file. PAL2GAL first checks to ensure that there is a pin-to-pin match between the PAL and a ed GAL before it proceeds to do the conversion. PAL functions that are replaceable by a GAL16V8 are: PAL10H8 PAL10L8 PAL10P8 PAL12H6 PAL12L6 PAL12P6 PAL14H4 PAL14L4 PAL14P4 PAL16H2 PAL16H8 PAL16L2 PAL16L8 PAL16P2 PAL16P8 PAL16R4 PAL16R6 PAL16R8 PAL16RP4 PAL16RP6 PAL16RP8 PAL functions that are replaceable by a GAL20V8 are: PAL14H8 PAL14L8 PAL14P8 PAL16H6 PAL16L6 PAL16P6 PAL18H4 PAL18L4 PAL18P4 PAL20H2 PAL20H8 PAL20L2 PAL20L8 PAL20P2 PAL20P8 PAL20R4 PAL20R6 PAL20R8 PAL20RP4 PAL20RP6 PAL20RP8 PAL functions that are replaceable by a GAL22V10 are: PAL12H10 PAL12L10 PAL12P10 PAL14H8 PAL14L8 PAL14P8 PAL16H6 PAL16L6 PAL16P6 PAL18H4 PAL18L4 PAL18P4 PAL20H2 PAL20H8 PAL20L2 PAL20L8 PAL20P2 PAL20P8 PAL20H10 PAL20L10 PAL20P10 PAL20R4 PAL20R6 PAL20R8 PAL20RP4 PAL20RP6 PAL20RP8 PAL22V10 Note that PALs with ed outputs in the above list have a dedicated OE for tristate control (pin 13). When the design is converted to the GAL22V10, a product term tristate will be used instead; this may produce some timing differences.
OPLAjr Manual p. 8 Many devices can be converted to either a GAL20V8 or a GAL22V10. The option ì-g device is provided to specify which device should be used, although it will default to the GAL20V8 if the option is not used. Synopsis: pal2gal [options] palfile where palfile is the PAL JEDEC file to be converted. The default extension is .jed. Options: -b
-d device -e errfile
-g device
-o galfile
-s -v
-u ues
Debug mode to show intermediate diagnostics. This option will show all of the other modules which are executed, as well as keep all intermediate files. Specify the PAL device name. Override the device name in the PAL JEDEC file (if any). Specify the error log file for error messages instead of directing them to the standard error stream. This is provided since neither DOS nor UNIX C-Shell provides a way to redirect the errors. Specify a GAL device to convert to. This option should be used whenever converting to a GAL22V10. Specify the output GAL JEDEC file. If the -o option is not specified, the PAL JEDEC filename is used with the extension of .gjd. Shuts off diagnostic messages. Do not include vectors in the GAL JEDEC file. If this option is not used, then any vectors in the PAL JEDEC file are copied into the GAL JEDEC file. The vectors must conform to the JEDEC standard for defining vectors. The vector file is appended to the GAL JEDEC file. Note that no check is done to ensure the correctness of the vectors. Specify the Electronic Signature as 'ues' for GAL devices in ASCII format (8 bits per character). If only hexadecimal characters are used, it will use a hexadecimal representation (4 bits per character).
Example: pal2gal -d pal12h6 gates This command invokes the PAL2GAL module. The input file is the PAL JEDEC file gates.jed. The output file will be the GAL JEDEC file with the default name gates.gjd. The device PAL12H6 specified with the -d option on the command line will override any device name (if any) in the PAL JEDEC file.
4.3
JED2EQN
The JED2EQN module will disassemble a JEDEC file into the corresponding basic Boolean equations. The labels used in the basic Boolean equations created by JED2EQN contain the pin number preceded by the type of signal. Observing the labels makes it easy to determine if the pin is used as a dedicated input, combinatorial or ed output, and whether or not the output is used as into the device. Synopsis: jed2eqn [options] jedfile where jedfile is the JEDEC file to disassembled. The default extension is .jed.
be
It is recommended that the -d option be used to avoid potential conflicts between the device name and any comments which may exist in the JEDEC file. However, if the JEDEC file was created by EQN2JED, this option does not need to be specified. JED2EQN finds this device name in the JEDEC file by searching the header section for the strings PAL, GAL, or MAPL. JED2EQN attempts to supply meaningful label names for the pins. It does this by examining the JEDEC file for -supplied labels in the NOTE PINS and NOTE NODES statements. The format for such statements is as follows: 'NOTE' <'PINS' | 'NODES'> [