5 ms·
The article missed a VERY important modern FPGA design technique which is using raw VHDL/Verilog like a "PC programmer" would use hand optimized assembly. In o
by VLM 14y ago
The article missed a VERY important modern FPGA design technique which is using raw VHDL/Verilog like a "PC programmer" would use hand optimized assembly. In other words, most of the time, not very much.
So the "inner loop" which needs optimizing is a crazy deep complicated DSP pipeline, obviously you implement that in FGPA "hardware" directly in a HDL. On the other hand, you'd be crazy to implement your UI or a generic protocol like TCP/IP in hardware (unless you're building a router or switch...). Something like I2C is right about on the cusp where you're better off writing it in plain ole C or implement it as a "hardware" peripheral in the FPGA.
Peripheral ... of what you ask? Well, depending on your license requirements and personal feelings there are a zillion options like microblaze/picoblaze from the FPGA mfgr, or visit the opencores website and download a Z80 or a 6502 or a PDP-10 or whatever floats your boat for the high level. Yes, a full PDP-10 will fit easily in one of the bigger hobby size Spartan FPGAs. Its not 1995 anymore, you've got enough space to put dozens (hundreds?) of picoblaze cores on a single FPGA if you want now a days.
There's no point in hand optimized HDL to output "hello world" just like there's no point in the antique technique of software driven "bit banged" serial ports just "include" an off the shelf opencore UART to simplify your UI code.
I've been in this game a long time and this is the future of microcontrollers and possibly general purpose computing. The engineering "skill" of searching a feature matrix to find which PIC microcontroller has 3 I2C hardware and 7 timers and 2 UARTS in your favorite core family is going to be dead, you'll just "include uart.h" and instantiate it 2 times and you pick your favorite core, be it a Z80 or a microblaze or an ARM or a SPARC.
In the future I think very few people "programming" FPGAs are going to be writing anything other than a bunch of includes and then doing everything in the embedded synthesized Z80. The "old timers" who actually write in HDLs are going to look down on the noob FPGA progs much like the old assembly coders used to look down on the visual basic noobs, etc.
- mindslight 14y agoFPGAs aren't going to overtake microcontrollers just based on not having to pick out the correct chip. There's always going to be a cost difference between uCs and FPGAs, so unless the designer gets something very compelling from that flexibility, the uC will continue to be chosen. Keeping up with demand for peripheral flexibility is as simple as including more on each chip - unused peripheral blocks are still cheaper than building the peripherals out of reconfigurable blocks.
- VLM 14y agoThe "windows style" of monolithic development where the more checklists on the feature list, the better the product must be, only works in a monopoly, which is the situation on the desktop, more or less in consumer goods, but not even close in embedded. The problem is now you've got a CPU with 7 UARTS and the 5th one has a hardware bug that only affects one user in the world. Debugging doesn't scale very well. The same cost argument applies to unused blocks. If you can save 5 cents per device by not using FPGAs then you'll save 10 cents by selecting a minimal old fashioned controller, but that blocks you into a corner. Another issue is the infinite variety of peripherals. An infinite number of an infinite variety of peripherals rapidly becomes very expensive compared to "here's 1M identical gates to implement whatever you want" Its like the extremely early history of computing, will reconfigurable and infinitely reprogramable von-neumann processors ever beat hard wired logic "computers" based on physical plugboards and unit record equipment in the marketplace? Well, yeah that's exactly how it turned out. "unless the designer gets something very compelling from that flexibility" Yes almost infinitely fast hardware accelerated peripherals and the devs choice of cpu core. If your app has no inner loop that requires optimization (perhaps an automobile transmission, or a tamagotchi) or WRT core selection then in the style of "only got a hammer then the whole world looks like a nail" in those situations there would be little advantage.
- berntb 14y agoA PDP-10 in a FPGA!? I used TOPS-20 at Uni, a long time ago. Loved the architecture, the assembler was like a high level programming language. Like being reminded of an old girl friend you'll never really get over. If I get time, I should get a hobby...
- amirhirsch 14y agoI spent 2007-2010 building a PDP-11 system using Xilinx Virtex-5 as a replacement controller for a nuclear reactor. We used magneto-RAM as an upgrade for a fixed-head-disk: http://amirhirsch.com/pdp11.jpg http://amirhirsch.com/pdp11.jpg
- robomartin 14y agoIf the focus of your work is to replace discrete embedded processor blocks with FPGA's, sure, copy, paste and include might get you pretty far. That is not the case for all applications, not by a longshot. For example, I had to build a DDR memory controller from scratch in order to squeeze the last clock cycle of performance out of the device. Off the shelf cores are often very --very-- general purpose, badly written and poorly documented. The same can be true of real time image processing constructs where something like a hand-coded polyphase FIR filter can easily run twice as fast as plug-and-play modules floating about. Then there's the element of surprise. If, for example, I was developing an FPGA-based board for a drone or a medical device, I would, more than likely, require that 100% of the design be done in house (or crazy extensive testing be done to outside modules). Anyone in software has had the experience of using some open-source module to save time only to end-up paying for it dearly when something doesn't work correctly and help isn't forthcoming. If the software you are working on is for a life support device it is very likely that taking this approach is actually prohibited, and for good reason. While I fully understand your point of view, this is one that reduces software and hardware development to simply wiring together a bunch of includes. In my experience this isn't even reality in the most trivial of non-trivial real-world projects. FPGA's are not software. I see these "FPGA's for the masses" articles pop-up every so often. Here's what's interesting to me. If you are an engineer schooled in digital circuit design, developing with FPGA's is a piece of cake. There's nothing difficult about it at all, particularly when compared to the old days of wire-wrapping prototypes out of discrete chips. Sure, there can be a bit of tedium and repetition here and there. At the same time, one person can be fully responsible for a ten million logic element design...which was impossible just a couple of decades ago. If you don't understand logic circuits, FPGA's are voodoo. Guess what? A carburetor is voodoo too if you don't understand it. Let's invert the roles: Ask a seasoned FPGA engineer without (or with superficial) web coding experience to code a website --server and client side-- using JS, JQuery, HTML5, CSS3, PHP, Zend and MySQL. Right. Then let's write an article about how difficult web programming is and how it ought to be available to the masses. Then let's further suggest that you can do nearly everything in web development via freely available includes. I happen to be equally at home with hardware and software (web, embedded, system, whatever) and I can't see that scenario (development-by-includes) playing out in any of these domains.