ice40 HX, A 5v tolerant FPGA ?? - Page 1
Forum section: electronics / general

author: woofy
author_rank: Frequent Contributor
timestamp: June 01, 2021, 10:35:02 am
content: Well this is curious. I'm interfacing a PS2 keyboard to an ice40 HX8k and I needed to protect the 3.3v inputs from the 5v PS2 signals. The PS2 appears to have 2k2 pull-ups as I get about 2.2mA shorting clk or data to ground. So I thought I'd add additional 1k8's in series with the signals and let the ESD diodes do the clamping for me. Imagine my surprise when I looked on the 'scope and still saw 5v signals on the FPGA inputs! It works too, as I can echo the signals out on other pins. It seems as though there are no input protection diodes, or maybe there are and they clamp to 5v. The HX data sheet is clear, 3.6v absolute Max. I did a little poking around on the web and found the ice40 was acquired by Lattice from Silicon Blue, and Silicon Blue's previous ice65 ~was~ 5v tolerant.So I'm thinking maybe the ice40 is 5v tolerant, at least the HX8k.Does anyone know for sure?Maybe I'll see the magic smoke at some point, but hey, its a hobby project.

author: asmi
author_rank: Super Contributor
timestamp: June 01, 2021, 02:19:26 pm
content: You are free to try of course, but I'm 99% certain you will blow an IO buffer, or maybe the entire IO bank (depending on how it's wired internally). The fabric will probably survive because it's typically in a separate voltage domain than IO blocks, but who cares about it if you can't do any IO?

author: woofy
author_rank: Frequent Contributor
timestamp: June 01, 2021, 04:51:47 pm
content: Well, I've done a few more tests, feeding a higher voltage onto the HX8k pins via a 47k resistor.At 5v input there is no current draw. The voltage is the same both sides of the resistor.At 6v it is still almost 6v on the pin and its pulling 550nA.At 6.5v it has 6.35v on the pin7v gives 6.38v on the pin.8v, 6.39v9v, 6.39v10v, 6.4v20v, 6.41vThis is the same across every random pin I checked.It seems the HX8k has an avalanche FET clamp rather than the expected diode to VCCIO, clamping at 6.4v.The only reason for this that makes any sense is that this is a 5v tolerant device, designed that way by Silicon Blue.I think for Lattice this is an unwanted feature they don't include in their other devices and don't want to cloud the range by having mixed tolerance devices.

author: nonarkitten
author_rank: Newbie
timestamp: August 22, 2022, 06:33:26 pm
content: I just wanted to say thanks for this discovery. We'll test this out some more, but if the original generation of iCE40's are in fact still 5V tolerant, then that's just amazing news.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 22, 2022, 07:37:53 pm
content: How much current does it draw @20V?

