[Solved] Small-ish FPGA or CPLD 5V-tolerant ? - Page 1
Forum section: electronics / general

author: Romain
author_rank: Regular Contributor
timestamp: May 28, 2016, 10:27:24 am
content: Hi all,I'm to re-implement a hard-wired address decode (with lots of 74000) on a board, and to save place and allow upgradability, I'd like to do that in programmable logic.I'm looking for something very small, and most importantly very cheap (sub $2). I think even a small CPLD or FPGA (with a few hundred LUTs) would be enough. TTL ICs are still cheap enough to not justify programmable logic when the operation only needs a few 10s of them...Because the bus I'm interfacing with is 5V, it would be best to have 5V-tolerant inputs, and even better: a 5V device. Unfortunately, it's 2016 and most of these chips have become obsolete. I'm no beginner in CPLD and FPGA, but I've always used the big stuff: Spartan and Virtex on one hand, and low-power stuff: Smart-Fusion and Actel Igloo on the other.Thanks if you have a few references in mind

author: nctnico
author_rank: Super Contributor
timestamp: May 28, 2016, 11:42:24 am
content: Xilinx XC95C00 series

author: obiwanjacobi
author_rank: Super Contributor
timestamp: May 28, 2016, 11:55:24 am
content: I use an Altera Max II 240 (80 IO) CPLD with clamp diodes and current limiting / pull up resistors.See alsothe Max II handbook chapter 8.I got a single Max II 240 for $1.38 and 10 for under $10.00 on ebay.

author: janoc
author_rank: Super Contributor
timestamp: May 28, 2016, 01:53:57 pm
content: Quote from: nctnico on May 28, 2016, 11:42:24 amDid you mean the XC9500XL series?There is not 'C' in the middle (maybe you have confused it with the newer Coolrunners, but those are not 5V tolerant, AFAIK) and the XL at the end matters, because there is the obsolete and very expensive XC9500 5V series. XC9500XL is 3.3V but 5V tolerant.

author: FrankBuss
author_rank: Unknown
timestamp: May 28, 2016, 02:25:56 pm
content: Quote from: janoc on May 28, 2016, 01:53:57 pmI don't know if all of them are discontinued, but lots of other XC9500XL parts are now discontinued, too:http://www.xilinx.com/support/documentation/customer_notices/xcn15006.pdfAnd XC9500XL parts are not supported anymore in their latest design suite Vivado, you have to install an older ISE webpack version (another 10 GB software package). Looks like they really want to get rid of it, which is a shame, because this was one of the last parts with 5V tolerant inputs, cheap, only one supply voltage needed, integrated configuration flash, and still very useful for many projects (I built my C64 Kerberos MIDI cartridge with an XC95144XL).That said, you can still get them on Digikey and the XC9536XL parts are very cheap and perfect for fast address decoding. Many 5V circuits work with 3.3V signals, too, so could be used as a replacement without external voltage converters, if you don't plan to sell a product for the next 10 years with it.

author: andersm
author_rank: Super Contributor
timestamp: May 28, 2016, 02:44:54 pm
content: Quote from: FrankBuss on May 28, 2016, 02:25:56 pmIt's been years since I've looked at it, but AFAIK support for them was "frozen" somewhere around ISE 8-9 or so. Even though Xilinx' release notes for the newer versions of ISE promised generic improvements like not putting output files with your source code, none of those were supported by the XC9500XL toolchain. I also ran into some bugs, and when I reported them on their forums, the replies could best be summarised as "yeah, deal with it."

author: Romain
author_rank: Regular Contributor
timestamp: May 28, 2016, 03:25:10 pm
content: Quote from: obiwanjacobi on May 28, 2016, 11:55:24 amPrices on Octoparts are between $6 and $10.Do you have a reference in mind, or a link?The XC96500 is under obsolecence :http://www.xilinx.com/support/documentation/data_sheets/DS063.pdfOne thing I missed in my first post, is that the product will be available for at least the next 5 years. If I have to put level converters to use a newer CPLD/FPGA and be safe, then so be it.It looks like CPLDs are a dying technology to me... Embedded designs rely on SoC nowadays, while bigger designs use the horse power of FPGAs. The tradeoff for me would be to use a not-too-bad FPGA, and implement an ARM soft core for the on-board logic. But what's the point when you can get a STM32 with a Cortex-M0 for less than a buck?

