Download presentation
Presentation is loading. Please wait.
1
ECE243 Interpreter Lab
2
Interpreter Lab You write an interpreter EXAMPLE MINI PROGRAM: Clear
for a simple accumulator-based virtual ISA ie, a program that executes a simple program an accumulator is just a memory location EXAMPLE MINI PROGRAM: Clear Add 77 Sub 15 Exit
3
Interpreter in Memory Addr Value 0x20000 mini program … 0x25000
accumulator 0x30000 your interpreter mini insts, like java bytecode 1 word nios program, like java virtual machine (JVM)
4
HOW EACH MINI INST IS ENCODED:
4 byte opcode 0=clear, 1=add, 2=sub, 3=exit 4 byte operand if appropriate 4 byte address of next instruction
5
Example 0x20000 0x20004 Memory: 0x20008 0x2000c 0x20010 0x22014
DESIRED MINIPROGRAM Clear Add 77 Sub 15 Exit ASSEMBLY FILE (ENCODED) Memory: 0x20000 0x20004 0x20008 0x2000c 0x20010 0x22014 0x22018 0x2201c 0x22100 .
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.