author: nonarkitten
author_rank: Newbie
timestamp: August 22, 2022, 08:12:50 pm
content: Ohm's laws says about 0.29mA at 20V.

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: August 27, 2022, 04:54:14 pm
content: So this is sufficiently intriguing to be worth exploring a bit. I'm happy to try it out on a long-term test and see if the magic smoke appears, but it's only useful to me if the rise-times of the resistor-assisted lines are sufficiently fast. Not entirely sure I'm doing the right calculation here, but does the below make sense for a test scenario ?Assuming 8 mil trace width, on a stack-up as in the image with 0.12mm between the top and next-plane (GND),Saturntells me I get a trace capacitance of 9.7085 pF/cm. Let's say I have a nominal trace length of 5cm.Using the rise-time equations on theWiki RC constantpage, I get a resistance of ~47R for a 5ns rise-time. If I get some 1206, 1/4W resistors that would seem to be fine.This seems a little easy, so (apart from the fact this is probably going to blow up my FPGA, which I'm good with), what else am I missing / have got wrong ?

author: DiTBho
author_rank: Super Contributor
timestamp: August 28, 2022, 10:28:51 am
content: Quote from: woofy on June 01, 2021, 04:51:47 pmI haven't yet understood why FPGAs and CPLDs are not all made this way: with a an avalanche FET clamp rather than the expected diode

author: woofy
author_rank: Frequent Contributor
timestamp: August 28, 2022, 12:14:05 pm
content: Quote from: SpacedCowboy on August 27, 2022, 04:54:14 pmWhat I was suggesting is that 5v logic can be connected directly to iCE40 HX8K inputs, no resistors.My use of a 47k resistor was just to protect the FPGA whilst I applied voltages up to 20v to see where it clamped.

author: woofy
author_rank: Frequent Contributor
timestamp: August 28, 2022, 12:30:58 pm
content: Quote from: DiTBho on August 28, 2022, 10:28:51 amThis is a guess, but I suspect the avalanche FET clamp requires a non-trivial amount of silicon to implement. The input diodes to vcc are intrinsic (parasitic) devices, a bit like the reverse diode in a mosfet. That and there is probably near zero commercial demand as level translators can be used when 5v interfacing is required.

author: Forty-Bot
author_rank: Contributor
timestamp: August 28, 2022, 03:07:49 pm
content: What bank did you use for testing? The ice65 only supported 5V inputs on banks 0, 1, and 2. In particular, bank 3 was 3V3 only. I wonder if the same restrictions apply here.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 28, 2022, 07:20:05 pm
content: Quote from: woofy on August 28, 2022, 12:30:58 pmYep. Guys stuck in the "vintage world" tend to think that their world is significant, but this is just a very small niche.And level translators are plenty and cheap.Not to mention that actually clamping to voltage rail with a simple diode is often the more desirable behavior.

author: langwadt
author_rank: Super Contributor
timestamp: August 28, 2022, 07:46:15 pm
content: Quote from: SiliconWizard on August 28, 2022, 07:20:05 pmand the transistors used might not able to handle 5V. I've used a Xilinx FPGA where LVDS output just goes tristate when the IO voltage goes above ~2.9V, asking Xilinx about I was told it was a safety feature disconnection the LVDS drivers to prevent you from configuring LVDS outputs in a 3.3V powered bank because it would damage the part

author: DiTBho
author_rank: Super Contributor
timestamp: August 28, 2022, 09:20:49 pm
content: Quote from: SiliconWizard on August 28, 2022, 07:20:05 pmwhy? a diode is more noisy

author: Someone
author_rank: Super Contributor
timestamp: August 28, 2022, 09:52:04 pm
content: Quote from: woofy on August 28, 2022, 12:30:58 pmXilinx talks about the challenges in their (very old) XAPP311Quote from: XAPP311.. and gets more complex/expensive from there.

author: DiTBho
author_rank: Super Contributor
timestamp: August 28, 2022, 11:29:56 pm
content: to guaranty fast charge/discharge of the gate' Mos CoX capacitance?

author: julian1
author_rank: Frequent Contributor
timestamp: August 29, 2022, 07:15:39 pm
content: vccio for each gpio bank is documented to support 3.3 V2.5 or V1.8 to allow interfacing to different logic levels.Would an experiment powering one of the gpio bank rails with 5V be worthwhile? On the chance the outputs can switch that voltage, and not just tolerate it as input?

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 29, 2022, 07:33:36 pm
content: As langwadt already said, if the transistors used in the IO blocks are not designed to support 5V, they just are not and you're wasting your time. If that's the case though, powering the IO bank @5V is likely to be worse than powering it @3.3V and injecting 5V signals at the inputs.Experiments are not going to do much except if you're ready to set up an experiment for a long time. While @5V you may not be able to damage the IOs in a short amount of time, the degradation may come after weeks or months of operation. There is no real way of knowing except having the detailed design of the chip, or just trusting the datasheet and add level translators. All I can say is that for a typical chip of this kind, on the typical CMOS processes used, most transistors will be rated for 3.9V-4V absolute maximum and going over this *is* going to degrade them. Adding transistors that can handle 5V (which would be about 6V absolute max.) either takes significantly more area (thus, more expensive dies) or even a different process node which is also likely to be more expensive.Problem here is, we just don't know for sure what they did and validating that with just simple experiments is not that easy.

author: julian1
author_rank: Frequent Contributor
timestamp: August 29, 2022, 08:39:23 pm
content: Looking at an old silicon blue datasheet - the 5V tolerant support using vccio 3v3 bank is clearly stated, while there is no mention of other higher voltages.So yes, you're right, it makes no sense, to go outside the bound of what is documented by the original manufacturer (even assuming the same process support). i was thinking it wasn't certain what precise capabilities had been dropped from documentation when the ownership change.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 29, 2022, 08:54:25 pm
content: I understand your point, I'm just not sure why Lattice would have dropped this feature if it was fully functional - AFAIK, it wasn't even directly competing against their own products? Don't think they had FPGAs with 5V-tolerant IOs? (Except maybe for their old PLDs which were definitely not comparable to the ice40 series?)Point is, if they dropped it, it's either because it would have harmed sales of existing products, or because it was evaluated not reliable enough and thus not fit for commercial purpose?Or did they just not want to have ANY 5V-tolerant part in their catalog for some odd reason? Just trying to find the rationale.

author: SpacedCowboy
author_rank: Frequent Contributor
timestamp: August 29, 2022, 09:00:18 pm
content: > Or did they just not want to have ANY 5V-tolerant part in their catalog for some odd reason? Just trying to find the rationale.About the only reason I could think of for that is that their marketing dept. didn't want them to be seen as "old fashioned" and "out of date". Seems like a pretty weak argument because "backwards compatible" is hardly a problem - but I guess 5v technology is now *really* old, so who knows.Tbh, I agree it's a niche market, but it's a big world out there, I'm kind of surprised any chip vendor would remove any potential "we can do that" feature unless it just didn't work, as you say.Still fine with running a long-term test. I have the FPGA board now, but the ancient computer is getting its RAM replaced. Once that's done I'll wire it up and let it run for a few months in the corner, with some sort of visual display that it's still both active at the core, and reading the GPIO @5v.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 30, 2022, 03:56:35 am
content: Yeah. Another reason could be that Lattice decided to use a slightly different process node to make those from what was initially used by SiliconBlue and possibly some parameters changed and could not guarantee reliability @5V.

author: gekkio
author_rank: Newbie
timestamp: August 30, 2022, 03:47:09 pm
content: I think you might be jumping to a conclusion a bit too quickly...the lack of a simple protection diode to VCCIO does not mean the device is 5V tolerant. In fact, it seems like having no protection diode is the default in modern FPGAs. I went through the CPLD/FPGA datasheets I had saved locally, and collected their absolute maximum ratings for input voltages and checked if the datasheet mentioned a protection diode somewhere. None of the devices support true 5V VCCIO but some are defined to be 5V-tolerant when 3.3V VCCIO is used, as indicated by the max rating.CPLDs:Xilinx Coolrunner-II: no diode, max 4.0VXilinx XC9500XL: no diode, max 5.5VLattice ispMACH 4000 V/B/C/Z: no diode, max 5.5VLattice ispMACH 4000 ZE: no diode, max 5.5VIntel/Altera MAX II: no diode, max 4.6VIntel/Altera MAX V: no diode, max 4.6VFPGAs:Xilinx Spartan-3E:has diode, max VCCIO + 0.5VXilinx Spartan-6: no diode, max 3.95VLattice iCE40 LP/HX/UL/UP/LM: no diode, max 3.6VLattice iCE40 Ultra: no diode, max 3.6VLattice MachXO2: no diode, max 3.75VLattice MachXO3: no diode, max 3.75VIntel/Altera MAX 10: no diode, max 4.12VIntel/Altera Cyclone IV: no diode, max 4.2VIntel/Altera Cyclone V: no diode, 3.8VIntel/Altera Cyclone 10 LP: no diode, max 4.2VSo, based on this very quick investigation, only one of the devices (Spartan-3E) has I/O protection diodes to VCCIO, and it's from 2004. Some devices support a switchable clamp diode to VCCIO (for PCI I/O compliance?), but that depends on configuration and isn't always enabled. Just because some previous generation devices (iCE65) manufactured with an older process (65nm) had 5V-tolerant inputs in some banks, it doesn't mean the next generation has the same characteristics.I don't know about the manufacture side of things, but the lack of a protection diode to VCCIO provides one practical advantage I didn't see mentioned yet: a normally valid high signal on an I/O while the CPLD/FPGA is powered off won't get shunted to VCCIO. This adds some flexibility to power sequencing and/or supporting multiple switchable power domains on a board, because you won't necessarily draw excessive current from the I/O pin of some other device even if you are outputting a valid high while the CPLD/FPGA is off. Just recently I encountered this with a design where I realized I made a mistake in power sequencing and was outputting a digital 3.3V signal to an unpowered iCE40 HX4K in certain scenarios. I panicked and thought I broke the other device and had to respin the board to avoid the problem, but I read the datasheet and even measured the current drawn by the iCE40 pin in this scenario to double-check it was safe: the current was 20 nAI've also intentionally used extra 74LVC buffers in some designs to safely isolate different power domains, because 74LVC doesn't have VCC protection diodes and doesn't get upset with normal I/O voltages in its inputs while unpowered.Based on the available evidence, I'm almost certain that iCE40 HX isnot5V-tolerant, and if you exceed its maximum rating, you're going to break something over time. It might not be spectacular "smoke escapes device" kind of breakage, but maybe the gate oxide layer of the input buffer transistors break and you lose each pin that has suffered this overvoltage condition for some period of time. Not fun to debug if it happens! Remember also that gate oxide degradation is cumulative (and IIRC non-linear w.r.t the input voltage...?), so a single quick test is not enough if you care about the longevity of your device.

author: DiTBho
author_rank: Super Contributor
timestamp: September 01, 2022, 07:45:53 am
content: Quote from: gekkio on August 30, 2022, 03:47:09 pmI have to check whatGBA-Xportused for their Nintendo GBA special cartridge.I remember it was aXilinx Spartan-3*-something, but I don't remember details.I know, GBA is fully 5V, and there are no level shifters on the cartridgeNintendo SoC(z80 + ARM + bootstrap-rom + mem controller + PLL + basicIO)<--->FPGAIt was very expensive back in 2001 (200-250 Euro), hope to find onep.s.thanks for the post! Really useful

author: DiTBho
author_rank: Super Contributor
timestamp: September 01, 2022, 07:53:33 am
content: Quote from: gekkio on August 30, 2022, 03:47:09 pmthis must be the reason why some vintage 5V projects specify in bold thisQuotealthough XC9536XL is 5V tolerant, it only offers 3.3V or 2.5V output capability.

author: nonarkitten
author_rank: Newbie
timestamp: September 15, 2022, 10:09:48 pm
content: Quote from: DiTBho on August 28, 2022, 10:28:51 amDiodes respond better to fast transient in ESD suppression.

author: spostma
author_rank: Regular Contributor
timestamp: September 16, 2022, 12:14:14 pm
content: this reminds me of a similar informative discussion on Espressifs esp32 and esp8266 being 5V I/O tolerant, even if the datasheet suggests 3V3 max:https://www.qworqs.com/2021/05/19/are-the-esp32-and-esp8266-5v-tolerant-yes-they-officially-are/

author: gnuarm
author_rank: Super Contributor
timestamp: September 24, 2022, 06:57:42 am
content: Quote from: SiliconWizard on August 28, 2022, 07:20:05 pmThey may be cheap, but they use space on the board. My design is very tight and I will be very happy to get back the real estate from a pair of 24 pin TSSOPs.

author: nonarkitten
author_rank: Newbie
timestamp: September 26, 2022, 03:25:11 am
content: Indeed. CBTDs eat up a lot of board space when you're designing for size. Most of my boards fit inside a standard PLCC or DIP footprint. Having to add a CBTD per 20 IO takes up a lot of board space, quickly. Sure, you can go double sided or those microscopic DFN TI parts, but that really starts pushing up board cost and complexity.The more I think about it, the more I question the demise of 5V as being more of a manufactured obsolescence than one born out of any particular design reason or support issue.

author: gnuarm
author_rank: Super Contributor
timestamp: September 26, 2022, 05:53:43 am
content: Quote from: nonarkitten on September 26, 2022, 03:25:11 amI seem to recall it was a power issue. They had to dump the higher voltage so they could increase the speed without burning down the power supplies and burning up the chips.Much the same reason they went to 2.5V, then 1.8V, 1.5V, 1.2V, etc.

author: julian1
author_rank: Frequent Contributor
timestamp: November 19, 2022, 09:11:48 am
content: Any suggestions for generic level convert inputs, 5V -> 3.3V ?Is there something better than 74LVC14A?(Hex inverting Schmitt-trigger with 5Vtolerant input)

author: woofy
author_rank: Frequent Contributor
timestamp: November 19, 2022, 11:09:12 am
content: It rather depends on your definition of "better".The 74LVC1T45FW4-7 is one option, they're cheap and effective but currently unobtainium

author: dolbeau
author_rank: Regular Contributor
timestamp: November 22, 2022, 03:20:22 pm
content: Quote from: julian1 on November 19, 2022, 09:11:48 amTo interface 5V vintage buses to a Xilinx 7-series FPGA (Artix-7), I've used successfully both CB3T family (SN74CB3T16211DGGR) devices and 74LVC2G07for SBus, and 74LVT familiy (74LVT125PW, 74LVT245BPW) and a Xilinx XC9572XLfor NuBus. NuBus has higher requirement on drive strength than SBus, hence the use of 74LVT rather than 74LVC (at least that was my understanding, I'm still quite new at this).

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 22, 2022, 07:03:49 pm
content: I've used the SN74LVC16245A which has 5V-tolerant inputs and works absolutely fine. With 16 channels, it's pretty cost-effective.

