FPGA Computer - Design
The overall architecture is that from Build a Modern Computer From First Principles: From Nand to Tetris,
which details the construction of a simple computer starting only with NAND gates. For the most part, this design has been adhered to for the individual components
despite the probable availability of more efficient Xilinx-made versions.
The CPU consists of a seven-function
ALU, data and address
registers, and circuitry to shuffle signals around
based on the current opcode being processed.
The computer consists of the CPU, a program counter, and two banks of
RAM implementing a
Harvard architecture.. I'm still undecided as to whether it will have an actual screen and keyboard or
will implement a serial interface of some kind. The registers will be exposed to inspection from the Raspberry Pi.
This is turning out to be a little more complicated than it would seem. The design from the course uses 56K+1 16-bit words (32K instruction, 16K data, 8K screen memory, 1 byte keyboard memory).
The Spartan-6 lx9 doesn't contain enough resources to implement all of this from
scratch, but does contain 32K 16-bit words of SRAM. This would be ideal, but there is not enough of it.
In addition to the Spartan-6 FPGA, the Logi-Pi also contains 32Kbit of
SDRAM, which works out to 2M 16-byte words. This is plenty, and better than either severely
limiting the memory available to the computer or working with purely external memory, but slower and more complicated to work with than SRAM. Mike Field has developed
an SDRAM controller for the Logi-Pi.