Insert context-sensitive help into this document. It will generate map ID’s for the topics that your developer can then link to dialogs, message boxes, and menu items.


Welcome to LogicWorks 5

Welcome to the world of electronics design using LogicWorks! This help manual contains some additional information on topics not covered in the printed manual or in the Reference Manual included on disk.

The rest of this manual is organized as an FAQ, with answers to common :"How do I…?" questions, some brief tutorials on advanced topics and information on some new features not covered in the other documentation.  Use the Table of Contents at left to browse the available topics.

Getting Started

To get started using LogicWorks 5, we strongly recommend working through the tutorials in the printed manual.  If you’re an experienced user of earlier versions of the package, the tutorial on VHDL will get you started with the major new feature of this version.

Support on the Internet

Capilano Computing operates an active World Wide Web site for LogicWorks users at www.logicworks5.com. Visit the site for free updates, installation assistance, technical support, user-contributed libraries and up-to-date information on using LogicWorks.


Upgrading from previous versions

LogicWorks 5 does not use any major new file formats relative to LogicWorks 4, so you can read any existing library or circuit files without modification.

Simulation Time Values

The only significant change in the way circuit parameters are stored in LogicWorks 5 is a result of the conversion to real time units, rather than the integer "ticks" that were used in previous versions.  When a circuit that was created in an older version is read into version 5, the integer time settings are interpreted as nanoseconds.  Further adjustments can be made, if desired, using the Simulation Params menu command.


What's new in version 5
What’s new in version 5

General Features

•	Improvements in built-in text editor.

•	Root folder settings allow installation on a protected server.

Schematic Drawing Features

•	Added the ability to set individual colors for signal lines.

•	Added Bus Pin Options to pin info box as an alternative way of getting to the Bus Pin Info box.

•	Added Add/Delete Pins to the Bus Pin Options box, allowing you to modify the signals contained in a bus pin without editing the symbol.

•	Added signal list to bus info allowing access to signals that are inside the bus and not visible separately on the schematic.

•	Contents of all selected miscellaneous text items are copied onto clipboard as text

•	Popup menus for text and picture objects

•	New font background and frame options

•	Library part name filter accepts *, ?, # pattern chars

Symbol Editing Features

•	New commands: Parts List, Pin List, Symbol Gallery Show/Hide

•	Popup menus on all objects give direct access to commonly-used commands.

•	Magnify and improvements to zoom in/out

•	Properties command allows information to be displayed and changed for all object types.

•	Rotate/flip commands for all graphic objects.

•	Removed bubble pins (now use Symbol Gallery)

•	Automatically display pin names on the symbol.

•	| notation in Auto Create Symbol strings for pin function..

•	A warning is now issued if subcircuit ports don't match parent pins.

•	A new Open Subcircuit command allows you to get direct access to the subcircuit attached to a symbol.

Simulation Features

•	VHDL: LogicWorks now allows you to create simulation models using a subset of the VHDL hardware description language.  Please note that some parts of the language are not implemented in this version, so some VHDL models created on other systems may not run in LogicWorks without modification.  See VHDL Implementation in LogicWorks 5 for more information on the specific limitations in this version.

•	Simulation values of signals can now be displayed directly on the schematic diagram as the simulation progresses.

•	All simulation values now use real time units, e.g. nanoseconds.

•	Many improvements to the timing diagram display to handle VHDL output, display grouped values in any desired radix, handle real time units, etc.

•	IOPanel tool allows you to display and modify simulation values and create custom display panels for your models.

•	TestPanel module allows you to specify a program of input values to apply to a circuit under test and compare the results to the expected values.

•	Many small new features and improvements.

•	Model Wizard


Technical Support

Installation Support is available through the Pearson Higher Education Media Product Assistance Hotline at:

Tel: 1-800-677-6337 M-F (8:00AM to 5:00PM CST)

Fax: 847-486-2595

email: media.support@pearsoned.com

For technical issues regarding program operation, contact your instructor or teaching assistant, or check the on-line help available on the LogicWorks On-line Support Page at:

http://www.logicworks5.com


VHDL Implementation in LogicWorks 5

The major new feature in LogicWorks 5 is the ability to create simulation models using the VHDL language.  However, in order to provide a useful product while still being able to sell it at a reasonable price, we have omitted some of the more advanced features of the language in this version.  This note lists the language features that have been omitted.

IMPORTANT NOTE: LogicWorks does not implement 100% of the VHDL standard language specification. We have tried to provide a useful set of features that will allow small to medium scale designs to be fully implemented and allow the concepts and exercises in commonly-used textbooks to be executed

