NiteFury – An Artix-7 FPGA with its own DDR3 RAM right in your laptop
crowdsupply.com
crowdsupply.com
Artix-7 is supported by LiteX, an open-source toolchain based on reverse engineering of Xilinx bitstream, https://github.com/enjoy-digital/litex & https://antmicro.com/blog/2020/05/multicore-vex-in-litex/
These can be used for PCILeech DMA attacks/testing, http://blog.frizk.net/2021/10/acorn.html
[1] https://digilent.com/shop/arty-a7-artix-7-fpga-development-b...
The only fully supported reverse engineered FPGAs at the moment are the Lattice ECP5(-5G), iCE40, and QuickLogic EOS families.
Many configurations of VexRISCV work fine without using the DSP blocks (and has been working for 2+ years), so not sure that is relevant.
The Acorn CLE-215 is equivalent to the NiteFury (XC7A200T-2) if you can get your hands on one, and the CLE-215+ is the same size but a higher speed grade (XC7A200T-3). You can officially do DDR3-1066 on the plus model and DDR3-800 on the non-plus model.
The developers website is here: https://rhsresearch.com/
My understanding is all FPGA toolchains are a nightmare, and I'm guessing I may have to pirate the software, no chance of me affording a $10k-a-seat license for a toy that probably won't go any farther than a couple nights of tinkering.
I'm picturing situations where you might use a handful of 74xx components to perform a task, but start getting bogged down by factors like "I can't fit 15 chips on my breadboard and even if I did, I'd probably mess up the wiring accidentally".
A full "software at runtime" microcontroller solution introduces its own nuances (having to load and initialize, potential timing factors), even if the price is right.
A still-in-production commercial-grade FPGA means replacing $10 of parts with $100, so it's not really hobbyist-friendly, and may be wildly overkill for the task.
I guess maybe the PAL/GAL ecosystem is sort of what I'm envisioning, but it seems like a dead-end of obscure tools and parts labelled "not suggested for new designs". Or maybe there's a yet-to-be-tapped market for a small-scale hobbyist FPGA that's priced accordingly.
The thing is, though, if you can stomach a BGA, a 640-LUT iCE40UL640 FPGA is only US$2.80 via Digi-Key https://www.digikey.com/en/products/detail/lattice-semicondu..., so it's hard to justify using a CPLD instead in a new design. Maybe easier since the shortage crisis. But that's a "still-in-production commercial-grade† FPGA" and it's US$2.80 in parts, not US$100. A reel of 1000 is US$2340.
Is this the small-scale hobbyist FPGA you're looking for? I think you can fit two or three RISC-V controllers on it with SeRV, and it includes 56 kbits (7 KiBytes?) of EBRAM.
(Disclaimer: I don't actually know any of this stuff, I'm just repeating things I've read without really understanding them.)
______
† I'm not sure what you mean by "commercial-grade"? I mean it's not a university research project? Lattice is a commercial company and sells the iCE40UL640 as a commercial product.
I tried to work with those lattice parts once but they were so tiny (0.3 or 0.4mm pitch bga) basically undoable by cheap Chinese hobbyist board houses.
Thanks for the explanation of "commercial-grade" as "not automotive-grade"!
At the bottom of the page you'll see a link to someone who followed your suggestion. Now that looks hard. :)
I suppose another big problem with a lot of more sophisticated offerings is, as you suggest, BGA may be hard to stomach. Anything more complex than through-hole packages, or socketable versions is going to dramatically raise the bar for "this can be shipped as a kit and home-assembled." The PLCC one might be viable from that context.
Yeah, the "we'll drill your PCB" houses will also tack down your SMD parts, but it changes the proposition. Instead of selling a $10 blank PCB and saying "order what you need from Mouser" you suddenly have a lot more money sunk in partially or fully assembled inventory.
I don't know what Lattice's life cycle for its products is but given that they're evidently still making CPLDs from 30 years ago I wouldn't worry too much. I think these particular FPGAs are only about 7 years old, too; the datasheet (DS1050) lists two revisions, both from 02015, and I recall looking for such low-end FPGAs around that time and not being able to find any.
The last time I went to an electronics hobbyist store I was amazed to find that everything was on breakout boards. They didn't sell chips, they sold boards, all with 2.54mm Molex pin headers on them, or sometimes rows of holes for you to solder the pin headers to. It was so extreme that they had a ULN2003 septa-darlington on a breakout board, by itself, with a pin header connected to each of its pins. A DIP ULN2003! Which has 2.54mm pins on the actual chip!
So apparently electronics hobbyists now barely use breadboards or soldering irons. They wire together boards with jumper wires, using the pin headers that come pre-soldered to the board.
In that vein, it looks like SparkFun sells a Lattice XO2-1200 breakout board with 2.54 mm pin headers for US$21.50 https://www.sparkfun.com/products/14828 but they're out of stock, and a similar Lattice iCE40LP8K breakout board for US$41.95 https://www.sparkfun.com/products/14829 which is also out of stock. And, holy crap, that chip has more logic cells than the iCE40UP5K chip I erroneously thought was Lattice's biggest. And also the US$7.95 https://www.sparkfun.com/products/17131 in Adafruit's Feather wing footprint which is not out of stock and has an Intel MAX 10 FPGA along with an Atmel SAMD51 μC.
Anyway I feel like, if you wanted to ship an FPGA thing as a kit and home-assemble it, you could solder the BGA FPGA onto a small PCB with 2.54mm pin headers along the edges so the kit assemblers can plug it into their breadboard or connect wires to it easily. Basically the PCB takes the place of an epoxy or ceramic DIP and leadframe.
I'm not sure the traditional Heathkit-style "kit" market exists any more, though. 50 years ago you by buying the unassembled kit you were saving the salary of a lab technician in Benton Harbor who would have assembled, soldered, tested, and troubleshot your device by hand, at a cost of potentially over US$100. Now you're saving the cost of a pick-and-place machine at JLCPCB; they charge 0.15¢ per pin, last time I checked, with a minimum order quantity of 10 boards.
The benefit now of getting parts unassembled is not that it's cheaper; it's that you can assemble them into something different, shortening the feedback time on your own designs.
IDK, I've been gradually working my way through some of the solder-it-yourself "build an XT clone" projects; there the fact you're building it from parts IS a big part of the charm. Nobody would want a slightly quirky DOS machine with less performance than an off-brand graphing calculator without a healthy dose of the IKEA Effect. I suspect a lot of the "build your own amplifier" hobby groups are the same way. (Speakers, apparently there's still money to be saved there if you like DIY offerings)
In a way, it's about turning "thing you buy" into "thing you do" -- you get more hours of entertainment out of a given dollar spent on kit products than a similarly priced finished item would provide.
Yes, 50 years ago, building from kits was about saving on assembly (or for access to products not sold assembled), but there's no reason it can't be a hobby in and of itself and potentially a gateway into more sophisticated electronics experimentation.
I figure a good kit is like the programs in an '80s computer magazine-- it will do what it said, but now you have something that you can grasp and pull apart more readily than commercial product. How many of us got into programming that way?
The other drawback to getting things pre-assembled is that bodge issues are going to be harder. The last PCB I ordered (a custom-designed memory board for that XT clone) needed some, and if you're still looking at a bare PCB, maybe with through-hole sockets mounted, you can pretty easily do any cuts and tacked down wires you need. I'd be a lot warier if I had to try to pick apart pre-soldered SMD components.
There’s also mixed signal versions just in case you also want an opamp, or two.
https://www.renesas.com/tw/en/products/programmable-mixed-si...
Lattice ECP5 is popular with hackers because there is a reasonably well supported open-source tool chain via Yosys. As tempting as an open-source toolchain is, it is NOT friendly for beginners. You can also use the Lattice Diamond software which includes ModelSim for free (it needs a license, but you can get it by registering for free). If you go that route, I really like the Orange Crab dev board https://1bitsquared.com/products/orangecrab.
That being said, I really would recommend Xilinx for a beginner. The reason is that the toolchain is the least nightmare-ish and they have by far the best documentation and tutorials. Vivado is also free and contains a good synthesis tool and simulator as well as everything else you need. These are going to be much friendlier to the beginner.
Good boards might be: $249 Zybo-Z7 https://digilent.com/shop/zybo-z7-zynq-7000-arm-fpga-soc-dev... or $129 Cora-Z7 https://digilent.com/shop/cora-z7-zynq-7000-single-core-and-.... Both of these also contain a pretty good dual core ARM9, but if you don't want to mess with the software for the ARM, you can still use the FPGA fabric as a plain FPGA.
All of the boards above contain USB based JTAG programmer and require no extra tools for debug and loading.
> My understanding is all FPGA toolchains are a nightmare, and I'm guessing I may have to pirate the software, no chance of me affording a $10k-a-seat license
Well, FPGA design is different than software. For small and medium-size parts, all the vendors have free or very cheap development tools now. All EDA software is very complex and less standardized than software tools. A lot of that is unavoidable. So certainly the toolchains are extremely challenging to learn. The quality of documentation ranges from pretty good (Xilinx) to useless (Microsemi) with most clustered around bad-to-useless. The tools also crash and misbehave in ways you'd never expect visual studio or GCC to do. But again, some of that is because it's comparably a niche market and because of poor vendor support. But a lot more of it is due to the very different and very complicated job the tools are doing, so try not to get overly frustrated - hardware is several layers deeper than software.
https://www.seeedstudio.com/Tang-Nano-9k-FPGA-board-Gowin-GW...
These guys target the education market and most of their boards are compatible with the free version of the Xilinx toolchain. The boards have a modular expansion connector and they sell lots of compatible expansion modules for different I/O mechanisms, both electrical and human (lights, buttons, displays, etc.)
This one checks your boxes: https://digilent.com/shop/nexys-a7-fpga-trainer-board-recomm...
I bought an earlier version of this product 15 years ago in college...now I feel old.
1. It's cheap. Digi-Key lists it for US$62.40. But they're out of stock: https://www.digikey.com/en/products/detail/lattice-semicondu.... They were in stock when I ordered a few months ago.
2. It's in stock despite the shortage. Or it was, anyway. Maybe a different distributor has them in stock.
3. It's fully supported by free software (APIO, yosys, nextpnr, etc.) and there are tutorials for getting things to run on it without getting contaminated by licenses.
4. Although it's still really small as FPGAs go, the iCE40UP5K is the largest FPGA that is fully supported by free software: 5280 logic blocks (one 4-LUT, one D flip-flop, and some carry propagation logic per block), 120 kbits of EBRAM, 1024 kbits of SPRAM, and 8 16×16 multipliers. According to the datasheet, it's not super fast, 25–150 MHz for a lot of designs, and the multipliers in particular are 50 MHz; configured for extremely basic functions like a 16-bit decoder you can get pin-to-pin performance of under 20 ns. This seems like plenty of power for emulating a Super Nintendo or something, but not an XBox. The SeRV implementation of RISC-V fits into I think 200 iCE40 4-LUTs. The UPduino is another cheap devboard featuring the iCE40UP5K.
Astoundingly, someone has gotten HDMI output out of an iCE40 with a relatively simple level shifter to handle the translation to current-mode logic and the iCE40's DDR outputs to get 250MHz output: https://hackaday.io/page/5702-dvi-hdmi-pmod-for-an-ice40-fpg... Presumably, though, you'd be better off with a beefier FPGA for which HDMI isn't such a stretch.
I'm thinking that probably even if you had the US$12000 for a Virtex-7 devboard and a Vivado license to synthesize designs for it, you might be better off starting with smaller designs anyway, because in a couple nights of tinkering you won't be able to get anything working that the iCE40 can't do.
Another option is an external HDMI serializer. You send it a parallel video signal, similar to what you'd send to a VGA DAC, and it handles all the details of turning that into HDMI.
Here's one on a breakout board: https://1bitsquared.com/products/pmod-digital-video-interfac...
Also though you could literally generate a VGA signal with an R-2R DAC and feed it to a VGA-to-HDMI adaptor. These apparently cost US$10 and are available in the kind of stores that sell USB hubs and fake SD cards: https://articulo.mercadolibre.com.ar/MLA-897320291-cable-ada...
The breakout I linked is only $20, and uses virtually the same electrical interface as a VGA DAC. (The only difference is that it also takes a clock signal.) You'd hardly be saving any money with the janky VGA-to-HDMI setup, and the image quality would be worse.
Third world problems, I know, but they're still real problems.
https://old.reddit.com/r/yosys/comments/81yhas/list_of_icest... is a four-year-old post that says it's supported by Yosys, and the designer of the breakout board https://www.tindie.com/products/tinyfpga/tinyfpga-bx/ says, "IceStorm currently supports the TinyFPGA B2 and I will be working closely with its creators to implement support for the TinyFPGA BX as well."
The Nexsys Video would give you what you need: https://digilent.com/shop/nexys-video-artix-7-fpga-trainer-b... (though out of stock)
The DE10-Nano gives you both HDMI (though not 2.0) and Ethernet: https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=.... There's some availability, apparently buying direct from Terasic is the best option (though often more expensive as shipping is pricey and you pay import duties). It's also what the MiSTer project uses https://github.com/MiSTer-devel/Main_MiSTer/wiki so is what you need if you want to play with console emulation.
FPGA toolchains are indeed a nightmare but both Xilinx and Intel have freely available versions. They tend to be limited in the devices they support but the free versions of Vivado (Xilinx) and Quartus (Intel) both support the FPGAs in the boards I mentioned above.
https://numato.com/product/aller-artix-7-fpga-board-with-m-2...
- Xilinx Artix 7 FPGA (XC7A200T-2FBG484I)
- 2Gb DDR3 ( MT41J128M16JT-125:K TR )
- 4 lane PCIe Gen2 (5 GT/s)
- Trusted Platform Module (AT97SC3205)
- M.2 Connector Interface, M-Key
- Flash memory: 512 Mb Quadbit SPI flash memory (S25FL512SDSBHV210/IS25LP512M-RHLE)
- 1 RGB LED for custom use
I mean, hell, the TRM (https://developer.arm.com/documentation/ddi0487/latest) for the CPU in a RPI4 is over 11k pages long. I don't think that's something you could reasonably expect to reimplement on your own.
There'd be nothing stopping you from implementing a simpler/reduced RISC-V processor though, with only the ISA extensions you want (or none at all).
For instance, you could start with this development board: http://www.myirtech.com/list.asp?id=502
A pretty fast softcore is gonna be like 500Mhz, some really optimized designs might hit close to 700Mhz on better FPGAs. Although when working with softcores you can a lot times get away with lower clocks since anything that would require a lot of cycles if written in software can a lot times be made as a block on the FPGA that your softcore just manages. Assuming your FPGA has enough area. Freeing up the softcore to do other things.
You can generally do quite a bit of parallelism, see the quad-core LiteX+VexRISCV solution at <https://antmicro.com/blog/2020/05/multicore-vex-in-litex/>.
But this isn't meant to be doom and gloom - the fact that you can buy a $200 board and go throw some verilog together and have it run at several hundred megahertz attached to a PCIe bus is phenomenal from a hobbyist perspective.
(The data from PCIe x4 @ 5 GT/s per lane can be carried by a 128 bit bus @ 125 MHz)
The RPi's CPUs operate at 1.5 GHz (1500 MHz) or higher, meaning there are 1.5 GHz signals being sent around inside the CPU. The logic in this FPGA under the most ideal theoretical conditions can only operate at around 400 MHz, and for a "real" design, much slower than that - hence my reference to VexRiscv. It's an extremely simple core by modern standards, clock-for-clock it's way slower than the ARM cores in the RPI, yet it's only capable of hitting 200 MHz in (this) FPGA.
To elaborate a bit:
An FPGA has a few major components, but from a logic perspective, the two to focus on here are the "slices" and the routing fabric. The slices of the FPGA implement user logic and are very simple. They contain a few LUTs (look up tables) which implement logic functions. In the case of the Xilinx 7 series architecture, these can be either 6 input 1 output logic functions or 5 input 2 output functions. Other FPGAs can and will be different. By "function", think logic gates. For every combination of inputs, is the output on or off? The logic blocks also contain a number of flip-flops to hold state. There is one for every LUT output, so twice the LUT count (on 7 series). There are a few fixed function components to improve performance of common logic types, such as the carry chain for an adder or multiplexers. Some FPGAs bundle hard-cores for various logic, many have hardware multipliers that can be used, more complex (and expensive) ones can even have CPU cores (Xilinx Zynq and Intel/Altera Cyclone V for instance).
There are thousands of these slices on an FPGA. The smallest member of the Artix family has 2,000 of them, the largest contains over 33,000. The big Kintex and Virtex parts can have hundred of thousands. In order to do anything complicated, you'll need to use many slices to implement logic, which are connected together through the logic fabric. You'll see things like "logic depth" which is the number of LUTs connected in series before connecting to a register. The greater the logic depth the slower the design. The shorter the logic depth, the longer the pipeline. Cue Netburst style concerns. If you don't have to worry about hazards, it's completely fine, if you do, it's a nightmare.
Not equivalent to the Pi 4, but still runs linux. (the Acorn CLE is a rebadged NiteFury)
"Added FPGA support for 7 hash types for ZTEX 1.15y boards...Specifically, we support: bcrypt, descrypt (including its bigcrypt extension), sha512crypt & Drupal7, sha256crypt, md5crypt (including its Apache apr1 and AIX smd5 variations) & phpass. As far as we're aware, several of these are implemented on FPGAvfor the very first time. For bcrypt, our ~119k c/s at cost 5 in ~27W greatly outperforms latest high-end GPUs per board, per dollar, and per Watt."
The best place to see what works is the F4PGA examples documentation at <https://f4pga-examples.readthedocs.io/en/latest/building-exa...>.
If you want to start with fully open source tools on a Xilinx 7 series FPGA the best option is the Digilent Arty A35T board <https://digilent.com/shop/arty-a7-artix-7-fpga-development-b...>.
They have a lot more IO available, but they're also out of stock until the chip shortage problems improve...
The downside is that you'd need custom drivers and software on the host system to redirect input events to the FPGA and handle the video feed it produces.
Side note - this is the smallest pitch component I've ever soldered. Used a stencil and a hotplate since these are 0.4mm QFNs.
Edit - I really need to update the pictures. I forgot to twist the differential pairs before taking them.
It may also simply not be possible. The DE10-Nano has DDR memory for example but most MiSTer cores need extra add-on SDRAM. The reason being the latency on the DDR is just too high for the accurate emulate most cores are aiming for. So SDRAM is required. On this board you don't have that option. Though perhaps you can build your own DDR controller, with the DE10-Nano you have to use the hard controller built into the FPGA. Perhaps another controller specifically optimised for the latency needs of MiSTer cores could work. Each core would need potentially significant porting work to use this new setup as they get direct access to the SDRAM pins in MiSTer. You'd need to trace back to where they're actually generating memory accesses and then plug that into whatever new DDR controller you had.