Anton Lydike
|
3d4d36bfe4
|
moved dependency on pyelftools into scoped function where it's used to reduce the number of dependencies required overall
|
3 years ago |
Anton Lydike
|
0c96a87dcb
|
added RV32A extension, only missing LR.W and SC.W
|
3 years ago |
Anton Lydike
|
3033eb9985
|
tranlsation from absolute addressed to symbol-relative names for debugging
|
3 years ago |
Anton Lydike
|
ca71e196c2
|
added verbose flag and improved verbose output
|
3 years ago |
Anton Lydike
|
f2d07f90b5
|
priv: added __main__ script to module which correctly configures the cpu depending on --kernel or --image options
|
3 years ago |
Anton Lydike
|
0651eabe18
|
fixed how ecalls are represented and handled
|
3 years ago |
Anton Lydike
|
684c858300
|
added support for IO modules
|
3 years ago |
Anton Lydike
|
df9e610d14
|
forgot to commit image loader code
|
3 years ago |
Anton Lydike
|
1f03449694
|
added memory image support to priv emulator
|
3 years ago |
Anton Lydike
|
4c352d8567
|
[MMU] caching last used code section
|
3 years ago |
Anton Lydike
|
e8685af328
|
[PrivMMU] cleaned up file formatting
|
3 years ago |
Anton Lydike
|
3d07c97a52
|
[PrivCPU] improved step function performance by checking time every tenth cycle
|
3 years ago |
Anton Lydike
|
60a2a8d546
|
[CSR] adding cache to mstatus register
|
3 years ago |
Anton Lydike
|
6b4f38d030
|
[ElfLoader] added cache for already decoded instructions
|
3 years ago |
Anton Lydike
|
05c17bc029
|
[PrivCPU] fixed debugger skipping over ebreak instructions
|
3 years ago |
Anton Lydike
|
baa1f24eb7
|
[CpuTraps] fixed formatting for mcause registers
|
3 years ago |
Anton Lydike
|
777717ed2e
|
[PrivRV32I] fixed csrrw instruction to correctly switch register contents
|
3 years ago |
Anton Lydike
|
c7b3693740
|
[Regsietrs] ensuring register values are 32bit
|
3 years ago |
Anton Lydike
|
cc598c0910
|
[PrivCPU] changed timer compare to lower equals to trigger exactly on time
|
3 years ago |
Anton Lydike
|
affaa60d22
|
[PrivCPU] adding performance counter
|
3 years ago |
Anton Lydike
|
48ce44993b
|
[CSR] Adding dump_mstatus method to csr
|
3 years ago |
Anton Lydike
|
639f91b192
|
[decoder] removed sign extension for CSR type instructions
|
3 years ago |
Anton Lydike
|
c25b9f2343
|
[PrivCPU] implemented CPU interrupt handling context switch
|
3 years ago |
Anton Lydike
|
4c7f3ffe67
|
[PrivCPU] fixed perf-counter not comparing against shifted time
|
3 years ago |
Anton Lydike
|
c2002cd46d
|
[PrivCPU] fixed naming for csr mtimecmp callback function
|
3 years ago |
Anton Lydike
|
5b2b12507d
|
[PrivRV32I] added half od csrrs instruction (reading only)
|
3 years ago |
Anton Lydike
|
052ad56310
|
[CSR] fixed call to enum value member
|
3 years ago |
Anton Lydike
|
d9e5d78f87
|
[Registers] removed info when writing to zero register
|
3 years ago |
Anton Lydike
|
79d913baaf
|
[decoder] fixed formatting in print_ins function
|
3 years ago |
Anton Lydike
|
9278235e44
|
[decoder] fixed botched j immediate decoding
|
3 years ago |
Anton Lydike
|
6351f1e84d
|
[PrivRV32I] fixed bug with blt backwards jumps missing by one
|
3 years ago |
Anton Lydike
|
f14bd2b983
|
[PrivCPU, PrivRV32I] fixed bug where ebreaks where missed during debugging
|
4 years ago |
Anton Lydike
|
c1110b9ce3
|
[ElfLoader] better formatting for jump and load/store instructions
|
4 years ago |
Anton Lydike
|
37910018b9
|
[PrivRV32I] finally correct parsing of load/store instruction args
|
4 years ago |
Anton Lydike
|
e4537f86d9
|
[PrivRV32I] implemented csrrwi instruction
|
4 years ago |
Anton Lydike
|
c770cc05cf
|
[Priv Exceptions] added __str__ as __repr__ alias to CpuTrap to correctly format exceptions when printed
|
4 years ago |
Anton Lydike
|
3e4920f5d9
|
[decoder] fixed bug when decoding add/sub instruction
|
4 years ago |
Anton Lydike
|
849d5f4fc3
|
[decoder, ElfLoader] decoing an instruction now returns all args as int
|
4 years ago |
Anton Lydike
|
f9b0bac245
|
[Priv Exceptions] fixed constructor typo in TimerInterrupt
|
4 years ago |
Anton Lydike
|
9424390b65
|
[decoder] Added mret, sret, uret, wfi instruction decoding support
|
4 years ago |
Anton Lydike
|
198d14d5fb
|
[Priv Exceptions] added __repr__ to CpuTrap class
|
4 years ago |
Anton Lydike
|
ca3b4099d4
|
[Priv] moved CSR constants to a separate file
|
4 years ago |
Anton Lydike
|
79369889f4
|
[CSR] fixed method naming for _addr_to_name (now _name_to_addr)
|
4 years ago |
Anton Lydike
|
de261c4c43
|
[Priv] overhauled instruction architecture
|
4 years ago |
Anton Lydike
|
c963fe3989
|
[Priv] small fixes for overlooked things
|
4 years ago |
Anton Lydike
|
85af9b992f
|
[PrivCPU] overhaul of instruction cycle, adding more CSR interaction
|
4 years ago |
Anton Lydike
|
7239212729
|
[CSR] adding virtual csr registers
|
4 years ago |
Anton Lydike
|
6653ef7e7c
|
[CPU] set correct MISA
|
4 years ago |
Anton Lydike
|
a1f29b9d97
|
[CPU] cleaned up constructor
|
4 years ago |
Anton Lydike
|
49b59cd46a
|
[CSR] added read/write checks and unified name to addr resuloution
|
4 years ago |
Anton Lydike
|
291f44a192
|
[CSR] unknown csr names now fail without exception
|
4 years ago |
Anton Lydike
|
c4cd83701f
|
[CSR, PrivCPU] Added csr callback registration through decorator
|
4 years ago |
Anton Lydike
|
504407c0d9
|
[CSR] adding callbacks to each csr block
|
4 years ago |
Anton Lydike
|
db2b0b314b
|
[PrivCPU, PrivRV32I] fix for relative jumps and branches
|
4 years ago |
Anton Lydike
|
6bd5cd1598
|
[ElfLoader] better formatting for load and save instructions
|
4 years ago |
Anton Lydike
|
ed6912a060
|
[ElfLoader] added bounds check to elf loader and casting binary data to bytearray
|
4 years ago |
Anton Lydike
|
55be71dcc3
|
[CSR] added time and timeh csr codes
|
4 years ago |
Anton Lydike
|
3a79bfdada
|
[ElfLoader] also loading .sdata and .sbss sections now
|
4 years ago |
Anton Lydike
|
3f11cd84ca
|
[decoder] fixed error with decoding slli type instructions
|
4 years ago |
Anton Lydike
|
f3959be843
|
[decoder] now returning instruction number as third return value
|
4 years ago |
Anton Lydike
|
0475d8d384
|
[CPU] added instruction XLEN attribute to CPU class to support multiple instruction lengths
|
4 years ago |
Anton Lydike
|
c9a136d595
|
[instructions] fixed error in auipc command
|
4 years ago |
Anton Lydike
|
ee0aac30c4
|
[instructions] moved regs and mmu to properties to work with janky PrivCPU
|
4 years ago |
Anton Lydike
|
1bdf2e6efe
|
[mmu] fixed typo in docstring
|
4 years ago |
Anton Lydike
|
c48a5efee3
|
[cpu] fixed formatting to include cpu class extensions
|
4 years ago |
Anton Lydike
|
15da68995c
|
[priv] module now able to load and execute elf binaries
|
4 years ago |
Anton Lydike
|
a4735db388
|
Added a decoder module which can deocde some RV32I/M instructions
Some of them even correctly O.o
|
4 years ago |
Anton Lydike
|
483a3f2416
|
Priv: [wip] implementing privileged architecture
|
4 years ago |
Anton Lydike
|
a2e206eaee
|
renamed CPU.__run -> CPU._run, it's now overwriteable by subclasses
|
4 years ago |