Commit Graph

  • fba9fa6616 Added dummy debug registers (hardcoded to zero) to make sbreak test pass. Florian Nücke 2020-09-18 09:30:50 +02:00
  • 91016ccf2b Added first few tests generated from riscv-tests repository. Florian Nücke 2020-09-18 00:55:27 +02:00
  • 49c76e3206 Updated gradle wrapper scripts using latest gradle version. Florian Nücke 2020-09-18 00:54:15 +02:00
  • fe16fbe31d Added overload taking File to ELF parser. Florian Nücke 2020-09-18 00:10:13 +02:00
  • dbbbcbe880 Made CPU non-final and allow overriding raiseException for tests. Florian Nücke 2020-09-18 00:09:59 +02:00
  • fc34c58f04 Allow passing start PC value in CPU reset. Florian Nücke 2020-09-17 23:44:08 +02:00
  • 5d6e4d8b90 Renames to be more in line with spec, fixed vectored interrupts. Florian Nücke 2020-09-17 23:33:34 +02:00
  • 79f7a9403e Don't write at all on bad mode instead of sneakily adjusting mode. Florian Nücke 2020-09-17 23:29:49 +02:00
  • c1238469c3 Check TVM in sfence.vma. Florian Nücke 2020-09-17 23:29:16 +02:00
  • 510990f47b Cleaning up mstatus and added mstatush. Florian Nücke 2020-09-17 23:28:44 +02:00
  • e80bd8c3e9 Added ELF parser. Florian Nücke 2020-09-17 23:26:16 +02:00
  • a2bc5f852c Implemented TW. Florian Nücke 2020-09-17 22:41:59 +02:00
  • 8d0cef66c2 Implemented actually checking TSR. Florian Nücke 2020-09-17 22:38:25 +02:00
  • d11993d3ff Re-read docs on how mret and sret are supposed to work... Florian Nücke 2020-09-17 22:36:24 +02:00
  • 458b5afb97 Made stuff that can be private again. Florian Nücke 2020-09-17 22:34:25 +02:00
  • aec46b9d83 Trace translator is now threaded. Traces are abstract classes instead of interfaces for INVOKEVIRTUAL vs INVOKEINTERFACE. Traces store the cpu they've been built for in a field now. Florian Nücke 2020-09-17 11:20:35 +02:00
  • 47950ee216 Synchronously read board output instead of thread for determinism in benchmark. Florian Nücke 2020-09-16 12:03:01 +02:00
  • 4e0b3b2b7f Use Sizes constants when loading binaries. Florian Nücke 2020-09-16 12:01:57 +02:00
  • 7f7e9f65a7 Unify memory access error handling. Florian Nücke 2020-09-16 11:59:37 +02:00
  • 4dfbd0e341 Don't auto-reset on device changes. Florian Nücke 2020-09-16 11:59:21 +02:00
  • a17c492faa Clear RAM to zero on reset. Florian Nücke 2020-09-16 11:59:05 +02:00
  • 528d7246d3 Add hard reset option for CPU. Florian Nücke 2020-09-16 11:58:29 +02:00
  • d8e716decf Note on UnsafeMemory perf. Florian Nücke 2020-09-16 11:57:42 +02:00
  • 8cc987f10c Opcode methods can be private again. Florian Nücke 2020-09-16 10:37:21 +02:00
  • 4e681d6650 Moved rest of codegen to translator class. Florian Nücke 2020-09-16 10:34:31 +02:00
  • 95ce96d235 Both Method types fully qualified to avoid confusion. Florian Nücke 2020-09-16 10:26:09 +02:00
  • 7e6856f30a Cleaned up opcde method caching. Florian Nücke 2020-09-16 10:24:15 +02:00
  • 9550f7130d Note on mip masking. Florian Nücke 2020-09-16 10:23:56 +02:00
  • b806e82abf Clearer naming for fetch tlb method. Florian Nücke 2020-09-16 10:23:33 +02:00
  • 4accac07be Moved getField and extendSign into util class. Moved trace translator into own package. Florian Nücke 2020-09-16 09:56:08 +02:00
  • ec10d0be40 Using anonymous classes for traces now so we don't need a classloader. Refactored binary translator to be a little more standalone. Florian Nücke 2020-09-16 09:33:57 +02:00
  • b8a64ffc90 Being a bit more efficient in how hot traces gets tracked. Florian Nücke 2020-09-16 09:31:52 +02:00
  • a2068c477f Refactored code gen. Moved things for clearer profiling results. Florian Nücke 2020-09-15 19:03:27 +02:00
  • 430efe5633 Moved Unsafe access into utility class. Florian Nücke 2020-09-15 18:47:12 +02:00
  • c6d7d8a56d Cleaned up memory exceptions. Florian Nücke 2020-09-15 15:00:36 +02:00
  • 6d25174609 First draft dynamic binary translation and it's actually kinda working? Florian Nücke 2020-09-15 15:00:24 +02:00
  • 5abd6d4e65 Ensure to advance cycles when waiting for interrupt to avoid stalling when mtimecmp is based on cycles. Florian Nücke 2020-09-14 17:50:42 +02:00
  • b7955d5c97 Made mip atomic because paranoia. Florian Nücke 2020-09-14 17:50:04 +02:00
  • 8b44de7d88 Made PLIC more feature-complete. Still hardcoded to 32 sources and one hart for now. Florian Nücke 2020-09-14 17:46:30 +02:00
  • f1eac4d9e1 Add support for setting SIP in CLINT and make it (theoretically) support multiple harts. Florian Nücke 2020-09-14 09:15:35 +02:00
  • 62084c2a68 Improved benchmarking setup. Florian Nücke 2020-09-14 01:48:46 +02:00
  • b88b99066b Made CPU its own RTC (using its cycles) for stability in testing. Florian Nücke 2020-09-14 01:48:21 +02:00
  • 899c978061 More arbitrary method shuffling digging for perf. Florian Nücke 2020-09-14 01:23:19 +02:00
  • bb12632730 Higher res timer, linux otherwise calculates 0jps which can lead to stalls. Florian Nücke 2020-09-14 01:22:01 +02:00
  • 9086ac6511 More anti-inlining... Florian Nücke 2020-09-14 00:57:41 +02:00
  • 7e39d07643 Moved a bunch of instruction implementations to - paradoxically - speed things up. Thanks hotspot, I guess... Florian Nücke 2020-09-13 23:40:55 +02:00
  • 8319e5bda5 Reworked inner interpreter loop to now be able to operate on sequential instructions more efficiently. Florian Nücke 2020-09-13 22:47:57 +02:00
  • 4c28ef1100 Cleanup. Florian Nücke 2020-09-13 17:18:10 +02:00
  • 4f1175d722 Added unsafe memory which uses a blob of direct memory. Makes fetch() time go down from 25% to 13% of total step() time. Florian Nücke 2020-09-13 17:16:25 +02:00
  • fbcb8ef6ea fixup Florian Nücke 2020-09-13 17:14:13 +02:00
  • 14f38662cb More constants. Florian Nücke 2020-09-13 17:13:15 +02:00
  • e40d3524e6 Remove slicing again, doesn't do much/anything. Also use size constants all over the place. Florian Nücke 2020-09-13 17:09:22 +02:00
  • 3644a5ee38 Fixed tests. Florian Nücke 2020-09-13 16:58:17 +02:00
  • fbcf484940 Unified API of memory map a bit. Florian Nücke 2020-09-13 11:42:23 +02:00
  • 2b3399321e Use direct memory byte buffer for *slightly* better performance. Florian Nücke 2020-09-13 11:40:54 +02:00
  • 2362bc92a2 Simplified memory access interface a little (pass value size instead of multiple overloads). Provide slighlty more direct access to physical memory. Florian Nücke 2020-09-12 18:19:01 +02:00
  • d86f9be2e7 Way too late first proper commit. Florian Nücke 2020-09-12 05:34:47 +02:00
  • 8f2940ebca Ignore log files. Florian Nücke 2020-09-12 05:32:57 +02:00
  • 6881049e05 init Florian Nücke 2020-09-02 14:44:19 +02:00