HyperCube Home Store Updates ArduOne Murano Burano Java Forum WhoAmI

Murano, the Xilinx CPLD development board


CPLD board

Board description

A CPLD is a kind of FPGA with less resources. The acronym means Complex Programmable Logic Device and summarizes in itself all the possible combinations of existing digital circuits. Anyone like me who played with TTL logic around thirty years ago, knows that there were, and still there are, many TTL integrated with different logic functions, from the simplest logic gates such as ORs or ANDs to more complex combinatorial networks such as comparators , multiplexers or priority encoders. Even for sequential networks, there were IC with two simple flip flops up to ICs containing complex counters or small memories. To create a complete circuit it was necessary to choose these basic elements and connect them in the right way to achieve the desired function. This way of making digital circuits is obsolete. Nowadays, to create a digital circuit, you can just draw it on a PC or describe it using a descriptive language (VHDL), and then upload the file produced from the compilator to the device. After the upload the device became what you drawn, or described on the PC. The composition of the various parts is done through a CAD or through the connection of various modules of the descriptive language. When creating circuits by drawing them, in addition to the various standard modules there are still modules that refer to the 7400 series TTL integrated circuits.

Murano is a development board based on the Xilinx XC9572XL CPLD. It is powered at 5V by a special power cable that draws the current from any USB socket and transfers it to the board via a 5.5 mm power jack. The CPLD operates at 3.3V and for this reason the card mounts a 3.3V voltage regulator. The device, however, is TTL compatible, ie for all the pins the output voltages are within the TTL logic activation limits while in input all the pins are TTL tolerant. No level shifter is therefore needed to interface it directly with TTL logics. Among the lateral pins arrays there are also two 5V outputs to feed external TTL circuits. The card is provided with a very low frequency local oscillator. Frequency is of the order of units or tens of Hertz adjustable through a multi-turn trimmer. The reason why an external oscillator was added is due to the fact that Xilinx does not recommend the use of internal gates to make RC oscillators. The card is able to operate at much higher frequencies, in the order of tens of MHz, but given the limited number of internal flip flops needed to reduce the clock frequency to acceptable levels to see a flashing LED, I better thought to add an oscillator that already had a low frequency. To increase the operating frequency it is possible to replace the capacitor C1 with one of smaller value. If it is not enough it you can just replace the oscillator with crystal oscillator with the desired frequency and, in case, if you want to use the same clock line, remove the 74HC132 from the socket. The device has three inputs dedicated to the clock signal of which CK1 is used by the oscillator.

How to use the CPLD board

The easiest way to create a complex digital circuit without having to learn a new language is to design it on a CAD. Xilinx provides a development environment that in addition to allowing the description of the device through the VHDL language (Very high speed .. Hardware Description Language) also allows to draw it through the composition of standard modules such as flip flops or logic gates. In order to program a CPLD you need a JTAG interface that must be connected between the USB of the PC and the CPLD card. The interface is called "XILINX Platform Cable USB", and can be easily purchased on ebay at reasonable prices. Instead, the program can be downloaded for free from the Xilinx website: www.xilinx.com You need to activate an account with your personal data before downloading. There are various versions compatible with the various operating systems, therefore it is necessary to first check which version is most suitable for your operating system. Here is a link that can help you in the choice:

https://www.xilinx.com/support/answers/54242.html

After the installation you have to make a project add the files you prefer to the project, there are two main alternatives; The schematic entry that is the one we will use for this first example or the VHDL. Do describe a device using VHDL you have to read at least one good book about the subject. As first book I can suggest you "Laboratory experiments using Xilinx XC95108 CPLD with Xilinx design and simulation software" from "James W.Stewart and Chao-Ying Wang" So for the schematic entry way you just have to start the program. Click on File then New project, give a name to the project and click the Next button. On the following page select the CPLD family XC9500XL and the specific device XC9572XL. Once the project is created select from main menu Project and then new source, in the opening page you have to select as input file Schematic and give it a name. An empty page will appear where you can draw your schematic adding the elements from the add button. You can find ground and Vcc connection under Add --> Symbol --> General CPLD constraint Add the device, for example a shift register, add the wires is terminated you you have to decide what is an input and what is an output adding to all the used (external) pins a buffer need to link the io names to the actual CPLD's pins. Now you can connect the input buffer to the actual external ports of Murano. Port names are listed on the board as P1 to P44. As you can see from the picture the sequence to associate each buffer to each Murano's port pin is:

