Since an FPGA is just a sea of digital logic components on a chip, it isn’t uncommon to build a CPU using at least part of the FPGA’s circuitry. VexRiscv is an implementation of the RISC-V CPU architecture using a language called SpinalHDL.
SpinalHDL is a high-level language conceptually similar to Verilog or VHDL and can compile to Verilog or VHDL, so it should be compatible with most tool chains. VexRiscv shows off well in this project since it is very modular. You can add instructions, an MMU, JTAG debugging, caches and more.
Continue reading “VexRiscv: A Modular RISC-V Implementation for FPGA”
This is about the time of the year you realize you aren’t going to keep all of those new year’s resolutions you made. However, if one of them was to learn VHDL and FPGAs, you might be in luck. Vicilogic has a free course in Fundamentals of Digital Systems. You do have to register, but it didn’t even verify our e-mail address, so it shouldn’t be too onerous to sign up.
Associated with the National University of Ireland Galway, the training is high quality and offers animated demos in your browser of the digital circuitry. You can even control the demos yourself. You’d think the work was occurring in some browser script, but according to the site, the demos are tied to real FPGA boards. You can supposedly look in on them as you use them with a video stream, but we never saw that working so your mileage may vary. If you want a preview of what it looks like, check out the video below. There’s guided exercises and also quizzes where you have to interact with the demos.
Continue reading “Veni, Vidi, ViciLogic Teaches You Digital Logic Interactively”
These days, if you want to start learning about FPGAs, it can be a daunting experience. There’s a huge variety of different platforms and devboards and it can be difficult to know where to start. [RoGeorge] decided to take a different tack. Like a 16-year-old drag racer, he decided to run what he brung – a printer control panel cum FPGA development board (Romanian, get your Google Translate on).
[RoGeorge] was lucky enough to score a couple of seemingly defective control panels from HP Laserjets discarded by his workplace. Seeing potentially good parts going to waste, like keypads and LCDs, he decided to investigate them further – finding a 50,000 gate Xilinx Spartan IIE running the show. Never one to say no to opportunity, [RoGeorge] dived in to learning how to work with FPGAs.
The forum posts are a great crash course in working with this sort of embedded FPGA platform. [RoGeorge] covers initial mapping of the peripherals on the board & finding a JTAG connector and programming solution, before moving on to basic FPGA programming and even covers the differences between sequential programming on microcontrollers and the parallel operation of FPGAs. Even if you don’t intend to get down and dirty with the technology, spend half an hour reading these posts and you’ll be far more knowledgeable about how they work!
In the end, [RoGeorge] showed how to teach yourself to work with FPGAs for the price of a couple of programming cables – not a mean feat by any means. It’s a testament to the hacker spirit, and reminds us of [SpriteTM]’s efforts in hacking hard drive controllers.
A few years ago, Philip Peter started a little pet project. He wanted to build his own processor. This really isn’t out of the ordinary – every few months you’ll find someone with a new project to build a CPU out of relays, logic chips, or bare transistors. Philip is a software developer, though, and while the techniques and theory of building hardware haven’t changed much in decades, software development has made leaps and bounds in just the past few years. He’s on a quest to build a CPU out of discrete components.
Search the Internet for some tips and tricks for schematic capture programs like KiCad and Eagle, and you’ll find some terrible design choices. If you want more than one copy of a very specific circuit on your board, you have to copy and paste. Circuit simulation is completely separate from schematic capture and PCB design, and unit testing – making sure the circuit you designed does what it’s supposed to do – is a completely foreign concept. Schematic capture and EDA suites are decades behind the curve compared to even the most minimal software IDE. That’s where Philip comes in. By his own admission, he reinvented VHDL badly, but he does have a few ideas that are worth listening to.
Continue reading “Reinventing VHDL Badly”
I’ve worked with a lot of students who want to program computers. In particular, a lot of them want to program games. However, when they find out that after a few weeks of work they won’t be able to create the next version of Skyrim or Halo, they often get disillusioned and move on to other things. When I was a kid, if you could get a text-based Hi-Lo game running, you were a wizard, but clearly the bar is a lot higher than it used to be. Think of the “Karate Kid”–he had to do “wax on, wax off” before he could get to the cool stuff. Same goes for a lot of technical projects, programming or otherwise.
I talk to a lot of people who are interested in CPU design, and I think there’s quite a bit of the same problem here, as well. Today’s commercial CPUs are huge beasts, with sophisticated memory subsystems, instruction interpreters, and superscalar execution. That’s the Skyrim of CPU design. Maybe you should start with something simpler. Sure, you probably want to start learning Verilog or VHDL with even simpler projects. But the gulf between an FPGA PWM generator and a full-blown CPU is pretty daunting.
Continue reading “Crawl, Walk, Run: Planning Your First CPU Design”
[Kodera2t] wanted to experiment with programmable logic. Instead of going with an FPGA board, he decided to build his own CPLD (complex programmable logic device) board, with a built-in programmer. The CPLD is a Xilinx 9536 which is inexpensive and, though obsolete, still readily available. The programmer for the board uses an FT232RL and the total cost is very low ([kodera2t] says it is in the price range of a Raspberry Pi Zero or about $4).
From a user’s point of view, a CPLD is just a small FPGA. Internally, there is a significant difference in how they implement your design. Although there are differences between different product families, CPLDs usually use a sea of logic gates arranged as an AND/OR chain. By feeding inputs and inverted inputs into the AND gates and then ORing the results, you can build interesting logic circuits. However, modern CPLDs use Verilog or VHDL, so you describe what you want just like with an FPGA and the software figures out how to use the underlying circuits to give you what you want.
Continue reading “Not Ready for FPGAs? Try a CPLD”
New electrical components enable us to reconstruct old wiring more efficiently. Especially, the accessible and cheap FPGA kits which offer the possibility to put together wiring of many old computers as an “on-a-chip” solution.
When I managed to get a hold of an old bubble LED display and a pretty mechanical matrix keyboard, I decided to build a replica of an old single board computer. Logical options seemed to be to build either KIM-1 or Heathkit ET-3400. Replicas of KIM-1 already exist, even for Arduino, so my task would be reduced to connect the keyboard and display. But then I told myself that I would use the fact that my bubble display has 9 positions as an excuse to build the legendary Czechoslovak Single Board Computer PMI-80 which used the same display. My replica is an FPGA, or rather an FPGA emulator of this very computer.
Continue reading “Retrocomputing on a Chip”