Author Topic: Bought an Altera CPLD dev board, where to start?  (Read 11886 times)

0 Members and 1 Guest are viewing this topic.

Offline vortexnlTopic starter

  • Contributor
  • Posts: 40
Bought an Altera CPLD dev board, where to start?
« on: July 01, 2014, 10:11:06 am »
I've always liked playing with digital logic, it kinda started in minecraft using redstone circuits, but since I'm an electrical engineer, I wanted to get familiar with FPGA's and CPLD's. So I recently bought an Altera CPLD dev board together with a programmer, and I want to start playing around with it. But since CPLD's aren't as powerful as FPGA's, what are some fun projects to get started with? I've looked on the internet, but couldn't find much. So I thought I'd ask the EEVBlog community!

Thanks in advance,

Nick
 

Offline jamesglanville

  • Contributor
  • Posts: 47
Re: Bought an Altera CPLD dev board, where to start?
« Reply #1 on: July 01, 2014, 10:47:05 am »
You could make a bus readout for 7 segment displays, reading 8 or 16 pins and outputting the data as hex on the 7 segment leds. That's some fairly simple logic, plus a handy tool (useful for when I was debugging my z80, although I used an MCU instead)
 

Offline bwat

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: se
    • My website
Re: Bought an Altera CPLD dev board, where to start?
« Reply #2 on: July 01, 2014, 11:19:02 am »
Why CPLD? This is a serious question from someone who has never used one and doesn't understand the pros/cons of them.

I'm working my way through a digital design book with FPGAs as my target - described here https://www.eevblog.com/forum/microcontrollers/papilio-duo-fpgaardunio/msg469049/#msg469049.
"Who said that you should improve programming skills only at the workplace? Is the workplace even suitable for cultural improvement of any kind?" - Christophe Thibaut

"People who are really serious about software should make their own hardware." - Alan Kay
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Bought an Altera CPLD dev board, where to start?
« Reply #3 on: July 01, 2014, 12:12:48 pm »
One CPLD alone can't do much, they don't have many logic elements. It is easier to learn hardware design with FPGAs.

But I could imagine some fun projects in combination with a microcontroller or some SRAM. For starting, maybe implement something simple, like a frequency counter or a PWM output, after the obligatory blinking LED :)

Why CPLD? This is a serious question from someone who has never used one and doesn't understand the pros/cons of them.
Usually FPGAs have more logic elements, but they need an external configuration memory and multiple supply voltages. A CPLD has internal configuration memory and there are types which needs only one supply voltage. But some Lattice FPGAs have internal configuration memory, too, and one supply voltage, and some CPLDs need more than one supply voltage. So the main difference is the number of logic elements, FPGAs have more, and more interesting things like integrated PLLs, RAM and hardware multipliers. Typically CPLDs are used for simple logic, like glue logic for chip enable address decoders, latches etc.

I think there are technical differences how the internal logic elements work as well, but modern synthesis tools hide this complexity and simple VHDL or Verilog programs can be synthesized without changes for both types.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: Bought an Altera CPLD dev board, where to start?
« Reply #4 on: July 01, 2014, 12:44:17 pm »
I've always liked playing with digital logic, it kinda started in minecraft using redstone circuits, but since I'm an electrical engineer, I wanted to get familiar with FPGA's and CPLD's. So I recently bought an Altera CPLD dev board together with a programmer, and I want to start playing around with it. But since CPLD's aren't as powerful as FPGA's, what are some fun projects to get started with? I've looked on the internet, but couldn't find much. So I thought I'd ask the EEVBlog community!

Thanks in advance,

Nick

