Usually, when you think of designing — or recreating — a CPU on an FPGA, you assume you’ll have to use Verilog or VHDL. There are other options, as well, but those are the biggest two players in FPGA configuration. [Robert Baruch] has a multipart series where he uses nMigen — a Python toolbox — to recreate a 6800 CPU like the one used in many vintage video games and pinball machines.
Unlike some tools that try to convert software written in some language to an FPGA configuration, nMigen uses Python as a scripting language to create code in FHDL. This is similar in concept to VHDL or Verilog, but gives up the event-driven paradigm, opting instead to allow designers to explicitly call out synchronous and combinatorial logic.
Interestingly the tool hinges on Yosys, so it can target several Lattice parts as well as FPGAs from Intel/Altera and Xilinx. It turns out that the n in nMigen is for new, and you might find some of the documentation for regular old Migen to be useful.
As for the 6800, it is one of the older CPUs used in hobby computers. The 8 bit CPU had about 72 instructions, depending on how you counted them. This was before reduced instruction sets were the rage, so it is a little extra work to implement a rich instruction set.
There are other Python options, such as MyHDL and PyCPU, for example. You can even try using .NET.
from Hackaday https://ift.tt/2tZpo1B
Comments
Post a Comment