Get started with making your own libraries for DesignLab. DesignLab libraries let you make “Chips” you can use in any of your DesignLab circuits. Make chips with VHDL, Verilog, or the Schematic editor, the choice is yours!
Library types
As of Designlab 1.05. there are three Library templates :
– which uses schematic
– which uses wishbone schemac
– which uses wishbone Vhdl
This Guide will cover the first one – Stand Alone Schematic. Please take a look at these additional guides for the other types :
Schematic Library
After that a new window pops up, which includes .cpp and .h tabs and the edit_library tab, which includes the steps one has to make for creating a library.
Creating a chip
By right clicking on the symbol and then:
- Symbol -> Push into Symbol you can view the inner circuit of the chip.
- Symbol -> Edit Symbol you can change the look of the symbol
The inner circuit looks like the picture below:
Since we want to change it we will for example replace the input buffer with an inverter. To do that after we delete the buffer symbol we search/write in Symbol name Filter “inv” and then click on the result and then put the new symbol in place of the buffer.
Now since the buttons and leds are busies and the inverter is not we get the following error :
Luckily this can be easy fixed – we right click on the Inverter symbol then go to Symbol->Rename Selected Instance
In the new window we select Iterated Instance Name and then write for starting and end value the same values as in the buttons :
Simulation
Now after we save and close the schematic window, we want to simulate how the chip is behaving. In order to do that we click on Simulate and then select the Simulate_Your_CCL_Design and then double click on Simulate behavior Model.
After the new window opens we expand all pins and Your_ External_pins and then hit F6 to zoom out and see the whole simulation. As expected when the buttons are ‘0’ the leds are ‘1’ and when they are ‘1’ the leds are ‘0’ .
Changing the design further
Let us now change the number of buttons and leds for example lets make them 8. To do that we open the schematic again, push into it as before and now we right click on the buttons first and click Rename Port . In the new window we select Rename the branch and then write buttons(7 :0) instead of the current buttons(3 :0).
We repeat this step for the leds signal and then as shown above also for the inverter.
We made changes to the interface of our chip, but the schematic symbol of it doused automatically change as well. To update it we make sure we are in Implementation view and then expand the Edit_Your_Chip_Design click on the Example_Library. After that we expand the Design_Utilities and double click on Create Schematic Symbol .
Now we if you haven’t closed the schematic window you have to make a click in it in order for the ISE do detect that the symbol has changed and pop up a window to acknowledge the update .
Changing the simulation model
Since we have a new chip interface, we have to modify the simulation model in order to be able to simulate it. To do that we go back to the Simulation view and double click on Simulate_Your_CCL_Design which opens the simulation model as vhdl code.
In the opened up vhdl file we have to modify all signals named buttons and leds to have 8 bits as the new interface. This is done by changing the (3 downto 0) section to (7 downto 0) . Some where in the code this pins get initialized or get new values assigned, this new values have also to be 8 bits long.
Now we simulate as shown above and if the we are happy with the results we close the ISE.
Creating examples for all boards
If look back at our edit_library tab in the Library template we will see that till know we finished only step 1. Now we move to step 2. In this tutorial we will create a circuit only for the Papilio Pro board cause the next steps are identical for all other boards. To start we click on the Papilio Pro link.
After the ISE opens we double click on the Papilio_Pro to open the schematic window.
Since we created a new symbol the ISE will want that we acknowledge to update the symbol, but we can have access to the symbol also if we click on Symbols tab and then find our library in Categories and click on it.
Now that we have the symbol we want to connect some board peripherals to it. The easiest way to do that is to go to Design tab and double click on Utility which opens a new window with all board peripherals. From this new window we can select and copy peripherals we want to use and then past it in the Library schematic window.
Let us take all the Wing_AL pins and paste them in our Library schematic. Instead of making a so called bus tap there is a easier way – if we use the bus8 symbol. You can find it like the inverter symbol above in this tutorial.
You should end up with something like this :
We will put I/O markers to the input bus8 by clicking on the I/O button and then drawing a squire around the signals.
Now we go back to the Utility tab and using the Add Net Name button we pick up a pin name – for example Wing_AH0
Now we go back and using the same button, but we select the Increase the name option we click on the wire/ line of all Input pins.
After we are ready, we save, go back to Design tab and double click on Generate Programing File . When the generation ends. We close the ISE and go back to our edit_library tab in the Library template. Now you should repeat this step for all other boards.
Load circuit
If we want to test the generated circuit and have a Papilio Pro connected we go to Tools – Board – and select the Papilio Pro. Then we click on the Load circuit button.
Sharing the Library
To share this new library we go to Tools – Archive Sketch save the archive and then click on the link in step 4 to head up to Designlab-libraries
Full Video Walkthrough