Custom Integrated Circuits
A custom integrated circuit allows you to package up a complex subset of your document into a single reusable component, similar to the flip-flops.
Example: Create a Custom Half Adder
In order to better demonstrate how this works, the following section will walk you through creating a custom integrated circuit for a half adder. A live demonstration of a half adder appears below:
Start by recreating the diagram above in Logicly. The toggle switch components will become input connectors in your custom integrated circuit, while the light bulb components will become output connectors.
Select the top toggle switch component.
In the properties window, enter A in the Export Name input. The Export Name value will be displayed on your custom integrated circuit next to the input or output connector. If the text is very long, it may be automatically shortened and appended with ellipses.
Select the bottom toggle switch component, and enter B in the Export Name input box of the properties window.
Select the top light bulb component, and enter S (for "sum") in the Export Name input box of the properties window.
Select the bottom light bulb component, and enter C (for "carry") in the Export Name input box of the properties window.
Choose Select All from the Edit menu, or drag a selection rectangle around the full half adder circuit, if your document contains more than the half adder.
From the Edit menu, choose Create Integrated Circuit....
You should now see the Create Integrated Circuit window. An error message will be displayed when your selection does not contain at least one toggle switch and at least one light bulb. Likewise, an error will be displayed when you fail to set the Export Name on one or more of the toggle switches or light bulbs.
In the Full Name input box, enter a full, detailed name for your custom integrated circuit. This text will appear in the label displayed on the components list on the left of the main Logicly window. For this example, we should enter Half Adder.
In the Symbol Label input box, you may enter some short label text to display at the center of the circuit's symbol. This field is optional, but recommended for clarity. Same as above, we will enter Half Adder. As you can see in the screenshot above, you may optionally include line breaks in the label text. We might also consider an abbreviation, such as HA, to take up less space in the editor.
Finally, you may change the positions of each of the input and output connectors. By default, all inputs appear on the left, and all outputs appear on the right, similar to the logic gates. However, you may drag any connector to the top, right, bottom, or left of the symbol, in any order. For the half adder, we'll leave all the inputs on the left and the outputs on the right, but feel free to drag them around to different positions, if you prefer.
When you have completed everything, click the Create IC button.
Your new custom integrated circuit will appear in the components list on the left-hand side of the main Logicly window. You will find a new category at the bottom of the list, named Custom. To use the new Half Adder circuit, simply drag it into the editor and connect to the inputs and outputs, just like any other component.
Delete a Custom Integrated Circuit
Find the custom integrated circuit in the component list on the left of Logicly's main window. It should appear in the Custom category. Right-click the icon for your custom circuit, and choose Delete Integrated Circuit.
If the custom component being deleted is being used in the current document, or if another custom component includes it in the design, an error message will be displayed to explain that the custom circuit cannot be deleted.
View the Contents of a Custom Integrated Circuit
After creating a custom integrated circuit, you may view its design, but it cannot be edited. Find the custom integrated circuit in the components list under the Custom category. Right click and select View Integrated Circuit... from the context menu. The parent document will be temporarily hidden, and your custom integrated circuit will be displayed instead. In this view you can pan and zoom to navigate around your circuit and all components are fully functional. This is a separate simulation that is completely isolated from your main document, so there will be no consequences if you choose to interact with the components. When you are finished, click the Close button in the upper left corner of the main Logicly window to return to the parent document.
Alternatively, to view the contents of a custom integrated circuit, you can double click an instance of it on the editing surface.
Since it is not possible to edit a custom integrated circuit after you created, a Copy to Clipboard button is available when you view a circuit's contents. You can use this to paste the contents back into the parent document to edit them and create a new custom integrated circuit.
Sharing Custom Integrated Circuits Among Multiple Documents
There are two ways to share custom integrated circuits from one document with another. The easiest way to do it is simply to select any integrated circuit on the editing surface in the first document, copy it to the clipboard, and paste it into a second document. The custom integrated circuit will be added automatically to the components list, and you can reuse it anywhere in the second document as if you had originally created it there.
If you prefer to manage a set of integrated circuits in a separate external file, you can export your components list to an Integrated Circuit Library file.
Open the File menu and choose Export Integrated Circuit Library.... A save file dialog will open, and when you select a location, a logiclylib file containing all of the current document's integrated circuits will be saved to your computer.
As you can see in the screenshot above, you can also select Import Integrated Circuit Library... from the File menu. When you select a logiclylib file from your computer, all of the custom integrated circuits that it contains will be added to the current document. If any of the custom integrated circuits from the library already exist in the current document, Logicly will not create duplicates. Each new custom integrated circuit that you create is given a unique ID that identifies it the same way in every document that you add it to.