nobodywasishere / ponyo

A framework for implementing ISA simulators for any number of ISAs, currently supporting a subset of LEGv8

Home Page:https://blog.eowyn.net/ponyo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ponyo

Ponyo is a (work-in-progress) ISA simulator currently supporting (some of) LEGv8. It also aims to be a framework for implementing simulators for any number of ISAs.

A blog post describing the initial development of this project is on my blog here.

Simulator

  • ARM LEGv8 Simulator
    • Harvard architecture
    • Takes in assembly source code
    • Takes in memory file
    • Step through program execution
    • Jump to pre-defined break points in code

CLI

usage: ponyo [-h] -f ASM [-d MEM] [--isa ISA] [--debug] [--gui]

options:
  -h, --help         show this help message and exit
  -f ASM, --asm ASM  Assembly file
  -d MEM, --mem MEM  Data memory file
  --isa ISA          ISA of assembly file
  --debug
  --gui

Execute directly:

$ ./ponyo/ponyo.py -f examples/legv8/fib.asm --debug

Install using pip:

$ git clone https://github.com/nobodywasishere/ponyo
$ cd ponyo
$ pip install .
...
$ ponyo -f examples/legv8/fib.asm --gui

Set breakpoints in the assembly by adding //$break on any given line.

GUI

Simply run ponyo with the --gui flag and the assembly file you wish to run.




Supported Architectures

LEGv8 Harvard

33/57 instructions supported

  • ADD, ADDI, ADDS, ADDIS

  • AND, ANDI, ANDS, ANDIS

  • B, B.COND, BL, BR, CBNZ, CBZ

  • EOR, EORI

  • LDUR, LDURB, LDURH

  • LDURSW, LDXR

  • LSL, LSR

  • MOVK, MOVZ

  • ORR, ORRI

  • STUR, STURB, STURH

  • STURSW, STXR

  • SUB, SUBI, SUBS, SUBIS

  • FADDS, FADDD, FCMPS, FCMPD, FDIVS, FDIVD, FMULS, FMULD, FSUBS, FSUBD

  • LDURS, LDURD, MUL, SDIV, SMULH, UDIV, UMULH

  • CMP, CMPI, MOV

  • LDA

13/13 instructions supported




Fishbowl icon created by Becris - Flaticon

About

A framework for implementing ISA simulators for any number of ISAs, currently supporting a subset of LEGv8

https://blog.eowyn.net/ponyo

License:GNU General Public License v3.0


Languages

Language:Python 98.6%Language:Makefile 1.4%