From Swordfish Wiki

SwordfishUser: CLCDesignerTool

The CLCDesignerTool V4 is a utility to aid in setting the Configurable Logic Cell (CLC) module configuration. It is a revamp of the original standalone V3.0.0.4 utility that includes new features and device support compared to previous versions.

New features include:

Rev History

CLCDesigner V4.1 adds support for virtual port PORTW CLCINxPPS select (PW0-PW7)
add support for 18FxxQ71 (2xQ71, 4xQ71, 5xQ71): 8x CLC, type 8 (uses CLCSELECT)
change entry for '26Q10/27Q10' to '2xQ10' to match others
fix Q40/Q41 entry 26 MUXX: PWM3S1P2 (was MUXX: PWM3S1P1)
fix Q43 entry 39 MUXX: PWM3S1P2
fix Q83/Q84 entries 39 MUXX: PWM3S1P2 and 41 MUXX: PWM4S1P2
initial release

CLCDesignerTool V4

Download CLCDesignerTool V4.1.0.0 (7z format)

To use, open the 7z file and copy the 'CLCDesignerTool' folder to a location of your choice. Be sure the folder has write access so that it can save any setup changes you make. Run the application CLCDesignerTool.exe. The program requires .NET V3.5 runtime support.

The basic program operation is similar to previous versions, and a description can be found in the CLC Configuration Tool Users Guide 41597B.pdf file.

New additions include:

File menu

Device support is provided by the various CLCDesigner.ini Config files, which is broken up into multiple files to simplify usage:

Format menu

This allows the output to be compatible with different dialects of BASIC, including Swordfish, PBP, Proton PDS, and GCB. The Format, Config, and device selections are saved in the CLCUser.ini file

Operation

Simply select the configuration file and device type from the dropdown list. This will setup the CLC (and any PPS selections) as appropriate. Select a CLC cell (1-8) and Logic Function type (AND-OR, OR-XOR, AND, etc) to begin.

As you change the MUX1-4 input selections, PPS assignments, and logic options the Register Settings display will change dynamically to show your selections. You can use 'Copy/Paste' buttons to copy one CLC settings to another, and preview the code output using 'View Code'. When you are done, simply highlight and copy the code from the ViewCode window, or generate an output file using 'File | Save/Save As'. If you generate an output file you can use 'File | Open' to reload the code later and make any changes as required.

Hints

The GATE1-GATE4 input MUX allows you to select an input, inverted input, or inverted GATE output. As you hover over a signal the cursor will change to a 'hand' to indicate when a choice may be selected. Likewise with the CLC output.

An input MUX with no connections will output a logic '0', so you may have to invert an unused mux output to produce a '1', depending on the logic that the gate feeds.

Here are some app notes with additional info for using the CLC modules:
Download CLC App notes (7z format)
Download CLC App notes2 (7z format)

Simulating CLC Operation Using DigitalWorks

Digital Works is a free design tool that enables you to construct digital logic circuits and to analyze their behaviour through simulation. It is written by David Barker and is available for download on the Mecanique web site https://www.mecanique.co.uk on the 'Free Software' page, or from the following link: https://www.mecanique.co.uk/software/digital-works.zip

After installing DigitalWorks, Download DigitalWorks CLC support files (7z format), and copy the CLC folder from the 7z file to the DigitalWorks PartCentre folder. This will place a CLC folder under the PartsCentre that contains macro files for each of the different CLC logic function configurations.

To use, simply select one of the CLC files from the PartsCentre. Circuit Inputs are shown using the Interactive Input control, and Circuit Outputs (and intermediary logic signals) use a green LED to monitor the logic state. Each CLC node that can be inverted contains a POL/INV block... to invert the node select the corresponding POL Interactive Input control for that signal.

Below is an example showing the clc_AND_OR macro:

In this simple example we have two inputs: MUX1_INA and MUX3_INA that have both been set high. We can see that the output of MUX1 is high, while MUX2 is low, producing a low on the output node of AND1. In the bottom portion (MUX3/MUX4), we have inverted the MUX4 output so that both MUX3 and MUX4 outputs are high, producing a high on node AND2 which results in CLCOUT high

The Interactive Inputs are useful for exploring the basic logic functions of a CLC module. You can create more sophisticated simulations by replacing them with the DigitalWorks Clock and Sequence Generators, and view the corresponding output waveforms using the Logic History window.

Retrieved from https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.CLCDesignerTool
Page last modified on November 15, 2022, at 12:47 PM