author: rstofer
author_rank: Super Contributor
timestamp: May 28, 2016, 03:45:56 pm
content: Quote from: Romain on May 28, 2016, 03:25:10 pmThe price will never be close to $1 but the Zynq SoC devices have a dual core ARM processor plus FPGA fabric. I'm looking forward to playing with one of these.GALs are still available at Jameco I have no idea how to program them...http://www.jameco.com/webapp/wcs/stores/servlet/StoreCatalogDrillDownView?langId=-1&storeId=10001&catalogId=10001&freeText=PAL&search_type=jamecoallhttp://www.uchobby.com/index.php/2008/03/30/gals-for-electronics-hobby/CPLDs tend to have more easily managed packages whereas the vast majority of FPGAs use BGA packages. Not hobbyist friendly!

author: nctnico
author_rank: Super Contributor
timestamp: May 28, 2016, 04:44:32 pm
content: Quote from: FrankBuss on May 28, 2016, 02:25:56 pmI think that is jumping to conclusions. Only the PLCC44 packages where discontinued. I don't see support in their Vivado design suite as mandatory either because there are still several things missing (AFAIK some VHDL synthesis constructs aren't supported) from Vivado as well so having ISE around is kinda mandatory anyway. And what is 10GB? Peanuts for today's hard drives.Oh and don't mistake the XC9500 for the XC9500XL series like I do everytime

author: Romain
author_rank: Regular Contributor
timestamp: May 28, 2016, 06:16:26 pm
content: I've had a look at a couple of CPLD series from Lattice and Altera, let me know what you think:Altera: MAX II and MAX V families :https://www.altera.com/products/cpld/max-series/max-ii/overview.htmlhttps://www.altera.com/products/cpld/max-series/max-v/overview.htmlSome price research giving $1 - $3:https://octopart.com/search?q=MAX%202%20CPLD&view=list&sortby=avg_price%20aschttps://octopart.com/search?q=MAX%20V%20CPLD&view=list&sortby=avg_price%20aschttps://octopart.com/5m40zm64c5n-altera-20101003Lattice:https://octopart.com/isplsi2032e-110lj44-lattice+semiconductor-728551Just skimming through the MAX V datasheet, it requires 1.8V for the core, and the IO can work at 3.3V.So basically I'm putting a single chip FPGA, but I need LDOs and voltage converters to adapt the supply and all the voltages... it's kind of defeating the purposeAt this stage, I'm also considering putting a second STM32F0 just to do the address decoding... the bus is running at 5MHz, with a core running at 48MHz that leaves a few instructions to try decode the bus on the go

author: FrankBuss
author_rank: Unknown
timestamp: May 28, 2016, 07:17:22 pm
content: Quote from: Romain on May 28, 2016, 06:16:26 pmThe IOs could be slower, depends on the microcontroller, and requirements for setup and hold times could be too fast. It might work with 1 MHz buses, but 5 MHz sounds too high.Zynq is a great idea and very useful, if you need a very fast and wide connection between an ARM core and a FPGA (I built a64 bit / 100 MHz logic analyzer with it), but usually it is much cheaper to buy a cheap FPGA and use an external cheap ARM microcontroller with whatever additional peripherals you need, like USB.If voltage level translators are no problem, I can recommend Lattice MachXO2. Small FPGAs and there are models with internal configuration flash and just one 3.3V supply voltage. And they are relatively cheap as well, if you consider that you don't need any external components like 1.8V regulator or configuration flash. I used it for a prototype of myCrazyCartridge, in combination with a microcontroller for USB communication.

