This week, I completed the CPU features needed for our BIOS and DOS demo and pushed the CPU bring-up and verification code. I implemented byte and word arithmetic, logical operations, memory read-modify-write, conditional branches, LOOP, FLAGS controls, shifts, rotates, multiplication and division. I also added LEA, word PUSH/POP memory forms, and LES/LDS for instructions encountered in the compiled software.
I implemented immediate and DX-addressed port I/O, including byte and word IN/OUT operations. Word operations use two byte transfers, and the CPU preserves the port, operand data and flags throughout bus waits. I added MOVS, STOS, LODS, CMPS and SCAS with REP handling, direction control and segment overrides. Repeated string operations retain completed progress so they can resume correctly after an interrupt.
I added software interrupt entry and IRET, including interrupt-vector reads, stack-frame construction and parent-process restoration. Maskable interrupts now support interrupt acknowledgment, STI and segment-load inhibition, HLT wakeup and interruption between REP elements. In simulation, I verified the keyboard IRQ path through the PIC and PPI, ran two interactive HELLO.COM sessions, and checked that both programs exited successfully and returned to the shell. I also verified the actual BIOS, disk loader, compiled C code and DOS process-launch path with an inputless executable.
Verification passed 57,680 arithmetic/FLAGS programs, 86,888 I/O programs, 27,653 string programs, 80,732 software-interrupt programs and 10,226 maskable-interrupt programs. Compiled-C verification passed 258 runs across two compiler configurations and three memory profiles. Tests covered memory stalls, address wrapping, register preservation, divide errors, interrupt return and reset cancellation. After changing division for FPGA timing, I added 33 reset-interruption checks, bringing the arithmetic regression to 51 reset cuts.
I prepared a separate FPGA ROM diagnostic and confirmed its expected LEDs and KEY0 reset behavior on the DE10-Standard. I then integrated my CPU with Ben’s memory/peripheral system and Govind’s software and SDRAM updates for the inputless demo. The system retains the full 640 KiB conventional RAM map in onboard SDRAM, with the BIOS and read-only disk image embedded in the FPGA configuration. I fixed memory-inference problems, incorrect pin-assignment syntax, SDRAM startup initialization and clock constraints. I changed division to run across multiple clock cycles so the CPU could meet the 25 MHz system clock.
The integrated design compiled successfully in Quartus using 5,738 ALMs, or 14% of the device. All four timing corners passed, with minimum setup and hold slack of 2.173 ns and 0.170 ns, no unconstrained paths, and all 82 pin assignments checked. Two complete SDRAM boot/reset simulations passed, each reading 45 sectors, running DEMO.COM, checking zero exit status and reaching the parent success marker. I programmed the integrated demo onto the physical board and observed its VGA output. The remaining display issue is cropping at the left edge, which still needs alignment or scanout investigation.
I updated the architecture, compatibility, interface, toolchain, diagram and test documentation, and prepared repeatable build and programming instructions with pinned image and bitstream hashes. The CPU bring-up work is pushed on my HELLO.COM branch; the latest SDRAM/VGA integration fixes remain local. Remaining work includes resolving the display cropping, repeating the integrated demo’s physical reset and power-cycle checks, and later qualifying keyboard input and the physical microSD storage path.