Ideas for CPLD based projects - Page 1
Forum section: electronics / general

author: garvind25
author_rank: Regular Contributor
timestamp: July 29, 2017, 05:51:50 am
content: Hi there,I am new to CPLDs and FPGAs. I am looking for ideas to make a CPLD based project (HDL coding and PCB design). Can anyone suggest any project ideas pls?Thanks,Arvind Gupta

author: rstofer
author_rank: Super Contributor
timestamp: July 29, 2017, 03:10:30 pm
content: How about a tiny CPU?https://www.bigmessowires.com/cpu-in-a-cpld/CPLDs are rather limiting in that they don't have BlockRAM. As a result, any CPU type project will require an external SRAM or EEPROM. That's ok, it just requires more external chips.OTOH, it is possible to find CPLDs in more user friendly packages that the typical BGA used by many FPGAs.Just the other day, I was thinking about using a 5V CPLD to implement some glue logic. I want to interface a Compact Flash device to an old S-100 bus. Along the way, I need some memory overlay management and a bit of address decoding. This is a perfect application for a CPLD. Simple logic with a number of IOs.

author: legacy
author_rank: Super Contributor
timestamp: July 29, 2017, 03:34:01 pm
content: Here I am planning to use a cpld as keyboard matrix-keys scanner.Imagine you can find a good matrix-keys from a laptop's keyboard (done)Imagine you can reverse the key-map (done)Imagine contacts are friendly enough, and you can solder a connector (already done).A cpld with 15+17 pins is perfect for the purpose.And it just needs other 2 pins to implement a serial line.Inside the cpld you need a simple fsm plus some decoders and encoders.Nothing special, but the project is funny and useful.(edit:yes, it's a part of a more complex project)

author: garvind25
author_rank: Regular Contributor
timestamp: July 29, 2017, 04:05:32 pm
content: Hi,Thanks for the response. I was looking something to start of with making something on a 10 cm by 10 cm pcb, something which is useful in daily life and so on. The CPU project looks great but may not have any usefulness. BTW I am planning to use coolrunner series CPLDs -- QFP devices; BGAs are way beyond my capacity (at least for now-- till I graduate using the QFPs). Pls. let me know if you can suggest something based on these constraints. BTW I have successfully made a parallel port downloading cable at homeThanks,Arvind Gupta

author: legacy
author_rank: Super Contributor
timestamp: July 29, 2017, 04:43:46 pm
content: Umboh. How can I know what you need for your daily life?Here I have the need of random numbers generator device.Code:do_lfsr0 : process (in_Clock)begin-- xx xx xx xx--07 06 05 04 03 02 01 00 07 06 05 04 03 02 01 00 07 06 05 04 03 02 01 00 07 06 05 04 03 02 01 00--31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00if rising_edge(in_Clock) then--32bitlfsr0(0) <= lfsr0(9) xor lfsr0(4) xor lfsr0(30) xor lfsr0(15);lfsr0(8) <= lfsr0(1) xor lfsr0(26) xor lfsr0(14) xor lfsr0(31);lfsr0(16) <= lfsr0(17) xor lfsr0(20) xor lfsr0(6) xor lfsr0(23);lfsr0(24) <= lfsr0(25) xor lfsr0(12) xor lfsr0(22) xor lfsr0(7);lfsr0(31 downto 1) <= lfsr0(30 downto 0);end if;reg_r01 <= lfsr0;end process do_lfsr0;Something like this, in a little XC9572XL cpld (smd package) attached to a ColdFire board.Silly circuit, but it helps. It's very useful for my application since it simplifies a lot of stuff.I am afraid that "being useful" is based on or influenced by personal feelings, tastes, or opinions.edit:ops, I had forgotten: may be you can use a similar circuit to implement the Roulette Game.In this case you need to reduce the range, which means you have to modify the LFSR circuit.It seems a funny idea for a PCB-project. Alternative: you can drive two LED-dices

author: MK14
author_rank: Super Contributor
timestamp: July 29, 2017, 05:01:00 pm
content: Quote from: garvind25 on July 29, 2017, 05:51:50 amYou could make a multi-seven segment displayed frequency counter. E.g. 8 Digits. All the digit decoding, pulse counting, timing and control/gating circuitry could go in the CPLD (the inputs may need careful analogue processing e.g. with a high speed comparator). Assuming it all fits in the device you choose. It should count to a reasonable maximum frequency, of maybe around 50 to 150+ MHz (device and programming dependent).Alternatively, a simple 8 digit calculator.Another alternative is to make a complicated pattern, LED flasher. Which has an 8 x 8 LED matrix, and creates interesting, flashing/soothing patterns on it, automatically. By using shift registers, and stuff.