author: Carrington
author_rank: Super Contributor
timestamp: May 28, 2016, 08:40:18 pm
content: - Altera MAX3000A series (On the way to be obsolete, if it isn't already).or- Lattice ispMACH4000ZE series.

author: Romain
author_rank: Regular Contributor
timestamp: May 28, 2016, 08:57:01 pm
content: Hi FrankBuss, the MachXO2 series look great!If I don't need the bells and whistles, I'm even considering going for the (slightly cheaper) MacXO original serie. Do you know when it was introduced, and if there is a higher risk of obsolescence than the more recent XO2 and XO3 families?The MAX3000A doesn't appear anymore on Altera's website. For a new design, it looks dangerous...The ispMACH4000ZE looks good on paper, except that the core runs at 1.8V. Now, putting a SOT-5 LDO for a low power PLD isn't really a problem.I'm downloading the Lattice Diamond Design Software to get a better idea, but so far only Lattice seems to be in the correct price range. By the way, do you know if the Free License will be ok to try out the ispMACH 4000ZE and MachXO families?Thanks!

author: janoc
author_rank: Super Contributor
timestamp: May 28, 2016, 09:30:22 pm
content: Quote from: rstofer on May 28, 2016, 03:45:56 pmUh you have got to be kidding - using a Zynq for replacing discrete logic address decoder? That's kinda like doing pizza deliveries in a Lambo.The GALs like 16V8 and similar are programmed using a tool from Atmel, I believe. However, those are really old and limited - any CPLD will be running circles around a GAL and for less money.

author: rstofer
author_rank: Super Contributor
timestamp: May 28, 2016, 10:12:31 pm
content: Quote from: janoc on May 28, 2016, 09:30:22 pmWell, SoC came up...Here's the thing: nowhere in the discussion is there any mention of the number of inputs and outputs. Address decoding shouldn't take a barn full of logic unless it is a very complicated machine.Is this for a commercial project?

author: Romain
author_rank: Regular Contributor
timestamp: May 28, 2016, 10:22:43 pm
content: Quote from: rstofer on May 28, 2016, 10:12:31 pmNice asking the good questionsYes it is for a commercial project.Number of signals:- About 10 Address lines- 2 buses of 8 bits- About 5-8 control signalsLet's say a 48-pin should be up to the job. No need to go for the BGA stuff (even though the board will be manufactured, so it's not a problem).Different addresses need to be decoded, and the data latched, so the microcontroller has time to read it. In a nutshell, it's a decode/latch engine that I'm looking for. Something to off-load the microcontroller from watching the 5MHz bus all the time. One good thing is that the data rate is quite slow (about 1kHz, no more). So the micro has plenty of time reading the latched date before the next one comes up.I would even add: having a CPLD/FPGA that could be reprogrammed by the micro (SPI and al) would be absolutely amazing!

author: rstofer
author_rank: Super Contributor
timestamp: May 28, 2016, 11:17:09 pm
content: Most every FPGA requires a configuration flash of one kind or another. But that is only one way of loading the FPGA image. It can also be done with a uC bypassing the requirement for any flash in the system.Here's something from Xilinx:http://www.xilinx.com/support/documentation/application_notes/xapp058.pdfNotice that their circuit uses a 2:1 MUX on the JTAG lines so you can program the chain with a regular JTAG programmer OR you can select the uC. You can decide whether to incorporate the flash in the JTAG chain.I haven't read the entire App Note.http://www.xilinx.com/support/documentation/application_notes/xapp058.pdfETA: Theflash image gets large as the FPGA gets large. I don't think I would incorporate the FPGA image into the uC code, I would probably see if I could justify adding an SD card.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: May 29, 2016, 06:26:33 am
content: Quote from: Romain on May 28, 2016, 03:25:10 pmSearch for 'epm240'...

