Skip to content

Frequently asked questions

campbellsan edited this page Jun 28, 2014 · 44 revisions

If your question is not answered below please raise an enhancement issue with your question in the body of the issue. To do this, click the Issues tab above and click on 'New Issue' to get started.

How do I get my hands on a GuzuntyPI?

Currently, the only way to get one is to obtain and build a bare printed circuit board. You can get a complete kit or a bare PCB. The cost varies depending on where you live, please click the link in the next section to find out.

How do I order?

To grab a Guzunty, use the Paypal links here.

Please ensure your mailing address is set up in your Paypal account. We will not take payment until the board is on its way to you.

What can I do with it?

Aside from low cost pin protection and I/O expansion, there are a great many things a GuzuntyPI can do. You can think of it like a swiss army knife peripheral or as a glue device that can bring all the parts of your project together. Check out the Gallery pages to see some examples.

How easy is it to build?

Very easy indeed. The GuzuntyPI has been designed with 'through hole' components only. That is, there are no fiddly surface mount components to deal with at all. Just follow the advice in our construction notes and this great guide to soldering and you will be successful. Assembly time varies by soldering experience but unless you really want to savour the experience, you'll need less than an hour.

How does it work?

The XC9500XL CPLD is programmed using a file in Xilinx Serial Vector Format. Cores you can download and cores that you make yourself are stored in this format. To program the CPLD with a particular core you use a utility that decodes the XSVF file and sets up the device using four special programming and test pins called collectively the JTAG interface. The CPLD retains its program during power down, so you only need to program it once (or until you move on to another project). The programming process takes less than a minute and once programming is complete, the programming pins used on the Raspberry Pi GPIO can be repurposed if needed by your project.

How does the Guzunty expand my RPi IO?

It does this by implementing a Serial Peripheral Interface (SPI) that the RPi can send commands across. To do this, four pins are needed on the Guzunty CPLD chip and the corresponding dedicated SPI pins on the Raspberry Pi GPIO array are also needed. This leaves an additional 30 IO pins available for expansion on the CPLD and you still have 13 GPIO pins available on the Pi (29 and 12 for clocked cores).

How do I know which core to use?

That's easy. First of all, decide how many inputs and outputs your project requires. Most XSVF files on this site have a coded filename, such as gz_16o8i.xsvf. The letters tell you what numbers of pins do what. In this example, the core provides 16 outputs and 8 inputs via the RPi's SPI interface. Besides 'o' and 'i', 'p' denotes a pulse width modulation output. As we get more requests for cores, this list may grow. Additionally, if the letter is upper case it means that the function is provided directly to a Raspberry Pi GPIO pin, rather than via the SPI interface. Cores which provide specialised functionality do not follow this name encoding convention. Examples are gz_test.xsvf (which can be used to test your completed board) and gz_led_driver.xsvf (which drives a 4 digit 7 segment display).

How do I know the pinouts for a particular core?

The fitter report for each core tells which Guzunty IO pins map to which functions of the core. For example, outputs<0> FB2_2 means that the lowest output bit is mapped to the pin labeled 'FB2 2' on the board.

How many RPi GPIO's does Guzunty tie up?

