Author Topic: Best FPGA for glue logic  (Read 10341 times)

0 Members and 1 Guest are viewing this topic.

Offline thetooth

  • Contributor
  • Posts: 17
Best FPGA for glue logic
« on: December 13, 2012, 10:08:13 pm »
I bought a stellaris launch pad MCU last month and have been working on a in card computer/data logger, so far the software and hardware side of designing have been really easy, but as im getting closer to PCB design im thinking i should consolidate my design.

The main display(CFAG320240CX-TFH-T) is a 8-bit parallel controlled graphics LCD with 5 control lines and a busy state pin based on the Epson S1D13700, now my first issue is transfer speed, hooking the 8-bit bus directly to the MCU would be silly since i'd have no pins in no time, so currently i use a MCP23S17 bi-directional shift register. This is great when sending characters to the display, the 10Mhz clock rate of the SPI line is very fast... but... for graphics the display requires you to send a 8bit value(the screens VRAM is arranged as 40 columns by 240 lines of 8-bit(1-byte for bitmap, 2-byte for 4 shaded grayscale and/or blending effects) scan lines, you update a single pixel by reading in the current VRAM, changing the pixel value, and the writing the block back). So, you see drawing the entire display in monochrome would be very slow over SPI, so my idea would be to synthesize the SPI->parallel conversion in the FPGA for characters, but also store graphics and GUI routines within the FGPA's high speed memory and assign macros that allow me to draw large graphics at line speed(40Mbps compared to 625kbps). Additionally, those control pins are also set byte sending an entire byte to the I/O expander, theoretically i could also automate this on the FPGA side :D

Finally, i could drop the other chips for user I/O and just use opto-couplers for isolation rather than a pair of voltage converters.

So my question is, what would be my best bet for this application? i was thinking spartan 3E, but its not recommended for new designs(end of life?), and, well i don't really understand a lot of the terminology relating to `cell size` and logic gates.

 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 1622
  • Country: us
Re: Best FPGA for glue logic
« Reply #1 on: December 13, 2012, 11:14:48 pm »
Unless you have big plans for implementing other functions in the FPGA, you should check out CPLDs for glue logic type applications.

Something like the Xilinx Coolrunner-II series maybe.  Price is under 2USD for the smaller ones.
http://www.xilinx.com/support/documentation/data_sheets/ds090.pdf
 

Online Harvs

  • Super Contributor
  • ***
  • Posts: 1187
  • Country: au
Re: Best FPGA for glue logic
« Reply #2 on: December 14, 2012, 01:06:28 am »
Which MCU is it you plan on using?  I believe the launchpad comes in many variants doesn't it? (I see there's a Cortex M4F launchpad?)

I'm not overly familiar with the TI line of ARMs, however, most larger 32bit MCUs have a dedicated parallel interface for driving external memory and this sort of thing.  Maybe it would be easier (and cheaper) to choose a MCU that has the dedicated hardware to do this?

As this is only a monochome LCD, 320x240 is only 76.8kb or 9.6kB.  So a decent MCU could hold the complete frame in RAM and do all the graphics processing in RAM, then use a DMA to regularly update the display in the background when triggered by the processor.  This is how I've done it before with a similar SPI driven display.
 

Offline thetooth

  • Contributor
  • Posts: 17
Re: Best FPGA for glue logic
« Reply #3 on: December 14, 2012, 03:01:27 am »
Unless you have big plans for implementing other functions in the FPGA, you should check out CPLDs for glue logic type applications.

Something like the Xilinx Coolrunner-II series maybe.  Price is under 2USD for the smaller ones.
http://www.xilinx.com/support/documentation/data_sheets/ds090.pdf
Looks promising, im not familiar with CPLDs though, would it be possible to say, implement a program for drawing a circle or reading a bitmap from memory?

Which MCU is it you plan on using?  I believe the launchpad comes in many variants doesn't it? (I see there's a Cortex M4F launchpad?)

I'm not overly familiar with the TI line of ARMs, however, most larger 32bit MCUs have a dedicated parallel interface for driving external memory and this sort of thing.  Maybe it would be easier (and cheaper) to choose a MCU that has the dedicated hardware to do this?