The LogicWorks package is being continually upgraded. Please check our web site at www.logicworks5.com for a free update patch to the latest version, which may have eliminated some of these restrictions.

VHDL Keywords Not Implemented

The language features associated with the following keywords are not implemented:

•	ACCESS

•	ALIAS

•	ATTRIBUTE

•	BUFFER

•	CONFIGURATION

•	DISCONNECT

•	FILE

•	GENERATE

•	GROUP

•	LABEL

•	NEW

•	PORT MAP on BLOCK

•	POSTPONED process

•	PROTECTED

•	REAL

•	RECORD

•	SHARED

•	TRANSPORT/INERTIAL/REJECT

•	UNITS

•	‘STABLE ‘QUIET ‘TRANSACTION and ‘DELAYED

Other VHDL Features Not Implemented

In addition, some specific language features, or unusual operations on some data types have not been implemented, including:

•	named associations in aggregates

•	operator overloading

•	extended identifiers

•	physical type declaration

•	enumerated character type declaration

•	user-defined resolution functions

•	the IEEE standard libraries are not 100% implemented

•	attributes: only the following attributes are implemented:

o	RANGE

o	LENGTH

o	LEFT

Standard Libraries Supported in LogicWorks

LogicWorks supports only the following standard libraries:

•	SYSTEM

•	STD_LOGIC_1164

•	STD_LOGIC_ARITH

The above packages are hardwired into the compiler for maximum speed and compactness.  In general, other packages cannot be used without some massaging because the standard source code uses VHDL features that are not yet implement in the package.

Other Implementation Notes

Compilation Units

The VHDL compiler in LogicWorks will only accept a single ENTITY/ARCHITECTURE pair or PACKAGE/PACKAGE BODY pair per file.

Signal Values in VHDL Simulations

When you compile a VHDL file in LogicWorks, the program actually generates a structural circuit consisting of the various blocks described in the code. Each process (including signal assignments or other constructs that create an implicit process) creates a device with signal inputs and outputs.  The existing LogicWorks simulator simulates the signal interconnections between these process blocks. This gives considerable flexibility in interconnecting structural and VHDL components, but places some restrictions on signal values.  See the section Interface Between VHDL and LogicWorks  for more details.


Interface Between VHDL and LogicWorks

###to be added


Using the writeln Function for Debugging VHDL
Using the writeln Procedure for Debugging VHDL

A non-standard built-in procedure called writeln has been implemented in LogicWorks to assist with debugging models built with VHDL.  This procedure write a line displaying its arguments into the VHDL console that appears when you run a model.

The function is defined as follows:

writeln(arg1, arg2, …);

The output line will consist of all the arguments converted to string format (if not already) and concatenated together.

Here is an example of using writeln:

output_process: process(clk)

begin

writeln("Enter output_process at ", now(), " with clk = ", clk);

o1 <= invert_vec(i1(3)&i1(1 to 2)) after 0.2 ns;

wait until(rising_edge(clk));

q <= d after 0.5 ns;

end process output_process;

The writeln procedure is contained in the DEBUG package contained in the LOGICWORKS library, which must be imported by placing the following lines at the front of your source code:


Create a Subcircuit for a Device Bottom Up?

?	How do I create a subcircuit for a device, starting with the bottom level circuit and working up to the device symbol?

There are a number of different ways in LogicWorks of making a subcircuit, but here we’ll outline a simple procedure using the Model Wizard command.  In this case, we will start by defining the subcircuit itself, then create the parent symbol that will represent it.

We will assume we want to create a subcircuit that will represent an AND gate with on inverted input, using the following circuit:

1.	Start the Model Wizard – Select the Model Wizard command in the Simulation menu.

2.	In the Source section of the Model Wizard panel, select the New Empty Model option.  This indicates that we are creating a new model from scratch, not using any existing file.

3.	In the Destination section, select "Open the new model as an independent design".

4.	In the Destination section, select "Open the new model as an independent design", then click the Next button.

5.	Select the "Structural Circuit" model type and type the name AND1INV, or any other suitable name in the name box.

6.	Click the Next button.

7.	We now define the subcircuit’s "interface", that is, the connections it makes with the parent device.  In the Function area, make sure Input is selected.

8.	Type the name INV in the Name box, then click the Add Single Bit button.  The pin list should now look like this:

9.	Change the name in the Name box to NON and click the Add Single Bit button again.

10.	Change the Function setting to Output and enter the name OUT in the Name box and click Add Single Bit.  We now have all the pins we need and the list should look like:

11.	Click the Finish button to create the circuit.  This should open a windows that looks like:

The symbols in this circuit are the "port connectors" that are the interface points between signals in the subcircuit and pins on the parent symbol.  We now have to connect up the actual circuitry of the model.

12.	Using the AND-2 and NOT devices, wire up the circuit as shown.  Note that the port connector symbols can be moved around or rotated as needed to fit your circuit layout as needed.  They are placed in an initial position by function, but this does not affect the interface.  The important thing is that the name on the port connector must exactly match the name of the associated pin on the parent symbol.

NOTE: Your circuit does not have to be laid out exactly like it is here, just make sure that the port connector labeled INV is connected to the NOT gate (inverter) and the NON connector connects directly to the AND gate, otherwise our parent device won’t make logical sense.

13.	We now have a complete subcircuit file.  If you want to keep this circuit on disk for safekeeping, you can use the Save command now to save it, but this is not essential for the next steps.

14.	Our only remaining job is to create the parent symbol.  Select the New command in the File menu and double-click on the Device Symbol option.  This will create a new, empty device symbol editor window.

15.	Go to the Options menu and select the Subcircuit and Part Type command.

16.	Click on the option "Create subcircuit symbol and select an open circuit to attach to it".  Immediately a small box will appear with a list of the open circuits.  Select our subcircuit AND1INV and click OK.

17.	Click the Done button on the Part Type box.  You should now see 3 pins listed in the pin list at left.  These pins will be highlighted in red because they have not been placed on a symbol yet.

18.	If you are familiar with the symbol editor, you can now create a symbol using any of the drawing tools available, place the pre-defined pins on the symbol and save the completed part.  Otherwise, we’ll use the quickest way of making a symbol, by selecting the Auto Create Symbol command in the Options menu.  Click on the Extract Pin List button to automatically fetch the pins from the pin list.  This will place them as follows:

19.	Change the Part Name box in the center to read AND1INV and click the Generate Symbol button to complete the symbol.  This will give us:

20.	Our symbol is now complete, so go to the File menu and select the Save As command to save it.  Don’t save to any of the standard LogicWorks libraries.  If you don’t already have a work library open, use the New Lib command to create a library in a convenient location.

21.	To test the new part, create a new, empty circuit window (using the New command), then place one of our new parts and wire it up as shown:

22.	To verify that the subcircuit has indeed made it inside the device, you can double-click on the symbol to open the subcircuit in a separate window.

This is only one of many procedures that could be used to define the subcircuit, create the symbol and associate the two.  Feel free to try any of the other tools available at any point in this procedure.

NOTE:	Once you have attached a subcircuit to a symbol using this procedure, the original subcircuit has been copied into the symbol definition and is no longer needed.  You can modify or discard the original AND1INV subcircuit window that we created without having any effect on the definition stored in the library.


Repairing Damaged Libraries

?	When I open my symbol library file, I get a message saying "parsing error" and I can't use it

If a library file is not closed properly due to a hardware or software malfunction, it is possible for the file to be left in an inconsistent state that renders it unusable, even though most of the data is still intact.  Many corrupted files will be corrected automatically when you open them in this version.  However, if some parts still have errors or are missing, there is also a "Repair" button in the Lib Maintenance command that does a more thorough check of the library.  To select the Lib Maintenance command, right click in the parts list.


Using Files from Pre-3.0 Macintosh Versions

?	How can I open files that were created on a pre-3.0 version of LogicWorks for the Macintosh?

LogicWorks was originally developed on the Macintosh, and early versions of the program used some data formats that were not compatible with the PC.  For this reason, the file format was changed starting with version 3.0 in about 1995.  Since it has been many years since this change, we no longer include the file conversion utility modules with LogicWorks.

In order to convert these files, you will need a 3.x or 4.x version of LogicWorks for the Macintosh and the appropriate file conversion modules.  Please see the LogicWorks 4 FAQ on the web for more details.


Sharing File with LogicWorks for the Macintosh

?	Can I share my files with LogicWorks on Macintosh?

LogicWorks files saved using Version 3.0 and later are directly compatible across both platforms. Due to differences in fonts and graphics storage mechanisms, you may get some differences in display on the two systems, but general circuit structure will remain intact.

You may also receive a message on either system that "some data items are not recognized and have been ignored".  This message is due to some platform-specific information such as printer setups that is not carried across between systems.  This should not affect the circuit structure.


Installing and Opening Symbol Libraries

LogicWorks comes with a variety of different symbol library files and you will likely create or obtain others while using the package.  You can open and close libraries manually or customize which libraries open automatically when the program is started, to suit your application.

NOTE:	DesignWorks symbol library files normally have the ".CLF" file name extension.

