This TinyTapeout submission is a 4-bit stack calculator.
Features:
- 8-nibble deep stack
- 16 nibbles of RAM
- multiply/divide circuit
- fully writable output
io_in[0]
clock (c)io_in[1]
reset (let the clock tick a few times while reset is high)io_in[5:2]
Inputs (opcodes and input go here)io_in[6:7]
output modeio_out[7:0]
output depends on the Output Mode (not clocked)
It implements the following opcodes
- 0x1 PUSH - 3 cycles - push, value, wait
- 0x2 POP - 3 cycles - pop, wait, wait
- 0x3 OUTL - 2 cycles - outl, wait
- 0x4 OUTH - 2 cycles - outh, wait
- 0x5 SWAP - 3 cycles - swap, wait, wait
- 0x6 PUSF - 3 cycles - peek/dupl/flag, wait, wait
- 0x7 REPL - 3 cycles - not/neg/incr/decr/shr1/shl1/ror1/rol1, wait, wait
- 0x8 BINA - 3 cycles - add/and/not/xor/addc/mull/mulh, wait, wait
- 0x9 MULT - 4 cycles - mult, wait, wait, wait
- 0xA IDIV - 4 cycles - idiv, wait, wait, wait
- 0xB CLFL - 2 cycles - clfl, wait, wait, wait
- 0xC SAVE - 4 cycles - save, wait, wait, wait
- 0xD LOAD - 4 cycles - load, wait, wait, wait
- 0x0 output register
- 0x1 top of stack as 7segment
- 0x2 below top of stack as 7segment
- 0x3 top two values on the stack, top of stack is low nibble and below is high nibble
You can test the design yourself if you do not have the ASIC, by using an FPGA. Currently I only test on a cheap GOWIN FGPA, the Tang Nano 9k.
You will need docker installed.
make gowin
If you already have the Tang Nano 9k connected and can use openFPGALoader, you can go
make upload_gowin
TinyTapeout is an educational project that aims to make it easier and cheaper than ever to get your digital designs manufactured on a real chip!
Go to https://tinytapeout.com for instructions!
Edit the info.yaml and change the wokwi_id to match your project.
Please see the instructions for:
When you edit the info.yaml to choose a different ID, the GitHub Action will fetch the digital netlist of your design from Wokwi.
After that, the action uses the open source ASIC tool called OpenLane to build the files needed to fabricate an ASIC.
- Share your GDS on Twitter, tag it #tinytapeout and link me!