As this is only a monochome LCD, 320x240 is only 76.8kb or 9.6kB.  So a decent MCU could hold the complete frame in RAM and do all the graphics processing in RAM, then use a DMA to regularly update the display in the background when triggered by the processor.  This is how I've done it before with a similar SPI driven display.
I'm currently using the LM4F120H5QR, it has 32 channels of usable GPIO, for the LCD to run in parallel thats almost half my channels gone already(8-bit data bus plus 6-bit control, not including reset or power control), i mean i could JUST cram everything in like this, but i feel it would be much more flexible if i had 24 channels for GPIO and everything else run off the FPGA.

One issue i also forgot to bring up(which you can in fact see in the picture i attached), is this I/O expander requires you to send a 1-byte address and mode every time you send it data, so thats 3-bytes to clock in, and another 2-bytes to clock out, so for 9.6kB the actual transmission over head is 48kB, to achieve 60fps, a throughput speed of 2.8MB/s, also again this display can do grayscale too, so a further byte is required.

Anyway thanks for the advice, im going to read up on CPLDs now.
 

Offline tnt

  • Regular Contributor
  • *
  • Posts: 237
Re: Best FPGA for glue logic
« Reply #4 on: December 14, 2012, 09:56:02 am »
I wouldn't qualify what you describe as "glue logic" ....  glue logic is really small stuff that you could implement with a few discrete 74xx or 4xxx chips ...

What you describe is essentially a GPU and you're not going to do that in a CPLD.
 

Offline jeroen74

  • Frequent Contributor
  • **
  • Posts: 397
  • Country: nl
Re: Best FPGA for glue logic
« Reply #5 on: December 14, 2012, 11:13:31 am »
For a GPU you'd need a FPGA. It certainly is possible to create logic to draw circles and lines.

But in your case, I would simply choose a bigger processor with more pins. It will save you a lot of headaches. FPGAs need multiple voltages and a configuration device. It will take effort to learn Verilog or VHDL and the toolchain. And that TI processor has more than enough grunt to draw a few simple lines and circles.
 

Offline thetooth

  • Contributor
  • Posts: 17
Re: Best FPGA for glue logic
« Reply #6 on: December 14, 2012, 12:16:39 pm »
For a GPU you'd need a FPGA. It certainly is possible to create logic to draw circles and lines.

But in your case, I would simply choose a bigger processor with more pins. It will save you a lot of headaches. FPGAs need multiple voltages and a configuration device. It will take effort to learn Verilog or VHDL and the toolchain. And that TI processor has more than enough grunt to draw a few simple lines and circles.
This is one of the main reasons im asking, i've never worked with an FPGA let alone VHDL, but currently im working independently so i have the time to invest in learning, plus it would allow me to build a common platform. As for voltages, i already have 5v and 3.3v available and can use the same logic level converters to handle the signal transport to devices.

My question still remains, which is the best option for this design? From what i can tell the Spartan-3E is the best option since its relatively cheap and has plenty of existing support... but its end of life.
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 670
  • Country: us
Re: Best FPGA for glue logic
« Reply #7 on: December 14, 2012, 12:47:04 pm »
FPGA can be a bit confusing at the start. Comparing the logic cells is a really hard to understand concept because it depends on so many things and when you try to compare one manufacturer to another it gets even more complex.

If it were me just starting out with FPGA I would get one of the FPGA boards that has the programmer and everything included on the board so you don't have to spend money on programmers.  The spartan series may be listed as not recommended for new designs but that just means that they have a newer chip, that probably cost more, that they would like you to buy. Starting out you do not want a chip that is brand new on the market because the amount of learning material will be small compared to something that has been on the market for years.

A week ago there was someone advertising an FPGA board on here that would fit the bill nicely for someone wanting to start with FPGA, it has all the voltage regs, the programmer, the memory and chip interface protection built in and the price is good for what it includes.
http://micro-nova.com/mercury

There are other boards like the papilio but they cost about the same and do not include protection circuits, memory, or the other peripherals the board has above.
http://www.cutedigi.com/fpga/butterfly-one-papilio-one-500k-arduino-fpga-version.html
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1462
  • Country: gb
