# README
mipsevm
Supported 55 instructions:
'addi', 'addiu', 'addu', 'and', 'andi',
'b', 'beq', 'beqz', 'bgez', 'bgtz', 'blez', 'bltz', 'bne', 'bnez',
'clz', 'divu',
'j', 'jal', 'jalr', 'jr',
'lb', 'lbu', 'lui', 'lw', 'lwr',
'mfhi', 'mflo', 'move', 'movn', 'movz', 'mtlo', 'mul', 'multu',
'negu', 'nop', 'not', 'or', 'ori',
'sb', 'sll', 'sllv', 'slt', 'slti', 'sltiu', 'sltu', 'sra', 'srl', 'srlv', 'subu', 'sw', 'swr', 'sync', 'syscall',
'xor', 'xori'
To run:
- Load a program into a state, e.g. using
LoadELF
. - Patch the program if necessary: e.g. using
PatchGo
for Go programs,PatchStack
for empty initial stack, etc. - Implement the
PreimageOracle
interface - Instrument the emulator with the state, and pre-image oracle, using
NewInstrumentedState
- Step through the instrumented state with
Step(proof)
, whereproof==true
if witness data should be generated. Steps are faster withproof==false
. - Optionally repeat the step on-chain by calling
MIPS.sol
andPreimageOracle.sol
, using the above witness data.
# Functions
No description provided by the author
No description provided by the author
LoadContracts loads the Cannon contracts, from op-bindings package.
LoadContractsFromFiles loads the Cannon contracts, from local filesystem.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
No description provided by the author
No description provided by the author
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
Note: 2**12 = 4 KiB, the min phys page size in the Go runtime.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
LoggingWriter is a simple util to wrap a logger, and expose an io Writer interface, for the program running within the VM to write to.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author