Anton Lydike
|
57f827ba6a
|
updated version to 2.0.0a2
|
2022-03-27 20:24:26 +02:00 |
|
Anton Lydike
|
b5e20ed39b
|
added docstrings to Int32 and UInt32 classes
|
2022-03-27 20:22:31 +02:00 |
|
Anton Lydike
|
4ca475da69
|
improved the MMU.translate_address function
|
2022-03-27 20:22:11 +02:00 |
|
Anton Lydike
|
cc3df91fd1
|
[restructured] moved more types and exceptions to riscemu.types
|
2022-03-27 19:11:10 +02:00 |
|
Anton Lydike
|
bc26ed3a02
|
[restructured] moved all simple type definitions into riscemu.types
|
2022-03-27 19:06:23 +02:00 |
|
Anton Lydike
|
254410e9cc
|
[priv] fixed error in halt csr
|
2022-03-27 18:45:59 +02:00 |
|
Anton Lydike
|
26d0a165f7
|
[priv] added --slowdown flag to slow down emulated clock speed
|
2022-03-27 18:45:28 +02:00 |
|
Anton Lydike
|
cadccaef00
|
[priv] fixed printing for mret, sret and uret
|
2022-03-27 18:44:41 +02:00 |
|
Anton Lydike
|
71093fe72f
|
Maor round of bugfixes and incremental improvements
- fixed errors in TextIO and IOModule
- moved to Int32 and UInt32 based arithmetic
- added a lot of end-to-end and other tests
|
2022-03-27 15:21:10 +02:00 |
|
Anton Lydike
|
cd5795bb74
|
fixed priv start code, added tests
|
2022-02-18 10:17:12 +01:00 |
|
Anton Lydike
|
4f1c73df9e
|
various small bugfixes
|
2022-02-13 19:44:56 +01:00 |
|
Anton Lydike
|
881f4004ed
|
fixed removed argparse line in riscemu.__init__.py
|
2022-02-13 19:43:44 +01:00 |
|
Anton Lydike
|
6fa3558f6c
|
added interactive mode, fixed some bugs
|
2022-02-13 14:55:03 +01:00 |
|
Anton Lydike
|
3d2619c258
|
created a better output for reads/writes outside of known regions
|
2022-02-11 20:29:11 +01:00 |
|
Anton Lydike
|
185ae8b94e
|
added config and better loading code to CPU base
|
2022-02-11 20:25:19 +01:00 |
|
Anton Lydike
|
2880a59dbb
|
fixed ascii escape sequences and section address calculation
|
2022-02-11 18:53:26 +01:00 |
|
Anton Lydike
|
7904a4dae8
|
added verbosity control to user mode emulator
|
2022-02-11 18:31:23 +01:00 |
|
Anton Lydike
|
b396e0c5eb
|
user mode emulator finally working again
|
2022-02-11 18:27:10 +01:00 |
|
Anton Lydike
|
5538034f8b
|
started with base type overhaul
|
2022-02-11 13:32:02 +01:00 |
|
Anton Lydike
|
0488a9d6bc
|
finished basic RISC-V parser
|
2022-01-18 21:08:07 +01:00 |
|
Anton Lydike
|
dc4dca6fea
|
[wip] almost done with the rework of the parser and internal data structure representation of programs
|
2021-12-18 00:25:39 +01:00 |
|
Anton Lydike
|
d5a4acef67
|
tokenizer reimplemented
|
2021-12-13 23:23:55 +01:00 |
|
Anton Lydike
|
52e189c226
|
fixed missing newline at the end of the file
|
2021-12-10 13:46:57 +01:00 |
|
Anton Lydike
|
b317974dcc
|
made sure register values adhere to correct 32bit two's complement standard - fixes #4
|
2021-12-10 13:25:22 +01:00 |
|
Anton Lydike
|
a0259707b2
|
Released v1.0.0 to PyPi
|
2021-12-05 21:17:05 +01:00 |
|
Anton Lydike
|
e65775774a
|
extended userspace RV32I with li, la and mv instruction
|
2021-12-05 16:45:06 +01:00 |
|
Anton Lydike
|
e9c11e9a41
|
added correct instruction printing
|
2021-11-16 08:02:27 +01:00 |
|
Anton Lydike
|
0b34aea520
|
Merge pull request #1 from AntonLydike/kernel-mode
Adding limited privileged emulation using the `riscemu.priv` module
|
2021-10-10 19:58:35 +02:00 |
|
Anton Lydike
|
7ab3f8361d
|
code cleanup to increase visibility
|
2021-09-30 22:04:49 +02:00 |
|
Anton Lydike
|
d09b7a5cb1
|
overhaul of debugging info printing
|
2021-09-30 21:54:50 +02:00 |
|
Anton Lydike
|
d0c5abe845
|
added a whole lot of debugging info for privileged emulation
|
2021-09-30 20:58:44 +02:00 |
|
Anton Lydike
|
3d4d36bfe4
|
moved dependency on pyelftools into scoped function where it's used to reduce the number of dependencies required overall
|
2021-09-03 15:01:55 +02:00 |
|
Anton Lydike
|
0c96a87dcb
|
added RV32A extension, only missing LR.W and SC.W
|
2021-09-03 14:59:34 +02:00 |
|
Anton Lydike
|
3033eb9985
|
tranlsation from absolute addressed to symbol-relative names for debugging
|
2021-08-30 20:10:22 +02:00 |
|
Anton Lydike
|
ca71e196c2
|
added verbose flag and improved verbose output
|
2021-08-30 19:40:13 +02:00 |
|
Anton Lydike
|
f2d07f90b5
|
priv: added __main__ script to module which correctly configures the cpu depending on --kernel or --image options
|
2021-08-30 15:40:13 +02:00 |
|
Anton Lydike
|
0651eabe18
|
fixed how ecalls are represented and handled
|
2021-08-30 15:09:31 +02:00 |
|
Anton Lydike
|
684c858300
|
added support for IO modules
|
2021-08-26 10:48:26 +02:00 |
|
Anton Lydike
|
df9e610d14
|
forgot to commit image loader code
|
2021-08-26 10:47:47 +02:00 |
|
Anton Lydike
|
1f03449694
|
added memory image support to priv emulator
|
2021-08-26 10:46:06 +02:00 |
|
Anton Lydike
|
4c352d8567
|
[MMU] caching last used code section
|
2021-06-08 16:34:45 +02:00 |
|
Anton Lydike
|
e8685af328
|
[PrivMMU] cleaned up file formatting
|
2021-06-08 16:34:19 +02:00 |
|
Anton Lydike
|
3d07c97a52
|
[PrivCPU] improved step function performance by checking time every tenth cycle
|
2021-06-08 16:33:48 +02:00 |
|
Anton Lydike
|
60a2a8d546
|
[CSR] adding cache to mstatus register
|
2021-06-08 16:32:39 +02:00 |
|
Anton Lydike
|
6b4f38d030
|
[ElfLoader] added cache for already decoded instructions
|
2021-06-08 15:07:51 +02:00 |
|
Anton Lydike
|
05c17bc029
|
[PrivCPU] fixed debugger skipping over ebreak instructions
|
2021-06-08 14:44:13 +02:00 |
|
Anton Lydike
|
baa1f24eb7
|
[CpuTraps] fixed formatting for mcause registers
|
2021-06-08 14:42:44 +02:00 |
|
Anton Lydike
|
777717ed2e
|
[PrivRV32I] fixed csrrw instruction to correctly switch register contents
|
2021-06-08 11:36:33 +02:00 |
|
Anton Lydike
|
c7b3693740
|
[Regsietrs] ensuring register values are 32bit
|
2021-06-08 11:36:00 +02:00 |
|
Anton Lydike
|
cc598c0910
|
[PrivCPU] changed timer compare to lower equals to trigger exactly on time
|
2021-06-08 11:35:20 +02:00 |
|
Anton Lydike
|
affaa60d22
|
[PrivCPU] adding performance counter
|
2021-06-08 11:34:28 +02:00 |
|
Anton Lydike
|
48ce44993b
|
[CSR] Adding dump_mstatus method to csr
|
2021-06-08 11:32:51 +02:00 |
|
Anton Lydike
|
639f91b192
|
[decoder] removed sign extension for CSR type instructions
|
2021-06-08 11:31:58 +02:00 |
|
Anton Lydike
|
c25b9f2343
|
[PrivCPU] implemented CPU interrupt handling context switch
|
2021-06-08 00:23:09 +02:00 |
|
Anton Lydike
|
4c7f3ffe67
|
[PrivCPU] fixed perf-counter not comparing against shifted time
|
2021-06-08 00:22:30 +02:00 |
|
Anton Lydike
|
c2002cd46d
|
[PrivCPU] fixed naming for csr mtimecmp callback function
|
2021-06-08 00:21:51 +02:00 |
|
Anton Lydike
|
5b2b12507d
|
[PrivRV32I] added half od csrrs instruction (reading only)
|
2021-06-08 00:21:05 +02:00 |
|
Anton Lydike
|
052ad56310
|
[CSR] fixed call to enum value member
|
2021-06-08 00:20:25 +02:00 |
|
Anton Lydike
|
d9e5d78f87
|
[Registers] removed info when writing to zero register
|
2021-06-08 00:19:36 +02:00 |
|
Anton Lydike
|
79d913baaf
|
[decoder] fixed formatting in print_ins function
|
2021-06-08 00:19:04 +02:00 |
|
Anton Lydike
|
9278235e44
|
[decoder] fixed botched j immediate decoding
|
2021-06-08 00:18:44 +02:00 |
|
Anton Lydike
|
6351f1e84d
|
[PrivRV32I] fixed bug with blt backwards jumps missing by one
|
2021-06-06 09:55:15 +02:00 |
|
Anton Lydike
|
f14bd2b983
|
[PrivCPU, PrivRV32I] fixed bug where ebreaks where missed during debugging
|
2021-06-05 16:19:35 +02:00 |
|
Anton Lydike
|
c1110b9ce3
|
[ElfLoader] better formatting for jump and load/store instructions
|
2021-06-05 15:29:40 +02:00 |
|
Anton Lydike
|
37910018b9
|
[PrivRV32I] finally correct parsing of load/store instruction args
|
2021-06-05 15:29:06 +02:00 |
|
Anton Lydike
|
e4537f86d9
|
[PrivRV32I] implemented csrrwi instruction
|
2021-06-05 15:28:27 +02:00 |
|
Anton Lydike
|
c770cc05cf
|
[Priv Exceptions] added __str__ as __repr__ alias to CpuTrap to correctly format exceptions when printed
|
2021-06-05 15:25:39 +02:00 |
|
Anton Lydike
|
3e4920f5d9
|
[decoder] fixed bug when decoding add/sub instruction
|
2021-06-05 15:24:40 +02:00 |
|
Anton Lydike
|
849d5f4fc3
|
[decoder, ElfLoader] decoing an instruction now returns all args as int
|
2021-06-05 15:24:16 +02:00 |
|
Anton Lydike
|
f9b0bac245
|
[Priv Exceptions] fixed constructor typo in TimerInterrupt
|
2021-06-05 09:56:05 +02:00 |
|
Anton Lydike
|
9424390b65
|
[decoder] Added mret, sret, uret, wfi instruction decoding support
|
2021-06-05 09:54:58 +02:00 |
|
Anton Lydike
|
198d14d5fb
|
[Priv Exceptions] added __repr__ to CpuTrap class
|
2021-06-05 09:29:20 +02:00 |
|
Anton Lydike
|
ca3b4099d4
|
[Priv] moved CSR constants to a separate file
|
2021-06-05 09:27:03 +02:00 |
|
|
79369889f4
|
[CSR] fixed method naming for _addr_to_name (now _name_to_addr)
|
2021-06-04 20:37:08 +02:00 |
|
|
de261c4c43
|
[Priv] overhauled instruction architecture
|
2021-06-04 20:36:33 +02:00 |
|
|
c963fe3989
|
[Priv] small fixes for overlooked things
|
2021-05-26 18:40:42 +02:00 |
|
|
85af9b992f
|
[PrivCPU] overhaul of instruction cycle, adding more CSR interaction
|
2021-05-25 23:50:38 +02:00 |
|
|
7239212729
|
[CSR] adding virtual csr registers
|
2021-05-25 23:49:37 +02:00 |
|
|
6653ef7e7c
|
[CPU] set correct MISA
|
2021-05-25 11:14:52 +02:00 |
|
|
a1f29b9d97
|
[CPU] cleaned up constructor
|
2021-05-25 11:14:18 +02:00 |
|
|
49b59cd46a
|
[CSR] added read/write checks and unified name to addr resuloution
|
2021-05-25 10:49:54 +02:00 |
|
|
291f44a192
|
[CSR] unknown csr names now fail without exception
|
2021-05-25 10:24:24 +02:00 |
|
|
c4cd83701f
|
[CSR, PrivCPU] Added csr callback registration through decorator
|
2021-05-24 15:51:05 +02:00 |
|
|
504407c0d9
|
[CSR] adding callbacks to each csr block
|
2021-05-24 14:34:35 +02:00 |
|
Anton Lydike
|
db2b0b314b
|
[PrivCPU, PrivRV32I] fix for relative jumps and branches
|
2021-05-24 10:08:53 +02:00 |
|
Anton Lydike
|
6bd5cd1598
|
[ElfLoader] better formatting for load and save instructions
|
2021-05-24 10:08:01 +02:00 |
|
Anton Lydike
|
ed6912a060
|
[ElfLoader] added bounds check to elf loader and casting binary data to bytearray
|
2021-05-24 10:07:21 +02:00 |
|
Anton Lydike
|
55be71dcc3
|
[CSR] added time and timeh csr codes
|
2021-05-24 10:05:34 +02:00 |
|
Anton Lydike
|
3a79bfdada
|
[ElfLoader] also loading .sdata and .sbss sections now
|
2021-05-23 12:59:59 +02:00 |
|
Anton Lydike
|
3f11cd84ca
|
[decoder] fixed error with decoding slli type instructions
|
2021-05-23 12:58:47 +02:00 |
|
Anton Lydike
|
f3959be843
|
[decoder] now returning instruction number as third return value
|
2021-05-23 10:44:27 +02:00 |
|
Anton Lydike
|
0475d8d384
|
[CPU] added instruction XLEN attribute to CPU class to support multiple instruction lengths
|
2021-05-23 10:42:04 +02:00 |
|
Anton Lydike
|
c9a136d595
|
[instructions] fixed error in auipc command
|
2021-05-22 21:05:14 +02:00 |
|
Anton Lydike
|
ee0aac30c4
|
[instructions] moved regs and mmu to properties to work with janky PrivCPU
|
2021-05-22 21:04:43 +02:00 |
|
Anton Lydike
|
1bdf2e6efe
|
[mmu] fixed typo in docstring
|
2021-05-22 21:03:56 +02:00 |
|
Anton Lydike
|
c48a5efee3
|
[cpu] fixed formatting to include cpu class extensions
|
2021-05-22 21:03:37 +02:00 |
|
Anton Lydike
|
15da68995c
|
[priv] module now able to load and execute elf binaries
|
2021-05-22 21:02:36 +02:00 |
|
Anton Lydike
|
a4735db388
|
Added a decoder module which can deocde some RV32I/M instructions
Some of them even correctly O.o
|
2021-05-22 21:01:03 +02:00 |
|
Anton Lydike
|
483a3f2416
|
Priv: [wip] implementing privileged architecture
|
2021-05-19 12:14:43 +02:00 |
|
Anton Lydike
|
a2e206eaee
|
renamed CPU.__run -> CPU._run, it's now overwriteable by subclasses
|
2021-05-19 09:51:51 +02:00 |
|