#0xA, #10, or #A •
Data: .db 0xNN •
Labels with name: • Comments ; or //
Nexys-A7-100T-Master.xdc in constraints/ and uncomment only the nets you
use.
rom16x8.sv embeds the ROM bytes (no $readmemh
needed). For VGA builds, the top-level and overlay are included in the pack/ZIP automatically.
This assembler targets a minimalist SAP-1 variant with 8-bit instructions: opcode[7:4] + operand[3:0]. The low nibble is either an
immediate (use #) or a small address/label (0–15).
| Mnemonic | Opcode | Operand | Effect |
|---|---|---|---|
NOP |
0x0 | — | No operation. |
LDA |
0x1 | #imm or addr/label | Load A. Immediate: LDA #0xA. Label/address: LDA N0. |
ADDI |
0x2 | #imm | A ← A + imm. |
ADDM |
0x3 | addr/label | A ← A + M[addr]. |
SUBM |
0x4 | addr/label | A ← A - M[addr]. |
STA |
0x5 | addr/label | Store A → M[addr]. |
OUTI |
0x6 | #imm or A | Write to OUT. |
OUTA |
0x7 | — | OUT ← A. |
HLT |
0xF | — | Halt. |
.db 0xNN — Emit a data byte. Example: N1: .db 0x64.Name: resolves to address 0x0..0xF (default ROM size).; or //.$readmemh. ROM size: 16 by default (set 32/64 in
Actions; extra lines are ignored by the 4-bit PC).Label: .db 0xNN or just
.db. LDA N1
ADDM N2
ADDM N3
OUTA
HLT
N1: .db 0x64
N2: .db 0x32
N3: .db 0x68
The generated rom16x8.sv embeds the ROM bytes directly (no $readmemh path needed). The
sap1_rom.mem file is still exported for reference and tooling.
Keyboard: Press Esc or click outside the card to close.
sap1_top.sv, sap1_core.sv, rom16x8.sv,
sevenseg_hex_mux.sv, btn_debouncer.sv, pulse_stretcher.sv,
vga_timing_640x480_ce.sv, vga_hex7_overlay.sv.project-root/ src/ mem/ constraints/ scripts/
src/.constraints/. Then place
your official Nexys-A7-100T-Master.xdc in constraints/ and uncomment only the nets
you use.scripts/.mem/sap1_rom.mem.mem/sap1_rom.mem).project-root/:
vivado -mode batch -source scripts/build_sap1_nexys_a7.tcl
vivado -mode batch -source scripts/rebuild_after_mem_change.tcl
sap1_nexys_a7/sap1_nexys_a7.runs/impl_1/sap1_top.bit
src/ (SystemVerilog sources, incl. VGA) mem/ (sap1_rom.mem from this page) constraints/ (sap1_minimal.xdc) scripts/ (build/rebuild TCL) README.md
project-root/, preserving the folder structure.Nexys-A7-100T-Master.xdc into constraints/ and uncomment only the nets
you use (LEDs, seven-seg, VGA).cd project-root vivado -mode batch -source scripts/build_sap1_nexys_a7.tcl
vivado -mode batch -source scripts/rebuild_after_mem_change.tcl
sap1_nexys_a7/sap1_nexys_a7.runs/impl_1/sap1_top.bit