In the standard configuration, unclocked cores tie up 4 GPIO pins for SPI (GPIO's 8, 9, 10 and 11). Clocked cores (see below) require one additional signal (GPIO4). Programming is done using GPIO's 17, 22, 23 and 24, however once the CPLD is programmed they are no longer dedicated. With reconfiguration, you could get the number of required dedicated pins down to 1 depending on what you're doing.

Do I have to create my own cores?

Not at all. All you need is the loader available in the repository and a core that does what you need for your project. Once you have the right one, you may never need to replace the core with another. It really depends on whether you like to have many projects at once or one longer term project.

How do I create new cores?

The chances are you won't have to, but there is a free toolchain you can use to create CPLD cores. If you are used to creating hardware schematics, you can use those to specify the required behavior of your core. Alternatively, if you prefer, you can use the VHDL and Verilog hardware definition languages. These languages have some similarities to the computer programming language Ada and so are often preferred by people with a programming background.

Can I do core development on my Pi?

Unfortunately not. The VHDL flow is supported by the Xilinx integrated development environment, ISE. At one point, Xilinx did have a web based version of ISE that could have been accessed on the Pi. Unfortunately, this service was withdrawn a few years ago. For the foreseeable future, ISE runs only on Windows and a very limited subset of x86 Linux distributions.

I don’t want to get into core development but I’d like to see a core to do ‘X’, what can I do?

Create an enhancement issue in this repository and tag it with the ‘new core request’ label. If the function is general purpose, either myself or another community member will see if it can be fitted into an XC9572XL’s resources. If the function is very specific, you may have to download the toolchain and create your own core, perhaps starting with building blocks which can be found on the open hardware sites mentioned below. We are here to help you get started with the toolchain, but be aware that you will need to sign up with Xilinx to obtain a free copy of the development tools.

Are there other resources available?

Yes, there are websites that provide generic open source cores in several of the standard Hardware Definition Languages. One example of this is opencores.org. The difference with the Guzunty github website is that here we have cores that have been adapted as required to the XC9572XL CPLD and configured for use with a Raspberry Pi.

Can I create analog electronics?

No. A Complex Programmable Logic Device is strictly digital only. You can of course use the CPLD to control analog signals using devices such as a CD4067.

What is a clocked core?

Some cores carry out tasks such as polling or refreshing independently of the Raspberry Pi processor. These cores release the RPi CPU from this duty but need an external hardware clock. This is taken from the Pi using the alternate function of GPIO4.

What is the maximum clock speed?

The rated maximum clock speed speed of the CPLD is 178 million cycles per second (MHz). In practice, the Raspberry Pi can provide a maximum hardware clock speed of 125MHz. The actual speed you might actually want to use depends to some extent on your design. For example, a simple clock divider core has been shown to work fine up to the RPi's maximum external clock speed. By contrast, it was found that the LED driver design is best clocked much more slowly; at 4MHz or less.

How fast can the SPI be run?

In theory, the SPI, or Serial Peripheral Interface can be clocked at the maximum rate provided by the Raspberry Pi, which provides a range between 3.814 kHz to 125 MHz. However, it has been found that data transfer at 125MHz is very unreliable. Since data transfer at 124MHz appears to be perfectly solid, it is suspected that the 125MHz setting is unreliable for a reason unrelated to the GuzuntyPI board.

What are all the jumper pads on the underside?

The Guzunty board is highly configurable. Its default configuration is designed to provide maximum protection for your Raspberry Pi. It is possible to reconfigure the board to your exact needs by cutting links between these pads and joining others with a blob of solder. You can explore the possibilities by studying the schematic. The default configuration will be useful to most people without modification. If you do modify the configuration, we'd love to hear what you did and why.

What is the maximum amount of IO I can get with an unmodified board?

17 on P1 and 8 on P2, making a total of 25 IO pins.

It says above that there are 30 free pins on the chip. Why are they not all available?

The maximum number of 25 pins is less than the 30 free pins mentioned above in the interests of ensuring that the Raspberry Pi pin gets as much protection as possible. If you know what you are doing, you can modify the default configuration to make more IO available.

Can I power my projects from the Guzunty?

Yes, the Guzunty provides Ground, 3.3v and 5v outputs. These are taken from the power pins on the RPi GPIO header and so you must be sure to adhere to the overall power drain limits specified for the Pi itself. Also, take care not to jumper or otherwise short pins on the power header or you may damage your Pi (the silk screen shows a warning beside a large exclamation mark to help remind you of this). The Guzunty itself does not draw much power unless it is sinking current for another device it is controlling.

Can I use the Guzunty with 5v level devices?

Yes, the CPLD itself operates at 3.3v, but the IO pins are '5 volt tolerant'. This means that it will operate with 5 volt inputs without damage. On the output side, 3.3 volts is reliably sensed as a logic '1' in almost all 5 volt technology logic. One significant exception to this is 5v CMOS, which requires a level of 3.5v at its inputs to detect a logic '1' value.

Can I use the Guzunty with 2.5v devices?

Yes. To do this, you must remove the IO voltage jumper on the power header (P3) and provide an external 2.5v power source onto pin 2.

Can I run more than one Guzunty on the same Raspberry Pi?

Yes. To do that you modify one of the boards to connect the SPI CE1 slave select signal (make link JP15 and, if you wish to maintain full Pi protection, break link JP27). You would then modify the constraints file for the core of the second Guzunty to map the core select signal to the CE1 signal and rebuild the core. You will then be able to address the second Guzunty on the /dev/spidev0.1 device, while the first Guzunty remains accessible on /dev/spidev0.0.

Is GuzuntyPI open source?

You bet. The schematic is found here. The design was created in Kicad and the design source files are in the repository. Source code for all cores and executables are also available in the repository.

How did you capture the waveforms in the documentation?

Those are created with iSim, which is part of the Xilinx free tool suite, ISE. Find out how to set up your computer to develop cores, including iSim, here.

Clone this wiki locally