author: Romain
author_rank: Regular Contributor
timestamp: May 29, 2016, 07:12:50 am
content: Quote from: rstofer on May 28, 2016, 11:17:09 pmThis is true for bigger FPGAs, but thankfully not the case for the smallest CPLD/glue devices. While the biggest ones use RAM, and need to be programmed at every boot, low power devices store their configuration in a Flash matrix and have an instant boot.Check the MaxOS product page, they have a boot time less than 1ms (which I find horrendously long, but I haven't read the datasheet yet).On the system, the microcontroller is hooked to a bigger processor (with storage), which will hold the new image for the FPGA, and reprogram it through the microcontroller's SPI bus.Hope that clarifies the setup.Thanks

author: obiwanjacobi
author_rank: Super Contributor
timestamp: May 29, 2016, 12:35:46 pm
content: Quote from: Romain on May 28, 2016, 06:16:26 pmThe Max II is Just plain 3.3V and had flash. It doesn't get any simpler than that.

author: Romain
author_rank: Regular Contributor
timestamp: May 30, 2016, 02:00:11 pm
content: Hi all, thanks for your answers.Lattice MachXO2:The smallest device f the family is the XO2-256HC (3.3V with onboard LDO and flash). It has 256 Luts and 2kb of RAM (could be useful to buffer the data). It is available in 48-QFN (40 IO available) and 100-TQFP (55 IO available). This should be enough for my application.Unlike Actel (now Microsemi) Igloo, the fabric isn't flash-based but is RAM-based:QuoteEven though it saves cost on the BoM not having an external SPI flash, the boot up time isn't instantaneous, and the bigger the device is, the longer it takes (normal).The price starts at $1.08 onNewark: "Available until stock is exhausted") then ramps up quickly on other distributors: $2.28 onMouserand $2.83 onDigi.I like the chip, but I don't feel confident in it's long term availability.Altera MAXII:The smallest device in the family is the EPM240 (thanks obiwanjacobi).Searching for some pricing, I can't find anything cheaper than $5 per unit. See onOctoparts.I've checked on eBay, but I'm sure you understand I can't buy (from China) on eBay to source my components for manufacturing in Europe.To summarize, at this point I'd rather stay with good old 7400 TTL logic, than going for pricey, long-term risky chips.

author: Yansi
author_rank: Super Contributor
timestamp: May 30, 2016, 02:29:08 pm
content: Yeah the pricing of Altera MAX II devices is interesting, huh. Any local distributor in EU --> 6$ or thereabout. (funny as hell if you realize you can have a full featured FPGA for that price). MAX II on ebay/china? $1 a piece. I have bought a batch of these (I think 10pcs). They came normally in a plastic tray (sawn apart to fit only those 10 pcs), looked completely normal and brand new. Have already used a few of them, no problems whatsoever.Btw, I think that MAX II support has been dropped from the recent Quartus versions too. (Or was that Cyclone II which were dropped? not sure).MAX II also only single 3V supply, not 5V tolerant.

author: FrankBuss
author_rank: Unknown
timestamp: May 30, 2016, 02:41:13 pm
content: Quote from: Romain on May 28, 2016, 08:57:01 pmI guess that's always a risk, except for Microchip, where I don't know any case where they discontinued a microcontroller. The MachXO family was introduced in 2005:http://www.eetimes.com/document.asp?doc_id=1296827And unlike with the XC9500XL on the Xilinx site, it is only one click away on the products page and no notes "not intended for new designs". So maybe 10 more years, but maybe ask them how long they plan to produce it (and write it here). And then there is always the last buy option when they announce to discontinue it. For this low price you could do a lifetime buy for your product, but at least you have enough time to find a replacement.Quote from: Romain on May 28, 2016, 08:57:01 pmLast time I tried it, using it for MachXO2 was free.

author: nctnico
author_rank: Super Contributor
timestamp: May 30, 2016, 07:45:29 pm
content: Quote from: Romain on May 30, 2016, 02:00:11 pmLast time I looked Xilinx XC9500XL series was very cheap and readily available in large quantities from various distributors. For example: Digikey has over 10,000 XC9572XL in various packages/speed grades in stock for immediate delivery. All in all I don't get why the Xilinx XC9500XL dropped from your list.

author: Romain
author_rank: Regular Contributor
timestamp: May 30, 2016, 09:17:29 pm
content: Quote from: nctnico on May 30, 2016, 07:45:29 pmThe XC9500XL series has completely disappeared from Xilinx website.It's support has stopped in ISE8-9 according to andersm.Even though it'spriceis competitive, it requires an external flash.But what really IS the problem: the XC9500XL is NOT ROHS: "Contains lead / RoHS non-compliant". This alone is a no-no. I'm working on a commercial product.

