Custom 8-bit Processor

I designed and implemented an 8-bit processor, instruction set, and a simple assembly language / assembler. This project targeted the Altera DE2 FPGA development boards used as part of the course. The arithmetic logic unit (ALU) implemented all operations found on the famous 4-bit 74181 ALU IC for the full 8-bit data byte. A control unit was implemented to follow the program using a Mealy state machine.

An additional module was implemented for the processor to interface with an SRAM module present onboard. This used a set of registers to select the address and an extra bit to select the upper or lower half of the 16-bit word in RAM. This greatly expanded the available memory for operations, previously limited to operating within the processor registers.

The assembly language was used to implement three required test programs, focused on demonstrating arithmetic and logic functionality. The instruction set used a variable length op-code with a maximum length of 5 bits, often accomanied by an extra bit to select the location of the resulting data. For bit operations where more data was required to select a relevant bit position, shorter op-codes were used to ensure the program could maintain its 14-bit instruction system. A total of 20 instructions were defined covering the most common control flow, arithmetic / logic, and registry access functions.