|
| 1 | +# imperas.ic |
| 2 | +# Initialization file for ImperasDV lock step simulation |
| 3 | +# David_Harris@hmc.edu 15 August 2024 |
| 4 | +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 |
| 5 | + |
| 6 | +#--mpdconsole |
| 7 | +#--gdbconsole |
| 8 | +#--showoverrides |
| 9 | +#--showcommands |
| 10 | + |
| 11 | +# Core settings |
| 12 | +--variant RV32IMC |
| 13 | +--override cpu/priv_version=1.12 |
| 14 | +--override cpu/user_version=20191213 |
| 15 | +# arch |
| 16 | +--override cpu/mimpid=0x100 |
| 17 | +--override cpu/mvendorid=0x602 |
| 18 | +--override cpu/marchid=0x24 |
| 19 | +--override refRoot/cpu/tvec_align=64 |
| 20 | + |
| 21 | +# No Supervisor mode |
| 22 | +--override cpu/sub_Extensions="S" |
| 23 | + |
| 24 | +# Zifencei extension not implemented |
| 25 | +--override cpu/Zifencei=F |
| 26 | + |
| 27 | +# Little endian only |
| 28 | +--override cpu/endianFixed=T |
| 29 | + |
| 30 | +# For code coverage, don't produce pseudoinstructions |
| 31 | +--override no_pseudo_inst=T |
| 32 | + |
| 33 | +# Show "c." with compressed instructions |
| 34 | +--override show_c_prefix=T |
| 35 | + |
| 36 | +# mcause and scause only have 4 lsbs of code and 1 msb of interrupt flag |
| 37 | +--override cpu/ecode_mask=0x8000000F # for RV32 |
| 38 | + |
| 39 | +# disable CSRs 7a0-7a8 |
| 40 | +--override cpu/trigger_num=0 |
| 41 | + |
| 42 | +# Reset address |
| 43 | +--override cpu/reset_address=0x80000000 |
| 44 | + |
| 45 | +# Wally implementats WFI as NOP |
| 46 | +--override cpu/wfi_is_nop=T |
| 47 | + |
| 48 | +# MISA not writable |
| 49 | +--override cpu/misa_Extensions_mask=0x0 |
| 50 | + |
| 51 | +# No PMP |
| 52 | +--override cpu/PMP_registers=0 |
| 53 | +--override cpu/PMP_undefined=T |
| 54 | + |
| 55 | +# PMA Settings |
| 56 | +# 'r': read access allowed |
| 57 | +# 'w': write access allowed |
| 58 | +# 'x': execute access allowed |
| 59 | +# 'a': aligned access required |
| 60 | +# 'A': atomic instructions NOT allowed (actually USER1 privilege needed) |
| 61 | +# 'P': push/pop instructions NOT allowed (actually USER2 privilege needed) |
| 62 | +# '1': 1-byte accesses allowed |
| 63 | +# '2': 2-byte accesses allowed |
| 64 | +# '4': 4-byte accesses allowed |
| 65 | +# '8': 8-byte accesses allowed |
| 66 | +# '-', space: ignored (use for input string formatting). |
| 67 | +# |
| 68 | +# SVxx Memory 0x0000000000 0x7FFFFFFFFF |
| 69 | +# |
| 70 | +--callcommand refRoot/cpu/setPMA -lo 0x0000000000 -hi 0xFFFFFFFFFFFFFFFFFF -attributes " ---a-- ---- " # All memory inaccessible unless defined otherwise |
| 71 | +--callcommand refRoot/cpu/setPMA -lo 0x0000000000 -hi 0x7FFFFFFFFF -attributes " ---a-- ---- " # INITIAL |
| 72 | +--callcommand refRoot/cpu/setPMA -lo 0x0002000000 -hi 0x000200FFFF -attributes " rw-aA- 1248 " # CLINT |
| 73 | +--callcommand refRoot/cpu/setPMA -lo 0x000C000000 -hi 0x000FFFFFFF -attributes " rw-aA- --4- " # PLIC |
| 74 | +--callcommand refRoot/cpu/setPMA -lo 0x0010000000 -hi 0x0010000007 -attributes " rw-aA- 1--- " # UART0 |
| 75 | +--callcommand refRoot/cpu/setPMA -lo 0x0010060000 -hi 0x00100600FF -attributes " rw-aA- --4- " # GPIO |
| 76 | +--callcommand refRoot/cpu/setPMA -lo 0x0010040000 -hi 0x0010040FFF -attributes " rw-aA- --4- " # SPI |
| 77 | +--callcommand refRoot/cpu/setPMA -lo 0x0080000000 -hi 0x00807FFFFF -attributes " rwx--- 1248 " # DTIM/IROM |
| 78 | + |
| 79 | +# Store simulator output to logfile |
| 80 | +--output imperas.log |
0 commit comments