Author Topic: Ideas for CPLD based projects  (Read 8056 times)

0 Members and 3 Guests are viewing this topic.

Offline garvind25Topic starter

  • Regular Contributor
  • *
  • Posts: 59
  • Country: in
Ideas for CPLD based projects
« on: July 29, 2017, 05:51:50 am »
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
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9906
  • Country: us
Re: Ideas for CPLD based projects
« Reply #1 on: July 29, 2017, 03:10:30 pm »
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.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Ideas for CPLD based projects
« Reply #2 on: July 29, 2017, 03:34:01 pm »
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
)
« Last Edit: July 29, 2017, 03:46:53 pm by legacy »
 

Offline garvind25Topic starter

  • Regular Contributor
  • *
  • Posts: 59
  • Country: in
Re: Ideas for CPLD based projects
« Reply #3 on: July 29, 2017, 04:05:32 pm »
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 home  8)

Thanks,
Arvind Gupta
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Ideas for CPLD based projects
« Reply #4 on: July 29, 2017, 04:43:46 pm »
Umboh. How can I know what you need for your daily life?  :-//

Here I have the need of random numbers generator device.

Code: [Select]
  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 00
    if rising_edge(in_Clock) then
        --32bit
        lfsr0(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 :D
« Last Edit: July 29, 2017, 04:54:31 pm by legacy »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4665
  • Country: gb
Re: Ideas for CPLD based projects
« Reply #5 on: July 29, 2017, 05:01:00 pm »
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

You 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.
« Last Edit: July 29, 2017, 05:02:52 pm by MK14 »
 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
Re: Ideas for CPLD based projects
« Reply #6 on: July 29, 2017, 05:35:50 pm »
Integrating multi-slope ADC on CPLD :)
You could try to get high-resolution ADC using few external opamps and comparator together with the digital control logic in CPLD.
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 
The following users thanked this post: kridri

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 3188
  • Country: ca
Re: Ideas for CPLD based projects
« Reply #7 on: July 29, 2017, 09:10:53 pm »
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).
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Ideas for CPLD based projects
« Reply #8 on: July 29, 2017, 10:47:27 pm »
You can start from something simple, yet useful. For example Logic Analyzer. You can make it with USB or Ethernet

Start from something simple. USB or Ethernet.
Looks like a combination of statements that are opposed to one another.

 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Ideas for CPLD based projects
« Reply #9 on: July 29, 2017, 10:55:35 pm »
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.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Ideas for CPLD based projects
« Reply #10 on: July 29, 2017, 10:56:47 pm »
I would definitely go with FPGA

Also! 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.
« Last Edit: July 29, 2017, 11:14:53 pm by legacy »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Ideas for CPLD based projects
« Reply #11 on: July 29, 2017, 11:09:30 pm »
Something simple... USB...

USB 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 on this OpenSource LA by DangerousPrototypes

Surprise: fpga attached to a built-in USB MPU(PIC) :D

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.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4230
  • Country: us
Re: Ideas for CPLD based projects
« Reply #12 on: July 30, 2017, 04:28:41 am »
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.
 

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 3188
  • Country: ca
Re: Ideas for CPLD based projects
« Reply #13 on: July 30, 2017, 02:28:26 pm »
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.

 

Offline DD4DA

  • Contributor
  • Posts: 35
Re: Ideas for CPLD based projects
« Reply #14 on: August 06, 2017, 07:28:21 pm »
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.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9906
  • Country: us
Re: Ideas for CPLD based projects
« Reply #15 on: August 06, 2017, 08:27:59 pm »
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.

The 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
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Ideas for CPLD based projects
« Reply #16 on: August 06, 2017, 08:50:22 pm »
4 serial ports in/out

in bonding configuration  :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf