Skip to main content

TARA Studio

An integrated software suite for the TARA 16-bit teaching CPU.

TARA (Teaching Architecture for RISC Assembly) is a small, 16-bit RISC ISA designed to reveal how the simplest of computers actually works — from assembly, down through the datapath and microcode, all the way to pixels on a screen. TARA Studio bundles everything you need to learn it, write for it, and run it on real hardware in one desktop application.

pip install taracpu
taracpu          # launch TARA Studio

Prefer not to install anything? A browser version of the simulator is also available.


Two tools, one app

TARA Studio opens with two top-level tabs:

1 · TARA CPU Simulator

A full software simulator of the TARA processor — write a program and watch it run, one instruction at a time, with every register and memory byte in view.

  • Syntax-highlighted assembly editor with line numbers and a library of bundled example programs (Basic → Intermediate → Advanced, plus Display demos and playable games like snake, ping pong and flappy bird).
  • One-click assembler with inline error reporting.
  • Machine-code listing — address, hex encoding, colour-coded binary fields and mnemonic, synchronised to the program counter.
  • Register file view — R0–R7 as live cards, with change highlighting.
  • Memory viewer — browse all 2 KB of byte-addressable memory, in hex or decimal, with an optional Matplotlib colour-map heatmap.
  • Display panel — the 64×64 memory-mapped framebuffer rendered as a pixel raster, with image import.
  • Execution log — a per-instruction trace of register and memory changes.
  • Step / Run / Stop / Reset / Back, plus Save and Boot of the full machine state, and a variable clock from 1 Hz to full speed (adjustable while running).
  • Built-in ISA reference dialog.

2 · TARA FPGA Tool

A host-side toolkit that talks to a real TARA processor running on an FPGA (e.g. a Digilent Basys 3) over the board's USB-UART — the same cable that programs it. It can also attach to the local simulator's memory when hardware is unavailable. Bridge the simulator to actual silicon, or debug the same workflow virtually:

  • Program the board — without Vivado. After a cold boot the FPGA fabric is blank. Open Board Setup, point it at the synthesised .bit, and press Program FPGA to configure the board over JTAG, then carry on as normal — no Xilinx toolchain, and no licence, on the machine running the demo. Choose FPGA SRAM (a couple of seconds, cleared at the next power cycle) or SPI flash (the board then boots TARA by itself every time it is switched on). Uses openFPGALoader; the first run offers to install it for you.
  • Inspect memory live — read any region while the CPU runs, with a heatmap and auto-refresh. Use Connect Memory to choose FPGA USB or Simulator Memory.
  • Write & poke — fill a range or change individual bytes by hand.
  • Assemble & run on the selected target — open a .tara file (or the program in the editor), and the tool assembles it, loads the machine code, and starts the FPGA or simulator-memory target — no re-synthesis for hardware.
  • Because both tools share the same assembler, code you develop in the simulator runs unchanged on the board. A Run on FPGA button in the Simulator tab loads and runs the current program on the connected FPGA USB or Simulator Memory target in one click.

Install & run

pip install taracpu
taracpu

Dependencies (installed automatically): PyQt5, Matplotlib, and pyserial (for the FPGA tool). Python 3.9+.

User files — machine-state saves, CSV memory dumps and UI settings — are written to ~/.taracpu/ on first launch.

Author & license

Developed by Ayon Chakraborty.

Copyright (C) 2026 Ayon Chakraborty. Licensed under the GNU General Public License, version 3 or later (GPL-3.0-or-later). See LICENSE.


TARA ISA quick reference

Format Instructions Encoding
F0 NOP, HLT, RET op[15:11] 00000000000
F1 ADD, SUB, MUL, AND, OR, XOR, SLT op rd rsA rsB 00
F2 MOV, NOT op rd rs 00000
F3 LIL, LIH, ADDI, SHL, SHR op rd imm8
F4 LDW, STW, LDB, STB op rdata rbase off5
F5 BZ, BN op rtest rel8
F6 JMP, CALL op rel11
F7 PUSH, POP op rstk 00000000

Memory map

Range Use
0x000–0x3FF Program code
0x400–0x4FF Data / arrays
0x500–0x5FE Stack (R7)
0x5FF Live input byte: bit0=up, bit1=down, bit2=left, bit3=right, bit4=quit
0x600–0x7FF Display framebuffer — 64×64 pixels, 1 bit per pixel, 8 pixels per byte

Register conventions

Reg Convention
R0–R5 General purpose
R6 Link register (CALL / RET)
R7 Stack pointer (PUSH / POP)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taracpu-1.2.2.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taracpu-1.2.2-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file taracpu-1.2.2.tar.gz.

File metadata

  • Download URL: taracpu-1.2.2.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for taracpu-1.2.2.tar.gz
Algorithm Hash digest
SHA256 4d09086d1ad474e182aeabf0bdd737c6e0c9aa36ac18df2e2e9257983c79137a
MD5 f9689f186f2fcaef268b7dd6735864a0
BLAKE2b-256 fc082629329134626d6513488ee0c0e7860908cb3fbcf28b495bf7a31ae1ac12

See more details on using hashes here.

File details

Details for the file taracpu-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: taracpu-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for taracpu-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f18f2c9bea45ab106920604d6ccc6be724c9f98685581344e4e6df13c995f544
MD5 324306de5729d77973ef56900323ec4b
BLAKE2b-256 5ffdd2a7933d31e42f3c79c48bade7dc608137a8988f75748ad4b85ff0277ebd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 files

1.2.1

2 files

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page