STRING 32000
0 Stars     14 Views    

Author: gabriel

Forked from: SJP4/STRING 32000

Project access type: Public

Description:

Overview

The STRING32000 is a 32-bit CPU. It reads and executes each instruction in 1 clock cycle like all the old string CPUS. It has addressed pins and can modify its own code. While this CPU usually needs special external circuitry to interact with complex outputs like the RGB LED matrix, these external drive circuits are just meant to store the bitmap being drawn on the screen. The overall unspecialized nature of this CPU allows it to address up to input and output 65,536 32-bit pins.

Self-modifying code

Probably the most exciting feature about this CPU is that it can write to its main memory, which is where its program is stored. This means it supports self-modifying code. Self-modifying code is the ability for the computer to alter its own code that it is running. This was very very annoying to get working properly.

Executing values in registers as instructions

The second most exciting feature of this CPU is temporary instructions. This means that the CPU can make a very temporary custom instruction and execute it while it's in a register instead of being in something permanent like main memory, which is much safer since it decreases the risk of accidental corruption of the program. This was mildly annoying to get working.

Memory

There are two memories, which are both 32-bit with 16-bit addresses. The main memory sits outside the CPU and is nonvolatile and stores the program to execute and data to save. The second memory is also located outside the CPU and is volatile and used to store temporary values that are needed when operating, for example cursor position. For the safety of the program and the user's mental wellbeing, the CPU cannot activate the reset pin on the main memory to delete its own program all at once, since if there was some dumb bug and the CPU deleted data that the user didn't have a copy of, that could result in severe depression because of how heartbreaking it would be for an entire program that you didn't have a copy of to be deleted in the blink of an eye. So yeah, better to be safe than sorry.

About the morbidly obese main memory

Since the only memory that can be edited by circuitry and be used as permanent storage (EEPROM) only supports up to 10-bit addresses and STRING32000 supports up to 16-bit addresses, I have decided connect 64 EEPROM, which in total supports up to 16-bit addresses, fully utilizing the CPU's address space.

-----------------------

This computer currently only runs one program where you can make 32x32 pictures in black and white, but I'll make more programs for it in the future.

Controls for 32x32 painter:

keyboard controls: WASD to move cursor, Q to display an image, E to toggle pixel between black and white.

stepper: Use to select the picture slot. There is a face drawn in slot 0

PWR and EN: toggle both on to run. PWR is the main switch and EN freezes the clock when disabled.

-----------------------

CREDITS:

Credit to Sanderokian Stfetoneri (author of Femto) for the fast clock circuit

FORK FOR BEST USER EXPIERIENCE

Created: May 29, 2024

Updated: May 29, 2024


Comments

You must login before you can post a comment.