author: julian1
author_rank: Frequent Contributor
timestamp: November 22, 2022, 08:48:25 pm
content: Thanks for the good suggestions. I have used '125 before for tri-state, and hct for outputs. But didn't realize that parts with per channel tri-state and dir control were available. Using gpio to control both dir/oe is nice for flexibility. Most of the things I am looking at are ad-hoc/one-off, rather than well-organized busses.

author: dolbeau
author_rank: Regular Contributor
timestamp: November 23, 2022, 01:59:56 pm
content: Quote from: julian1 on November 22, 2022, 08:48:25 pmWhen I investigated for my own use cases, HCT looked nice as they can output 'real' 5V (most of my solutions output TTL-compatible 3V3, so don't have a lot of margins...), but they were way too slow - I saw numbers in the 30-40ns propagation delay, on a 10 MHz bus (NuBus) it's quite high and on a 25 MHz bus (fastest SBus) it's unusable.The CB3T have a propagation delay < 1ns, while LVC and LVT are in the 5-6 ns delay so even going through them twice is OK on a 10 MHz bus.Currently trying to figure out if CB3T would also make do to connect an Artix-7 directly on the 25-40+ MHz bus of a 68030...

author: gnuarm
author_rank: Super Contributor
timestamp: November 27, 2022, 09:49:58 am
content: Quote from: julian1 on November 19, 2022, 09:11:48 amThat works, but is only unidirectional. A more universal part is a switch based level shifter. They don't buffer, only connect the two pins through FETs. They are much faster between the two I/O pins, sub-ns. They limit the voltage driven through the switch because the gate drive is limited and the FET automatically turns off.They have a logic level enable signal, that is usually tolerant, but that needs to be verified. No need for a DIR control since they are bi-directional. It also makes it easy to mix directions with the same chip without getting a messy layout.I've used the SN74CBTD3384CPW, a 10 bit part, very available.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 27, 2022, 09:54:10 am
content: https://electronics.stackexchange.com/questions/97889/bidirectional-5-v-to-3-3-v-level-shifter

author: nonarkitten
author_rank: Newbie
timestamp: March 01, 2023, 09:48:57 pm
content: Yeah, for 5V TTL, the 74CBT is the way to go (that includes MOST 5V systems from the 70's and 80's). Super fast and super cheap so there's very little timing slew. Even for some CMOS designs it might be enough to just add pull-ups on the high side and call it done.

author: Forty-Bot
author_rank: Contributor
timestamp: March 03, 2023, 05:53:59 am
content: While reading the datasheet, I noticed under "DC Electrical Characteristics" it saysQuotewhich likely refers to this phenomenon. Of course, it also saysQuote

author: gnuarm
author_rank: Super Contributor
timestamp: March 06, 2023, 08:58:44 am
content: Quote from: nonarkitten on March 01, 2023, 09:48:57 pmIf timing is of concern, the switches are the way to go. They aren't buffers, they are just FET transistors acting like a wire.