author: TiN
author_rank: Super Contributor
timestamp: July 29, 2017, 05:35:50 pm
content: Integrating multi-slope ADC on CPLDYou could try to get high-resolution ADC using few external opamps and comparator together with the digital control logic in CPLD.

author: NorthGuy
author_rank: Super Contributor
timestamp: July 29, 2017, 09:10:53 pm
content: I would definitely go with FPGA. There's no reason to go with CPLD as a hobby project. Don't be afraid of BGAs if you have enough budget.You can start from something simple, yet useful. For example Logic Analyzer. You can make it with USB or Ethernet. Or you can drive a small LCD from your FPGA to display the results (although this may not be as easy any more).

author: legacy
author_rank: Super Contributor
timestamp: July 29, 2017, 10:47:27 pm
content: Quote from: NorthGuy on July 29, 2017, 09:10:53 pmStart from something simple. USB or Ethernet.Looks like a combination of statements that are opposed to one another.

author: Kalvin
author_rank: Super Contributor
timestamp: July 29, 2017, 10:55:35 pm
content: Make a simple programmable pulse generator. Quite handy for testing power supplies and other circuits requiring adjustable pulse width, pulse period and pulse polarity. Go for FPGA as soon as possible, as the price difference is not that big and you will get a lot of gates to play with.

author: legacy
author_rank: Super Contributor
timestamp: July 29, 2017, 10:56:47 pm
content: Quote from: NorthGuy on July 29, 2017, 09:10:53 pmAlso! sram-FPGA are good because they use internal ram, while cpld use flash.It makes things more comfortable since flash allows a finite numbers of writes.I usually like it when I know that I have to interact a lot of times between the simulator (when signals live in their ideal world) and the final board (where signals live in the real world) attached to a logic analyzer.But! FPGA are more complex to be decoupled on PCB, you need to pay more attention on decoupling caps, and they need an external chip for the bootstrap, and they are usually not 5V tolerant.Pro/Con: it depends on needs. It's not an absolute.

author: legacy
author_rank: Super Contributor
timestamp: July 29, 2017, 11:09:30 pm
content: Quote from: blueskull on July 29, 2017, 10:50:12 pmUSB can make you nut about signal integrity, and handling usb on fpga is tricky, as well it's a tricky (if you are a beginner) to couple an Cypress chip, which allows a bandwidth of 20Mbyte/sec.Do you mean USB like FTDI-uart? That kind of chip are not tricky since they are a simple asynchronous serial line, but they can can handle up to 1Mbit/sec, which can't be used for a LA since it doesn't have enough bandwidth.Indeed, look at what was used onthisOpenSource LA by DangerousPrototypesSurprise: fpga attached to a built-in USB MPU(PIC)This kind of project is not classified as "simple",, and I count five releases at least, which means that debugging has been not so piece of cake.

author: westfw
author_rank: Super Contributor
timestamp: July 30, 2017, 04:28:41 am
content: Here's something simple, that came up recently in another discussion:BCD to 7segment encoder...Implement as many digits as fit on the chip (n*4bit input, n*8 multiplexed output), in as cheap a CPLD as you can find.

author: NorthGuy
author_rank: Super Contributor
timestamp: July 30, 2017, 02:28:26 pm
content: An FPGA project has to have some means to communicate with an external world. You'll get several boards printed anyway. After your first project us done, you can assemble more boards and use them for different projects. Therefore it's good to give it some general ways of talking to the world.USB is a good choice with a number of options to do it: - UART-to-USB translators, more sophisticated intermediary chips, free IP, your own stack ... There are different degrees of difficulty, involvement, and benefits. It all depends on your skills and amount of free time you posses.

author: DD4DA
author_rank: Contributor
timestamp: August 06, 2017, 07:28:21 pm
content: My first CPLD Project based upon XC9500 Devices was an Incremental decoder. This contained an up/down counter and a register wthere the count value was written and readable. A tiny project but this was a good entry point for startup learning VHDL.

author: rstofer
author_rank: Super Contributor
timestamp: August 06, 2017, 08:27:59 pm
content: Quote from: NorthGuy on July 30, 2017, 02:28:26 pmThe easy way to get 4 serial ports in/out of an FPGA is with one of these modules. I just solder the entire module into my project board. I could as well just replicate the design on my project board but why bother?https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/FT4232H-MINI-MODULE/768-1031-ND/2027253

author: legacy
author_rank: Super Contributor
timestamp: August 06, 2017, 08:50:22 pm
content: Quote from: rstofer on August 06, 2017, 08:27:59 pmin bonding configuration