Skip to content

A single-core 4096-bit RAM basic computer with embedded-programmable behavior

Notifications You must be signed in to change notification settings

3rdPix/Basys3-programmable-basic-computer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minki

In this repository you can find the source code for a 16-bit single core basic computer with 4096 RAM addresses and a 4096 instruction capability ROM in a Harvard micro-architecture.

The project is targetted to, and tested in the Xilinx's Basys3 Artix-7 xc7a35tcpg236-1 FPGA board.

It uses a custom instruction set architecture to run programs. These programs are loaded into the FPGA board using the assembler.

What there is

Architecture

The architecture itself is contained in the .xpr Vivado project found in the respective folder.

This architecture has mapped I/O to the first RAM addresses following this table:

Address Associated component Expected action
0 leds Output/load
1 switches Input/read
2 7-segment-displays Output/load
3 buttons Input/read
4 seconds Input/read
5 miliseconds Input/read
6 microseconds Input/read
7 Unconnected None

Assembler

The assembler is the program that reads a .suasm written in the Su-Assembly language and loads it into the ROM of the board. (the execution is then immediate)

You can find a syntax highlighter in the Visual Studio Code Marketplace for this custom assembly.

Example projects

I also provide three different projects with games built on top of this architecture that make use of the VGA connector to display a 800x600 image for the different games.

Color matching game

This game challenges you to match the random color shown on the screen by guessing the proper RGB values. To adjust the color you can move the indicated switches of the FPGA board linked to red, green and blue respectively. Each with 4bit depth (a total of 4096 colors). Once you have matched the color, the screen will turn black. To start again, simply turn all the switches down and a new random color will show up on screen.

Tower-blocks

This game is a build-a-tower game where a block is moving constantly in the screen above a tower. You have to press the down button to let the block fall into the tower, if landed, a new block will appear. The moving block gets progressively faster and moves further away the more times you land a block. This game runs forever.

Su-Invaders

This WIP is based in the classic Space Invaders. You have a spaceship that moves and can shoot spatial ammo into a group of enemy ships, the mission is to destroy them all.

About

A single-core 4096-bit RAM basic computer with embedded-programmable behavior

Resources

Stars

Watchers

Forks

Packages

No packages published