You can also use the Constraint editor to achieve the same result but it's more complicated. The aim is anywhow to create a file named UCF (User Constraint File) that associate each buffer (input or output) to the actual port pin of your device. This is a feature that I personally find cool, since you can start welding the CPLD to the circuit with no worry about the port pins and decide later where to connect it to the internal circuit. So the port pin is not associated to the signal as could be natural to think but to it's signal buffer. In the picture you can see the serial input signal already associated to port pin P5 and the highlighted in red input buffer being associated to port pin p1.

So once you have associated each buffer to each CPLD pin you can save the schematic and implement to obtain the final .jed file that will be sent to Murano through the USB Xilinx interface. To do that and see the pocess running you have to select the design tab in the lower left column and hit the button process and then Implement Top Module. Implement You will see some activity in the lower left column. Don't worry if you see some warning icons like in the image beside, what is important at the end that the process produce the .jed file indicated by the green check mark beside the Generate programming file phase. There should be also a report on the main screen that tells you if the "compilation" was succesfull and how many resources (ports and registers) used for this project.

Now we are ready to download the file to the board. Connect Murano to the usb power source, connect Platform Cable USB to Murano using the flat cable and the adapter to the Murano's JTAG port and connect the USB cable of the programmer to another USB port of the PC. The programmer's adapter LED should be green when Murano is powered. To send the file now select on the upper bar Tools and then Impact, namely the programmer application. Click on Boundary scan and then on Initialize chain At the end tou should see on the screen an Icon representing the CPLD in green, click yes to the pop up window and select the jed file. If you didn't change the name the file should have the same name of the project with the .jed. The CPLD icon should now turn green indicating that now the CPLD can be programmed with the associated .jed file. Right click on the green CPLD icon and select program. The downloading process takes a little while but then you are done. The CPLD became what you have just drawn on the computer screen.

Here is a table with all the experiments made so far with the CPLD board:

Project name VHDL file Schematic Description Datasheet of peripherals Photo and/or video
Blinking LED -- led.sch EN, DE, FR IT Coming soon Video, music - Nils Wülker "Highline" feat. Theo Croker
Driving an LCD glass hallo.c LCD.sch Driving a simple LCD glass with no electronics directly with murano. A shift register receives data from a microcontroller, in this case an ArduOne, and drives directly the segments generating the necessary 3.3V AC voltage. EDC004A Photo, Video
Driving a TL311 Coming soon Coming soon Description Coming soon Video
Stepping motor Coming soon Coming soon Description Coming soon Video
Alphanumeric LCD Coming soon -- Description Coming soon Coming soon
DM9368 DM9368.vhdl TestSchematic.sch Creating a new symbol from a VHDL file. In this the simulation of a DM9368, a quite unique device that converts binary into exadecimal 7 segment rappresentation of the nibble. It doesn't have an input latch and a current control for the output as the original device, but it works. Here is the VHDL file that defines its behavior and a schematic using it. Datasheet of DM9368 Test running
Keyboard -- internal keyboard sch. Schematic entry for a keyboard interface. Keyboard interface for a 4x3 keyboard. In the video the two numbers shown are the column scan number[1,2,4,8], and the pressed key [4 to 15] represented in hexadecimal [4..F]. There is a scheamtic of the real keyboard and the internal interface schematic loaded into Murano as jed file. Pull up resistors are really needed. Home made Hardware, Photo, Video
Fire simulation -- pseudorandom.sch Attempt to simulate the random fire light with a 33 bit pseudorandom generator (repetition cycle 8,589,934,591 shifts). Resources: Random generator -- Video