Done for the course TSEA83 in computer construction.
- CPU and VGA unit written in VHDL
- Graphing calculator written in "glorified assembly"
- Compiler from "glorified assembly" to assembly instructions
VHDL code intended to run on a Nexys 3 board.
A fully featured 32-bit CPU with integer/fixed point arithmetics of , 8 general registers.
The graphic unit displays a 640x480 pixel image at 60Hz. Split into one 320x480 bitmapped area, and the other half of the display showing 20x30 tiles from [1-9], [A-Ö] and a select range of mathematical symbols.
There is an included converter from a ttf font to tiles.
A relatively advanced cross-assembler that includes support for if/else-statemets, while-loops, include-statements and comments.
# Modify function: Replace X'es
load$ 0,0 # Loop counter
while 0 < &inputLength # GR0 < number of input elements
# Put the value &nextInputType is pointing to on GR2.
load~ 2,&nextInputType
if 2=$2 # If value is X
# Replace the X in the function with proper Xval
store~ 1,&nextInput
end if
...
# Increment loop counter
add$ 0,1
...
end while
# Labels this row as inputLength. Start value: 8.
inputLength: sli 8
See the assembly folder for sample code, and the (swedish) report for a description.
A compiler is available here
The calculator includes support for addition, substraction, multiplication and division of fixed point numbers written in reverse-polish notation. Can plot functions with a custom range and auto-adjusting axes.
Fully written in assembly (sillescript2) with source code available here. Calc is the main program that includes other neccecary programs.