Re: Best FPGA for glue logic
« Reply #8 on: December 14, 2012, 04:02:20 pm »

This is one of the main reasons im asking, i've never worked with an FPGA let alone VHDL, but currently im working independently so i have the time to invest in learning, plus it would allow me to build a common platform. As for voltages, i already have 5v and 3.3v available and can use the same logic level converters to handle the signal transport to devices.

My question still remains, which is the best option for this design? From what i can tell the Spartan-3E is the best option since its relatively cheap and has plenty of existing support... but its end of life.

Most FPGAs require a 1.2V / 1.8V supply for the main core and then 3.3V to power the IO. Generally they don't support 5V I/O, although some are what is known as "tolerant".

I didn't find learning VHDL very hard - the one thing to remember is that it is NOT a programming language, it is a description of the hardware. That means that unless special blocks are used (sequences) every line happens AT THE SAME TIME (ignoring propagation delays). This can be the most confusing thing to someone who is used to writing software for processors that have a program counter and increment through the instructions one at a time.

Neil
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 19839
  • Country: nl
    • NCT Developments
Re: Best FPGA for glue logic
« Reply #9 on: December 14, 2012, 09:08:59 pm »
Actually it is better to treat VHDL as a programming language. The big difference is that every statement is executed in parallel instead of in series. If you use VHDL as a description language then you are shooting yourself in the foot. VHDL offers a lot of features like records (structs), functions, generating logic, etc which make designing logic much easier.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2039
  • Country: au
Re: Best FPGA for glue logic
« Reply #10 on: December 14, 2012, 10:34:36 pm »
Aside from the hardware aspect, I think the biggest decision is which description language to use VHDL or Verilog.
There's a lot involved just comparing the two from a technical standpoint and lot of the stuff to consider is mostly meaningless until you have dabbled in it for while.

I took on VHDL but found that the majority of open source IP is Verilog so I cant help but feel that I backed the wrong horse!

If you have done any software programming before the parallelism of HDL will do your head in for a while  :o
 

Offline thetooth

  • Contributor
  • Posts: 17
Re: Best FPGA for glue logic
« Reply #11 on: December 15, 2012, 03:44:27 am »
I have done work with Altera, Actel (now Microsemi), Lattice, and Xilinx.  Altera and Xilinx are the largest companies, and they have the most dense and sophisticated FPGA's.  Unfortunately, because they have the smallest process geometries, these are also susceptible to SEU's and MEU's [Single and Multiple Event Upsets]-- from cosmic rays, etc.  Lattice is OK (and the have the fastest CPLDs BTW), but at the end of the day I always chose Actel parts.  Actel was purchased by Microsemi, and so now these parts are available from Microsemi.  They still give away their "Gold" software suite-- the only company to give away a free ModelSim simulator.  The Actel/Microsemi parts are not only SEU/MEU tolerant, but they are also "instant on"-- there is no time spent upon power-on to load the array-- and that's because the Actel/Microsemi parts use Flash-based FPGA cells.  They may not be the most dense parts, but they have the best all-around mix of desirable features.

You can buy an Actel/Microsemi FPGA with a hard-core ARM MCU on-chip, or you can use a FREE ARM Cortex-M1 CPU, or (if you don't need the MPU/CPU), you can choose the IGLOO parts-- (which have the lowest power consumption of any FPGA out there).  The IGLOO parts sound like they are just what you need.
SoC FPGA was my first choice in the planing stages but the cost and availability is ridiculous. From what i can tell those Altera Cyclone V SoC don't actually exist yet.

Also i'm really liking this IGLOO nano dev kit, is there a huge difference in VHDL implementations between vendors or does it remain at least some what compatible?

I guess its now a choice between IGLOO and Spartan-3 :D
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1462
  • Country: gb
Re: Best FPGA for glue logic
« Reply #12 on: December 15, 2012, 12:09:34 pm »
VHDL is a vendor independent language. 

There are sometimes vendor specific commands for VHDL, for example synthesiser options or something hardware specific.

Neil
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf