Bought an Altera CPLD dev board, where to start? - Page 1
Forum section: electronics / general

author: vortexnl
author_rank: Contributor
timestamp: July 01, 2014, 10:11:06 am
content: 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

author: jamesglanville
author_rank: Contributor
timestamp: July 01, 2014, 10:47:05 am
content: 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)

author: bwat
author_rank: Frequent Contributor
timestamp: July 01, 2014, 11:19:02 am
content: 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 herehttps://www.eevblog.com/forum/microcontrollers/papilio-duo-fpgaardunio/msg469049/#msg469049.

author: FrankBuss
author_rank: Unknown
timestamp: July 01, 2014, 12:12:48 pm
content: 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 LEDQuote from: bwat on July 01, 2014, 11:19:02 amUsually 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.

author: diyaudio
author_rank: Frequent Contributor
timestamp: July 01, 2014, 12:44:17 pm
content: Quote from: vortexnl on July 01, 2014, 10:11:06 amAlthough 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...

author: vortexnl
author_rank: Contributor
timestamp: July 01, 2014, 01:27:02 pm
content: 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 01, 2014, 02:05:11 pm
content: 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.

author: vortexnl
author_rank: Contributor
timestamp: July 01, 2014, 02:22:11 pm
content: 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...

author: ju1ce
author_rank: Regular Contributor
timestamp: July 01, 2014, 02:57:49 pm
content: Quote from: vortexnl on July 01, 2014, 02:22:11 pmHow about aMicronova 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 01, 2014, 03:44:17 pm
content: Quote from: vortexnl on July 01, 2014, 02:22:11 pmSomething with onboard programmer, switches and LEDs is a good start. Also something with plenty of tested examples.

author: bwat
author_rank: Frequent Contributor
timestamp: July 01, 2014, 05:04:30 pm
content: Quote from: vortexnl on July 01, 2014, 02:22:11 pmDE0 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/#msg468428I 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.

author: Dongulus
author_rank: Regular Contributor
timestamp: July 01, 2014, 05:21:02 pm
content: 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.

author: vortexnl
author_rank: Contributor
timestamp: July 02, 2014, 02:58:23 pm
content: http://www.altera.com/education/univ/materials/boards/de0/unv-de0-board.htmlGot this baby to play withThanks for the advice guys!

author: bwat
author_rank: Frequent Contributor
timestamp: July 02, 2014, 03:35:32 pm
content: 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. Seehttp://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.

author: Kjelt
author_rank: Super Contributor
timestamp: July 02, 2014, 04:03:57 pm
content: 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.

author: vortexnl
author_rank: Contributor
timestamp: July 02, 2014, 04:06:13 pm
content: Quote from: bwat on July 02, 2014, 03:35:32 pmYeah I kinda picked that board because of the VGA port, and all the other stuff to play withI think ~15K LE's should be sufficient for now

author: bwat
author_rank: Frequent Contributor
timestamp: July 02, 2014, 04:19:20 pm
content: Quote from: vortexnl on July 02, 2014, 04:06:13 pmI 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.

author: ScottyAU
author_rank: Contributor
timestamp: July 07, 2014, 12:12:48 pm
content: 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/

author: miguelvp
author_rank: Super Contributor
timestamp: July 07, 2014, 03:36:10 pm
content: Altera has a lot of training for free:http://www.altera.com/education/training/curriculum/cpld/trn-cpld.htmlWhat CPLD board did you get?

author: ScottyAU
author_rank: Contributor
timestamp: July 07, 2014, 09:28:28 pm
content: Not sure about the OP - but i got these to start with:http://www.aliexpress.com/snapshot/6063556008.html

author: geek
author_rank: Unknown
timestamp: July 08, 2014, 08:44:50 pm
content: Quote from: Dongulus on July 01, 2014, 05:21:02 pmOr use external EPROM to store the image.

author: miguelvp
author_rank: Super Contributor
timestamp: July 08, 2014, 09:00:31 pm
content: 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.

author: bingo600
author_rank: Super Contributor
timestamp: July 09, 2014, 05:47:18 pm
content: Quote from: ScottyAU on July 07, 2014, 09:28:28 pmOutch ....Cheaper herehttp://www.ebay.com/itm/Altera-MAX-II-EPM240-CPLD-Development-Board-Learning-Breadboard-Experiment-Board-/271520142479Just 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

author: tszaboo
author_rank: Super Contributor
timestamp: July 09, 2014, 06:46:17 pm
content: 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.

author: gregallenwarner
author_rank: Regular Contributor
timestamp: July 09, 2014, 06:58:39 pm
content: 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.

author: miguelvp
author_rank: Super Contributor
timestamp: July 09, 2014, 07:12:19 pm
content: Quote from: NANDBlog on July 09, 2014, 06:46:17 pmAltera'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.htmlBut 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.

author: ScottyAU
author_rank: Contributor
timestamp: July 09, 2014, 09:12:09 pm
content: Bingo600 - that link from Aliexpress is for 2 - but still not quite as cheap as your ebay linkhttp://www.aliexpress.com/item/Altera-MAX-II-EPM240-CPLD-Development-Board-Learning-Breadboard/1295523986.html

author: amyk
author_rank: Super Contributor
timestamp: July 10, 2014, 01:04:58 pm
content: 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/