|
1 | 1 | # Zelda.RISCV.Emulator |
2 | | -The system level emulator which utilizes dynamic binary translation for RISCV ISA |
| 2 | +## What's this? |
| 3 | +It's a system level emulator which utilizes dynamic binary translation to translate RISCV32 instructions and emulate RISCV32 ISA. |
| 4 | +the following diagram shows how the emulator is organized. |
| 5 | +``` |
| 6 | + +------------------------------------+ |
| 7 | + |---------------------------------------+ |
| 8 | + || hart 0 | |
| 9 | + || +------------+--------------+ | (raising load/store exception) |
| 10 | + || | Exception | Interrupt | | <-----------------------------------+ |
| 11 | + +-----------> +------------+--------------+ | | |
| 12 | +d | || | TRAP handling | | | |
| 13 | +e | || +---------------------------+ | | |
| 14 | +l | || | +----------------------------------------------+ |
| 15 | +i | || | | Memory Management Unit | | |
| 16 | +v | || +------+---------------+ | | + +-----------+ | |
| 17 | +e | || | CSRs | Registers| PC | | | +---------+ | | | |
| 18 | +r | || +------+---------------+ | +----> | | iTLB | +-------------+ | main mem | | |
| 19 | + | || | | | +---------+ +--------+ | | | |
| 20 | +e | || +--------------------------------+ | | | | +-----------+ | |
| 21 | +x | || | dynamic binary translation | | | | | | |
| 22 | +t | || | +------------------------------+ | | | +---------+ | +-----------+ | |
| 23 | +e | || | | translation cache | | | +--> | | dTLB | +----+--------+ | | | |
| 24 | +r | || | +------------------------------+ | | | | +---------+ Page Walker | io mem | | |
| 25 | +n | || | | x86_64 translation | | | | | | | | |
| 26 | +a | || +-+---+--------+-----------------+ | | | | +-----------+ | |
| 27 | +l | ++ | | | | | | | |
| 28 | + | +--------------------------------------+ | | +----------------------------------------------+ |
| 29 | +i | | | | | |
| 30 | +n | | +----------------------+ | |
| 31 | +t | | (mmu instruction load) | |
| 32 | +e | | | |
| 33 | +r | +---------------------------------+ |
| 34 | +r | (mmu data load/store) |
| 35 | +u | |
| 36 | +p | |
| 37 | +t | +-----------------------------------------+ |
| 38 | + +----+ Platform-level Interrupt Controller | |
| 39 | + | | |
| 40 | + +-----------------------------------------+ |
| 41 | +
|
| 42 | +``` |
3 | 43 | ## How to build? |
4 | 44 | Host env: a x86_64 Linux host + gcc 4.8.x |
5 | 45 |
|
|
0 commit comments