Although I have no experience in this area, I was thinking of a cool application for a CPLD to drive  any LCD of my choice to free I/O and  processor resources dealing with LCD display rendering... Many say CPLD is the entry point for journey into FPGA`s...

   
 

Offline vortexnlTopic starter

  • Contributor
  • Posts: 40
Re: Bought an Altera CPLD dev board, where to start?
« Reply #5 on: July 01, 2014, 01:27:02 pm »
The reason I got a CPLD is to first learn digital logic, combined with VHDL or Verilog, also there are some really cheap CPLD's available and that makes it easier to incorporate them in my own projects where I etch PCB's. Once I get this knowledge sorted, I want to migrate to FPGA.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13747
  • Country: gb
    • Mike's Electric Stuff
Re: Bought an Altera CPLD dev board, where to start?
« Reply #6 on: July 01, 2014, 02:05:11 pm »
It is generally easier to start with FPGAs, as they are much less limited than CPLDs, so you don't need to worry about things fitting. 
The only advantage of CPLD is the compile time is quicker as there is minimal place & route.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline vortexnlTopic starter

  • Contributor
  • Posts: 40
Re: Bought an Altera CPLD dev board, where to start?
« Reply #7 on: July 01, 2014, 02:22:11 pm »
Do you guys have any advice on a beginners FPGA dev board? I'd prefer not spending more than ~100 euro's, but I can be convinced easily when I see awesome tech...  :palm:
 

Offline ju1ce

  • Regular Contributor
  • *
  • Posts: 96
  • Country: fi
Re: Bought an Altera CPLD dev board, where to start?
« Reply #8 on: July 01, 2014, 02:57:49 pm »
Do you guys have any advice on a beginners FPGA dev board? I'd prefer not spending more than ~100 euro's, but I can be convinced easily when I see awesome tech...  :palm:
How about a Micronova Mercury? It's really breadboard friendly and has 5v tolerant IO pins which makes it easy to hook up to you own displays and sensors. It's also easy to program over USB. Terasic DE0-nano would also fit in the price bracket.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13747
  • Country: gb
    • Mike's Electric Stuff
Re: Bought an Altera CPLD dev board, where to start?
« Reply #9 on: July 01, 2014, 03:44:17 pm »
Do you guys have any advice on a beginners FPGA dev board? I'd prefer not spending more than ~100 euro's, but I can be convinced easily when I see awesome tech...  :palm:
Something with onboard programmer, switches and LEDs is a good start. Also something with plenty of tested examples.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline bwat

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: se
    • My website
Re: Bought an Altera CPLD dev board, where to start?
« Reply #10 on: July 01, 2014, 05:04:30 pm »
Do you guys have any advice on a beginners FPGA dev board? I'd prefer not spending more than ~100 euro's, but I can be convinced easily when I see awesome tech...  :palm:

DE0 Nano as was mentioned earlier. I posted a picture of it in the following thread:
https://www.eevblog.com/forum/microcontrollers/papilio-duo-fpgaardunio/msg468428/#msg468428
I use it for testing my CPU designs. I don't do much I/O so others will have to tell you how good it is for that. All I know is that it's cheap and it's got a shed load of I/O pins.
"Who said that you should improve programming skills only at the workplace? Is the workplace even suitable for cultural improvement of any kind?" - Christophe Thibaut

"People who are really serious about software should make their own hardware." - Alan Kay
 

Offline Dongulus

  • Regular Contributor
  • *
  • Posts: 232
  • Country: us
Re: Bought an Altera CPLD dev board, where to start?
« Reply #11 on: July 01, 2014, 05:21:02 pm »
I think building a VGA controller is a fun beginners project. It's more satisfying than making LEDs blink.

Writing HDL for the VSYNC and HSYNC counters is a good simple beginners project. If you have a board with a bunch of slide switches, you can use them to toggle the color displayed screen. Otherwise you can also use a counter to cycle through some colors.

You can increment the level of complexity by generating a test pattern, and eventually move up to displaying images and maybe overlay text and sprites. However, be warned that if you would eventually want to display images, some low end FPGAs don't have enough internal block RAM to store a single frame (640x480 @ 8-bit depth = 307 kB; 614 kB needed for double buffering). Make sure your development board has an external memory device that you can store however many frames you to.
 

Offline vortexnlTopic starter

  • Contributor
  • Posts: 40
Re: Bought an Altera CPLD dev board, where to start?
« Reply #12 on: July 02, 2014, 02:58:23 pm »
http://www.altera.com/education/univ/materials/boards/de0/unv-de0-board.html

Got this baby to play with :-+  Thanks for the advice guys!
 

Offline bwat

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: se
    • My website
Re: Bought an Altera CPLD dev board, where to start?
« Reply #13 on: July 02, 2014, 03:35:32 pm »
It has a cyclone III FPGA, an EP3C16 with fewer logic elements than the DE0-Nano, 15408 vs 22320. Not too big a deal for most things I suppose. Also, version 14 of Quartus II wont support it. See http://www.altera.com/education/univ/software/unv-software.html. Not sure if that's such a big deal.

However, I like the 7-segment displays and I/O ports! I wouldn't say no to one.

"Who said that you should improve programming skills only at the workplace? Is the workplace even suitable for cultural improvement of any kind?" - Christophe Thibaut

"People who are really serious about software should make their own hardware." - Alan Kay
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Bought an Altera CPLD dev board, where to start?
« Reply #14 on: July 02, 2014, 04:03:57 pm »
Start simple and continue expanding on that. For instance start with a counter, then a pwm etc.
I would not start with something fancy right away.
 

Offline vortexnlTopic starter

  • Contributor
  • Posts: 40
Re: Bought an Altera CPLD dev board, where to start?
« Reply #15 on: July 02, 2014, 04:06:13 pm »
It has a cyclone III FPGA, an EP3C16 with fewer logic elements than the DE0-Nano, 15408 vs 22320. Not too big a deal for most things I suppose. Also, version 14 of Quartus II wont support it. See http://www.altera.com/education/univ/software/unv-software.html. Not sure if that's such a big deal.

However, I like the 7-segment displays and I/O ports! I wouldn't say no to one.

Yeah I kinda picked that board because of the VGA port, and all the other stuff to play with ;) I think ~15K LE's should be sufficient for now ;)
 

Offline bwat

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: se
    • My website
Re: Bought an Altera CPLD dev board, where to start?
« Reply #16 on: July 02, 2014, 04:19:20 pm »
I think ~15K LE's should be sufficient for now ;)
I seem to remember an 8085 compatible CPU and a small test ROM and a small amount of RAM taking about 5000 LEs. I don't think any of my designs have breached the 10000 barrier to be honest.
"Who said that you should improve programming skills only at the workplace? Is the workplace even suitable for cultural improvement of any kind?" - Christophe Thibaut

"People who are really serious about software should make their own hardware." - Alan Kay
 

Offline ScottyAU

  • Contributor
  • Posts: 47
  • Country: au
    • ScottyAU
Re: Bought an Altera CPLD dev board, where to start?
« Reply #17 on: July 07, 2014, 12:12:48 pm »
vortexnl - i worked through these with my Altera CPLD board.  Was great for getting around the Altera Software (which was what i was looking for).

http://www.hackshed.co.uk/getting-started-with-cplds-index/
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Bought an Altera CPLD dev board, where to start?
« Reply #18 on: July 07, 2014, 03:36:10 pm »
Altera has a lot of training for free:
http://www.altera.com/education/training/curriculum/cpld/trn-cpld.html

What CPLD board did you get?
 

Offline ScottyAU

  • Contributor
  • Posts: 47
  • Country: au
    • ScottyAU
Re: Bought an Altera CPLD dev board, where to start?
« Reply #19 on: July 07, 2014, 09:28:28 pm »
Not sure about the OP - but i got these to start with:

http://www.aliexpress.com/snapshot/6063556008.html
 

Offline geek

  • Supporter
  • ****
  • Posts: 21
  • Country: au
Re: Bought an Altera CPLD dev board, where to start?
« Reply #20 on: July 08, 2014, 08:44:50 pm »
I think building a VGA controller is a fun beginners project. It's more satisfying than making LEDs blink.

Writing HDL for the VSYNC and HSYNC counters is a good simple beginners project. If you have a board with a bunch of slide switches, you can use them to toggle the color displayed screen. Otherwise you can also use a counter to cycle through some colors.

You can increment the level of complexity by generating a test pattern, and eventually move up to displaying images and maybe overlay text and sprites. However, be warned that if you would eventually want to display images, some low end FPGAs don't have enough internal block RAM to store a single frame (640x480 @ 8-bit depth = 307 kB; 614 kB needed for double buffering). Make sure your development board has an external memory device that you can store however many frames you to.

Or use external EPROM to store the image.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Bought an Altera CPLD dev board, where to start?
« Reply #21 on: July 08, 2014, 09:00:31 pm »
Or code vector graphics. so you don't need a raster.  For each pixel you check against all the vectors and/or other primitives (circle for example) and see if it affects that pixel.

The geometric definitions could include color and width and if you want to get fancier anti-aliasing and intensity grading if more than one vector affects it. of course i vectors have width the farther from the center the lighter the color so you have to take that into account for the intensity grading as well.

 

Online bingo600

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
Re: Bought an Altera CPLD dev board, where to start?
« Reply #22 on: July 09, 2014, 05:47:18 pm »
Not sure about the OP - but i got these to start with:

http://www.aliexpress.com/snapshot/6063556008.html

Outch ....

Cheaper here
http://www.ebay.com/itm/Altera-MAX-II-EPM240-CPLD-Development-Board-Learning-Breadboard-Experiment-Board-/271520142479


Just got one , and a usb-blaster.

Installed Quartus 13.0sp1  on Linux Mint17 x64 - As 13.1 & up skipped a lot of the old chips (also have some EPM3xxx)

I'd consider this one if it weren't for the stupid US $12.5 , customs limit here in DK  (usb-blaster included)
http://www.aliexpress.com/item/USB-Blaster-cpld-development-board-cpld-altera-development-cpld-board-EPM240T100C5N-epm240-board-altera-MAX-II/793647842.html


/Bingo
« Last Edit: July 09, 2014, 05:51:14 pm by bingo600 »
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7384
  • Country: nl
  • Current job: ATEX product design
Re: Bought an Altera CPLD dev board, where to start?
« Reply #23 on: July 09, 2014, 06:46:17 pm »
Well, the thing is with CPLDs is that they shouldnt be the main attraction of a project. They are almost always a companion device, for a MCU or an FPGA. Unless you make something very simple.
 

Offline gregallenwarner

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
Re: Bought an Altera CPLD dev board, where to start?
« Reply #24 on: July 09, 2014, 06:58:39 pm »
I opted to start learning with CPLD's rather than FPGA's, and for me, CPLD's are far easier. The reason is highly specific, though, so I wouldn't recommend to everybody that CPLD's are easier to start learning on.

Yeah, CPLD's are a lot smaller, but everything I'm learning to code right now is pretty simple, and will fit easily within a CPLD.

The reason CPLD's were easier for me is because I didn't start with a dev board. I started with literally a bare chip I bought from Mouser. I had to solder it to an adapter board. Then I had to figure out where all the programming pins were, and I had to figure out the proper pull-up/down resistors to put on them so it would respond correctly to being programmed. Then I had to find and purchase a suitable programmer device. Then I had to learn a hardware description language from scratch, since I didn't know one yet. (I went with VHDL.)

I was more concerned with knowing how I would embed these things into a final product from the beginning, rather than just learning how to program them. I eventually got up and running and I've successfully programmed a few CPLD's and tested them, but all of this would've been next to impossible for a newbie like me had I started directly with FPGA's, since they take a whole lot more to get up and running without a dev kit.

Like I said, I wouldn't recommend this method to everybody. I took the insane approach.  :)
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Bought an Altera CPLD dev board, where to start?
« Reply #25 on: July 09, 2014, 07:12:19 pm »
Well, the thing is with CPLDs is that they shouldnt be the main attraction of a project. They are almost always a companion device, for a MCU or an FPGA. Unless you make something very simple.

Altera's MAX V is really an FPGA but with non-volatile configuration but only up to 2200 LE for around $20 per chip with 7ns gate switching speed, but it seems like they are going to blur the line more with their MAX 10, but no details until Q4 2014.

You can request early access (probably under NDA):
http://www.altera.com/devices/fpga/max-10/max-10-index.html

But they do talk about running Nios II, and they are actually calling it a non-volatile FPGA instead of CPLD.

Last one to get to revision 10 is the Cyclone, I wonder if they are planing to replace the Cyclone with the Max or if they will over a 10 series Cyclone that is volatile.

 

Offline ScottyAU

  • Contributor
  • Posts: 47
  • Country: au
    • ScottyAU
Re: Bought an Altera CPLD dev board, where to start?
« Reply #26 on: July 09, 2014, 09:12:09 pm »
Bingo600 - that link from Aliexpress is for 2 - but still not quite as cheap as your ebay link :)

http://www.aliexpress.com/item/Altera-MAX-II-EPM240-CPLD-Development-Board-Learning-Breadboard/1295523986.html
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8275
Re: Bought an Altera CPLD dev board, where to start?
« Reply #27 on: July 10, 2014, 01:04:58 pm »
Here's an interesting project you can do with a moderately-sized FPGA - implement an SoC containing a CPU, a GPU, and an audio generator; and then write the software for it too: http://www.linusakesson.net/scene/parallelogram/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf