An open API service indexing awesome lists of open source software.

https://github.com/aaronc81/stack-processor

WIP stack processor in Verilog for TinyFPGA BX
https://github.com/aaronc81/stack-processor

Last synced: 10 months ago
JSON representation

WIP stack processor in Verilog for TinyFPGA BX

Awesome Lists containing this project

README

          

A work-in-progress stack processor implemented in Verilog, targeting the TinyFPGA BX.

## Build

As committed, one module is missing, `instruction_memory`, which may be generated by assembling a
program using the `assemble.rb` script.

The `go` script will assemble, build, and upload for you:

```
$ ./go programs/add.asm

yosys -p "synth_ice40 -json hardware.json" -q block_mem.v instruction_memory.v top.v
...

TinyProg CLI
------------
Using device id 1d50:6130
...
```

## Test

There's a test suite bodged together with the `test.rb` Ruby script, which looks for special
assertion markers within the assembly code in `programs`.

```
$ ruby test.rb

Discovered 2 tests:
- add (2 assertions)
- simple_push_inc (2 assertions)

=== Running: add ===
Assemble | Simulate | Load | Check
top == 9
count == 1
PASSED

=== Running: simple_push_inc ===
Assemble | Simulate | Load | Check
top == 8
count == 1
PASSED
```