Skip to content

Commit

Permalink
docs: add how to test instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Apr 9, 2024
1 parent 8b20b88 commit f40927f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
![](../../workflows/gds/badge.svg) ![](../../workflows/docs/badge.svg) ![](../../workflows/test/badge.svg)

# Tiny Tapeout Verilog Project Template
# SPELL

> SPELL is a minimal, stack-based programming language created for The Skull CTF
- [Read the documentation for project](docs/info.md)

Expand Down
18 changes: 16 additions & 2 deletions docs/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,22 @@ The `STACK` register is used to push a value onto the stack or read the top valu

## How to test

TODO
To test SPELL, you need to load a program into the program memory and execute it. You can load the program by repeatedly executing the following steps for each byte of the program:

1. Write the byte to the top of the stack (using the `STACK` register)
2. Write the address of the byte in the program memory to top of the stack
3. Write the opcode `!` to the `EXEC` register

After loading the program, you can execute it by writing the address of the first byte in the program memory to the `PC` register, and then pulsing the `run` signal.

### Test program

The following program which will rapidly blink an LED connected to the `uio[0]` pin. The program bytes should be loaded into the program memory starting at address 0:

```python
[1, 56, 119, 250, 44, 1, 54, 119, 250, 44, 3, 61]
```

## External hardware

SPI RAM for storing program code + data, can be simulated by an RP2040 (optional)
None

0 comments on commit f40927f

Please sign in to comment.