LISA (inspired by LLVM ISA) is a small synthesizable processor whose architectural instruction stream is a simplified LLVM-like bytecode format.
run.sh: command-line runner for local checks/build/simulation and CIsynth/synth.ys: Yosys synthesis script for the top modulesynth/reports/: synthesis netlist and logsrtl/lisa_defs.vh: shared opcode/uop constantsrtl/lisa_imem.v: byte-addressable instruction memory with fetch windowrtl/lisa_fetch_unit.v: variable-length instruction fetch helperrtl/lisa_decoder.v: decodes opcodes, operands, immediate fields, branch targets, PHI tagsrtl/lisa_ssa_regfile.v: fixed-size SSA ID -> register storagertl/lisa_int_alu.v: integer add/sub/mulrtl/lisa_lsu.v: load/store unit gluertl/lisa_data_mem.v: byte-addressable little-endian data memoryrtl/lisa_control_flow_unit.v: branch/jump/return next-PC logicrtl/lisa_bytecode_core.v: top-level FSM (fetch -> decode -> execute -> writeback)tb/tb_lisa_bytecode_core.v: self-checking example testbenchAll instructions start with:
Supported instructions:
iconst: [01][07][dest][imm0][imm1][imm2][imm3]add: [02][05][dest][srcA][srcB]sub: [03][05][dest][srcA][srcB]mul: [04][05][dest][srcA][srcB]load: [05][04][dest][addrSSA]store: [06][04][dataSSA][addrSSA]br: [07][09][condSSA][tLo][tHi][fLo][fHi][tagT][tagF]jmp: [08][05][targetLo][targetHi][tag]ret: [09][03][srcSSA]phi: [0A][07][dest][srcA][srcB][tagA][tagB]halt: [FF][02]rtl/lisa_ssa_regfile.v).phi uses a predecessor-edge tag (pred_tag) updated by branch/jump instructions.chmod +x run.sh
./run.sh check
./run.sh sim
./run.sh synth
Expected test result:
1000x0010 = 12Useful commands:
./run.sh lint: Verilator lint./run.sh check: Yosys structural RTL check./run.sh build: build simulation binary./run.sh sim: build + run testbench./run.sh synth: run Yosys synthesis (synth/synth.ys)./run.sh ci: CI entrypoint (lint + check + sim + synth)./run.sh clean: remove simulation artifactSynthesis artifacts:
synth/reports/lisa_bytecode_core_synth.vsynth/reports/synthesis.log