It isn’t for everyone, but if you work much with computers at a low level, you’ll probably sooner or later entertain the idea of creating your own CPU. There was a time when that was a giant undertaking, but with today’s tools and FPGAs it is… well, not easy, but certainly easier. If you have the urge to try your own, you might have a look at [Simply Explained’s] video series called “Building Scott’s CPU.”
The 11 videos cover everything from basic transistor logic to sequential circuits and moves on to things like ALUs, clock units, and how jump instructions work.
Continue reading “Scott’s CPU From The Bottom Up” →
We are certainly spoiled by all the microcontroller options nowadays — which is a great problem to have. But between the good old 8-bit controllers and an increasing number of 32-bit varieties, it almost seems as if the 16-bit ones are slowly falling into oblivion. [stnolting] particularly saw an issue with the lack of 16-bit open source soft cores, and as a result created the NEO430, an MSP430 compatible soft processor written in VHDL that adds a custom microcontroller to your next FPGA project.
With high customization as main principle in mind, [stnolting] included a wide selection of peripherals and system features that can be synthesized as needed. Not limiting himself to the ones you would find in an off-the-shelf MSP430 controller, he demonstrates the true strength of open source soft cores. Do you need a random number generator, CRC calculation, and an SPI master with six dedicated chip select lines? No problem! He even includes a Custom Functions Unit that lets you add your own peripheral feature or processor extension.
However, what impresses most is all the work and care [stnolting] put into everything beyond the core implementation. From the C library and the collection of examples for each of the controller’s features, so you can get started out of the box with GCC’s MSP430 port, to writing a full-blown data sheet, and even setting up continuous integration for the entire repository. Each topic on its own is worth looking at, and the NEO430 offers a great introduction or reference for it.
Of course, there are some shortcomings as well, and the biggest downer is probably the lack of analog components, but that’s understandable considering your average FPGA’s building blocks. And well, it’s hard to compete with the MSP430’s ultra low-power design using an FPGA, so if you’re thinking of replicating this watch, you might be better off with a regular MSP430 from a battery lifetime point of view.
A rite of passage for a digital designer is to build a CPU. That may seem a formidable task and if you are thinking of building a modern CPU like the one in your PC, it is. However, a simple CPU is well within the reach of anyone who can sling some logic gates or HDL. We’ve even seen CPUs built in Minecraft. Now you can play nandgame and build a CPU step-by-step in your browser.
The game is based on the popular From NAND to Tetris site. True to the name you start out with a single NAND gate as a tool. From there you build an inverter, an AND gate, adders, flip flops, registers, and the like. You get a little help from the accompanying text and there are some blacked out hints if you get stuck.
Continue reading “Build A Fun CPU In Your Browser” →
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” →
[Ben Eater] posted some videos of an 8-bit computer with no CPU chip that he built completely on a breadboard a few years ago. After being asked for schematics, he finally admitted that he didn’t have any. So, instead, he decided to rebuild it and keep a video log of each step in the process. You can see his kickoff video, below, but you can also find 30 more recent videos covering topics from the ALU design and troubleshooting to the decimal LED display. He even uses an Arduino to program a EEPROM that he uses to replace a lot of logic.
You probably want to wait until you have some free time as there are around eight hours of videos so far. The videos start off with a simple 555 timer and work up from there. Each piece gets a test separate from the whole, so with luck you won’t have an impossible job trying to troubleshoot the whole thing at the end.
Continue reading “8-Bit Breadboard Computer Is Up To 8 Hours” →
[Agp.cooper] saw a vintage 4Kx4 bit RAM chip and decided that it needed a CPU design to match. The TTL design fits on two boards and has a functional front panel.
This custom CPU project has a few interesting bits worth noting. First, it is small enough that you can wrap your head around it pretty easily. And [Agp.cooper] gives a good account of the instructions set architecture choices he considered and why he settled on the final design.
Continue reading “1MHz, 2 Boards, 4 Bits And A Homebrew CPU” →