Location of Libraries

When LogicWorks is first installed, the libraries will be located in the Libs folder inside the LogicWorks program folder.  Inside that folder may be other sub-folders containing additional families of libraries.

Opening Libraries Manually

To open library files manually, right click in the parts palette window, or move to the Libraries submenu of the File menu, and select the Open Lib command.  This command allows you to locate a symbol library file in the usual way.  When the file is opened, it will be added to the list of available libraries in the parts palette.

Opening Libraries Automatically at Startup

When LogicWorks is first installed, it is configured to open automatically any library file that it finds in the Libs folder inside the LogicWorks program folder.  You can add more libraries to be opened automatically by simply placing them in this folder.  Sub-folders are NOT scanned, so files that are not immediately needed can be "hidden" in nested folders.

If you wish to create a more sophisticated layout of folders containing libraries for your projects, you can use the LIBRARY and LIBRARYFOLDER keywords in the LogicWorks initialization file (LW.INI) to create additional library folders.

For more information, look up the LibraryFolder keyword in the index of the LogicWorks Reference Manual.


Curing Startup Error Message 59001

?	When I start LogicWorks 4, I get a message "A low-severity error has been detected, code 59001"

This message is caused by invalid information received from the current printer driver and is not fatal, but can admittedly be irritating.

The explanation:  When LogicWorks starts up or creates a new document, it queries the current printer to find out about the paper size and printable area.  This message occurs with some versions of printer drivers that provide invalid information, such as the printable area being zero or bigger than the paper size.  This information is only used when the "center image in page" option is on, which it is by default.  This option attempts to place the printed image in the center of the paper on printers that have asymetrical print margins.

The solution: Turn off the "center image in page" option.  To do this,

Open the file "LW.INI" using NotePad or a similar simple text editor.  This file is located in the LogicWorks program folder, usually c:\Program Files\LogicWorks4\Program.

Locate the following lines, which should be present in the file (some settings might be slightly different):

[System]

PrinterScaleLines=All

PrinterColors=ToBlack

Add a new line anywhere after the [System] line that looks like this:

PrinterCenterImage=Off

Next time you restart the program, the new setting will take effect and you should get no more messages.


Creating a Subcircuit Manually

?	How do I create a subcircuit for a device manually, that is placing all the parts and connectors in the circuit myself without using Model Wizard?

Introduction

There are a variety of ways of creating a subcircuit and attaching it to a symbol for simulation purposes. In most cases, the quickest way is to use the Model Wizard command, but it is restricted to only the simplest pin types.  Here is a simple procedure that allows you to create the subcircuit directly, although you can use your knowledge of the package to try different procedures.

Procedure

•	Make a new, empty circuit window by: selecting the File/New command and choosing the Circuit option

•	Create the subcircuit shown, adding Port Connector symbols for each location where you want to make a connection to a pin on the parent symbol. In this case: Place an AND-2 gate from the Simulation Gates library. To the left of the gate, place two Port In devices from the Pseudo Devices library. Connect the pins on the Port In devices to the inputs on the AND gate. Place a Port Out device to the right of the AND gate and connect it to the output pin on the gate.

•	Place unique port names on the three port connectors using the pencil tool. Specifically: Select the pencil tool in the tool palette. Click on the first Port In symbol. Type the name "INA" and hit Enter. Click on the next Port In symbol and type "INB" and Enter. Click on the Port Out symbol and type "OUT" and Enter. The subcircuit is now complete. You can save it if you want, but it is not required and the copy on disk will not be used for the simulation.

•	Create a new, empty device symbol by selecting the File/New command and choosing the Device Symbol option

•	In the Options menu in the symbol editor window select the Subcircuit & Part Type command.

•	Select the second option "Create a sub-circuit symbol and select an open circuit to attach to it" or "Create a subcircuit symbol and store the subcircuit with it" (depending on program version). When you click on this option, a box will appear containing a list of all open circuits. Select the one you just created.

•	Click the Done button on the Subcircuit & Part Type box. You should now see the three pin names in the pin list on the left.

•	Select the Auto Create Symbol command in the Options menu.

•	If the program has not already filled in the pins names, click the Extract Pin List button. This will place the three pin names in the appropriate boxes.

•	Change the Part Name box in the center to AND or whatever name you prefer.

•	Click the Generate button. This will create a symbol. You can modify the symbol graphics if you want.

•	Select the Save As command in the File menu and save the new part to your own library. Do not modify any of the standard LogicWorks libraries.

•	Your part is now ready to use. Create a new, empty design and verify that it operates like an AND gate.