author: nctnico
author_rank: Super Contributor
timestamp: May 30, 2016, 09:34:21 pm
content: Quote from: Romain on May 30, 2016, 09:17:29 pmNo, still there under 'other CPLD'QuoteNo, I'm using ISE14.7 for my XC9500XL based designs (the latest ISE version)QuoteNo, XC9500XL has internal flash!QuoteWhere did you get that info from? Ofcourse they are ROHS! Everything non-ROHS which was mainstream has died out over the last decade!http://www.digikey.com/product-detail/en/xilinx-inc/XC9572XL-10VQG44C/122-1448-ND/966629

author: Romain
author_rank: Regular Contributor
timestamp: May 30, 2016, 10:24:09 pm
content: Ok, then I guess I was mistakenBut clicking on the XC9500XL link on Xilinx.com I landhere. How is that supposed to make me feel confident?Besides, none of the documents link work... (Xilinx at it's best).I found a lot of XC95xxXL CPLDs non-ROHS (in the 9536 range). I assumed they all were.The link you sent me refers to the following part "Manufacturer Part Number XC9572XL-10VQG44C". The very same part number can be found in Xilinx's Product Discontinuation Notice (PDN) in date of December 2012:http://www.xilinx.com/support/documentation/customer_notices/xcn12011.pdfI'm not really sure what this means...On Farnell, only 5 references are still in stock in the family:http://uk.farnell.com/webapp/wcs/stores/servlet/Search?catalogId=15001&langId=44&storeId=10151&categoryId=700000004207&sort=P_PRICE&mf=101011&showResults=true&aa=true&sf=432,502,601,731&pf=110202489The way I see it right now is that I'm not very confident about the XC9500XL lifecycle. I've read it was introduced in 1998?Maybe there is a way to get a roadmap from Xilinx...?

author: nctnico
author_rank: Super Contributor
timestamp: May 30, 2016, 10:53:25 pm
content: If you read the PDN carefully you'll see they are phasing out older versions of parts. This can be due to any number of reasons (maybe moving to a different factory, phasing out non-ROHS parts, etc). Nothing to really worry about as long as there is a replacement (*). True it is an old series and Xilinx goofed up the document links (remove the .uat part) with their website conversion but a distributor like Digikey having many in stock is a good sign that this device is still very popular. Farnell also has over 500 in stock which is rather unusual.Anyway it never hurts to ask Xilinx about their plans with the XC9500XL series.(*) In one of my designs I'm using the 4th memory replacement from Micron.

author: Romain
author_rank: Regular Contributor
timestamp: June 01, 2016, 03:12:33 pm
content: In my attempts of finding a Roadmap for Xilinx's CPLDs, I called my local distributor which will pass over my query to their Xilinx engineer. Stay tuned!Doing a quick research, I found out that the Xilinx CPLD forum has been archived (sic).Moreover, the series is considered "Mature", which I believe is the last step before becoming obsolete? :https://forums.xilinx.com/t5/Welcome-Join/Obsolete-CPLD/m-p/687931/highlight/true#M34876Some packages have already been stopped:http://www.xilinx.com/support/documentation/customer_notices/xcn15006.pdfI have also posted on Digilent's forum:https://forum.digilentinc.com/topic/2198-xilinx-roadmap-on-xc9500xl-cplds/

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 01, 2016, 09:18:25 pm
content: Quote from: RomainYou want to replace an existing TTL address decoding circuit with a decoder and latch that frees up the microcontroller from polling the bus. The bus is5V, but the micro is an STM32F0 running on (<=)3.3V, right? Is the MCU replacing a legacy TTL device?10 address lines, 8 data, 5-8 control, 5MHz, 5V, TTL. What system bus is this?If 10+ TTL IC's are so cheap (even though they must take up quite a lot of PCB area) then why do you need something 'very small' andmore importantly'sub $2'? Was the original device too bulky and expensive for your market?You seem to be very concerned about whether the CPLD you choose will be available in 5 years time, and having 10,000 availablenowis not assuaging your fears. Does this mean you are only doing small production runs, and don't want to stockpile chips?The existing design used hard-wired logic and (I assume) worked OK, so why do you want it to be 'upgradable'?What is the purpose of your device?Sorry for all the questions, but if we knew what you wereactuallytrying to do it might help...QuoteIMO this is theonlyCPLD that will meet all your requirements, because:-1. Older devices might not be around in 5 years time.2. Using a low I/O voltage device with level shifters will take up more space and raise the cost.3. No other modern CPLD family (that I know of) is truly 5V tolerant.There is one other solution you might consider -Cypress PSOC-4200. Runs on 5V, has internal CPLD, and I/O pins can be configured for latched input (ideal for operating as a 'slave' device on a microprocessor bus).

author: Scrts
author_rank: Frequent Contributor
timestamp: June 01, 2016, 09:43:47 pm
content: Alteras' relatively new MAX V family can support 5V:https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/pt/max-v-product-table.pdfSame for MAX II:https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/pt/max-ii-product-table.pdf

author: Romain
author_rank: Regular Contributor
timestamp: June 01, 2016, 10:33:49 pm
content: Hi Bruce, and thanks for taking the time to answer me.Here are the answers to your questionsQuote from: Bruce Abbott on June 01, 2016, 09:18:25 pmThe micro actually has 5V tolerant inputs. The micro is already fully functional in the actual design.Quote from: Bruce AbbottIt is a MC68000 system bus. Luckily I'm only interfacing to a portion of this bus, so I only need to watch some specific address lines, and not the whole bus! Basically, it's "sniffing" data from an old system and forward them to a new IT system through this STM32 and then a MCU connected through UART where the data can be interpreted on a Linux computer.The MC68000 is 5V, and the trigger/latch logic based on the 7400 already works a treat!Quote from: Bruce AbbottA redesign of a working circuit does take a lot to reconsider. But in a nutshell, it is "worth it" if the alternative is: smaller AND cheaper AND more flexible.Quote from: Bruce AbbottExactlyQuote from: Bruce Abbott

author: Romain
author_rank: Regular Contributor
timestamp: July 25, 2016, 11:29:12 pm
content: Just a quick update to let you know that the PSoC solution has been approved for the project!Thank you very much Bruce for your suggestion! It was actually my first time with Cypress, and I'm delighted with their IDE and support! There are tons of code example, which makes the use of the chip as easy as 1 2 3.The best in all of that? The chip costs less than $2! ($1.9 to be exact).I decided to go for a PSoC 4200 (CY8C4245LTI-M445), and the decode logic is implemented in what they call the 'UDBs' (a bunch of ultra-small CPLDs).Link for reference:http://www.cypress.com/products/32-bit-arm-cortex-m0-psoc-4200-programmable-digital-blocksMarking this topic as Solved!Thanks!

author: nctnico
author_rank: Super Contributor
timestamp: July 25, 2016, 11:56:30 pm
content: Thanks for the update! It is always useful to know what solution was choosen in the end

author: c64
author_rank: Frequent Contributor
timestamp: September 16, 2020, 02:32:52 am
content: I don't get it why the MAX ii is called "5v compatible". You need to power it with 3.3v supply, and use diodes and resistors on each pin. But you can do exactly the same with a modern 3.3v FPGA, can't you?

author: EverydayMuffin
author_rank: Regular Contributor
timestamp: September 16, 2020, 03:46:12 pm
content: Interesting choice with the PSoC, I don't hear of many people using UDBs on PSoC.I see the most UDBs on PSoC 4 in on the PSoC 4200L with 8 UDBs. (I think more are available with PSoC 5 and PSoC 6).Is there a way to work out the amount of logic elements (say LUT4) a UDB is equivalent to?

author: Romain
author_rank: Regular Contributor
timestamp: September 16, 2020, 04:11:27 pm
content: This bus address decoder implemented in the CY8C4245AXI-483 gives the following resource usage.I'll let you do the maths

author: hli
author_rank: Frequent Contributor
timestamp: September 16, 2020, 07:28:00 pm
content: Quote from: EverydayMuffin on September 16, 2020, 03:46:12 pmOne UDB contains 8 'conventional' MacroCells, so the 4 UDBs in the CY8C4525 contain 32 MCs. (the largest PSoC5s have 24 UDBs, so 192 MCs). But each UDB also contains a so called 'DataPath' which is more like a programmable 8bit-ALU (its 2 accumulators, 2 data registers, 2 FIFOs and one ALU which can compare, shift or calculate). When you manage to master them 24 UDBs can achieve quite a lot (quite a number of the PSoC5 'peripherals' are implemented as UDBs).