Commit graph

230 commits

Author SHA1 Message Date
Toby Jaffey
d0407c074f Update all of the Emacs mode style comments, so they register in github as C.
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-16 17:06:49 +00:00
Toby Jaffey
ff3827f3a6
Merge pull request #5 from cnlohr/fix-language-misidentification
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
Fix language misidentification
2025-12-16 07:27:15 +00:00
cnlohr
3409fd1fb6 Fix language misidentification 2025-12-15 17:57:47 -08:00
Toby Jaffey
53b5eeb256 Add a simple statistical profiler
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
Enabled by -p, will sample program counter and store frequency. Using "-i 1" will make execution pause on every instruction and sample PC.

    host-sdl -p -i 1 foo.bin | grep times > log.txt
    cat log.txt  | sort -n -k4

Can match addresses with
riscv64-elf-objdump -S -d -f foo.bin
2025-12-15 14:10:49 +00:00
Toby Jaffey
6a6d7f1832 Only call checkKeys() when rendering, as it will pause VM 2025-12-15 14:07:00 +00:00
Toby Jaffey
09985655a2 Fix host-sdl/doom audio. Have app ask via syscall if audio can be rendered before sending, else any mismatch in rates will cause queue over/underflow in host-sdl. 2025-12-15 10:48:10 +00:00
Toby Jaffey
4e61e3bd4a Make self and mandel examples a bit smaller
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-15 01:12:47 +00:00
Toby Jaffey
4741900562 Tick agnes before drawing each screen, but no faster. 2025-12-15 00:59:27 +00:00
Toby Jaffey
035608b04a Add agnes NES emulator (very slow).
Add -W <n> -H <n> width and height options to host-sdl
2025-12-15 00:37:12 +00:00
Toby Jaffey
2e90bfa812 Doom binary with audio
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-14 23:34:06 +00:00
Toby Jaffey
39e7dddc5a Quick and dirty sound for DOOM. Samplerate seems off, but it's just a demo. 2025-12-14 23:32:34 +00:00
Toby Jaffey
e524ea4815 Fix sticky keys in doom. host-sdl only reported the last key pressed, now uses a circular buffer. 2025-12-14 22:39:24 +00:00
Toby Jaffey
49a94ca174 Add BLT test 2025-12-14 21:53:54 +00:00
Toby Jaffey
83276f98e4 Move shared.h 2025-12-14 21:41:01 +00:00
Toby Jaffey
93898a5baa Rename 2025-12-14 21:38:24 +00:00
Toby Jaffey
6a4118e420 Add AUIPC test 2025-12-14 21:38:05 +00:00
Toby Jaffey
f917ba38ff Tighten up internal vs external functions, which lets optimiser do a better job, self.bin about 10% smaller. 2025-12-14 19:51:36 +00:00
Toby Jaffey
07bab3cca6 Rebuild precompiled bins 2025-12-14 19:37:00 +00:00
Toby Jaffey
9bda566997 Move internal static garbage into vmst.
Potentially, this could have ended up being non-zero when used by concurrent threads.
2025-12-14 19:34:58 +00:00
Toby Jaffey
1e7343d385 Map extram to same fuzz buffer 2025-12-14 19:28:15 +00:00
Toby Jaffey
28ce517710 Remove label 2025-12-14 18:56:41 +00:00
Toby Jaffey
585a945b18 Report "true" code coverage by including mini-rv32ima.h 2025-12-14 18:46:34 +00:00
Toby Jaffey
7d064dd11d Fix indent 2025-12-14 18:36:18 +00:00
Toby Jaffey
e5fd17aff6 Fix issues with unaligned memory bus rd/wr. Improve fuzzing. 2025-12-14 18:35:00 +00:00
Toby Jaffey
5fb03b7d66 Remove RV32 breakpoints and interrupts, to save a tiny bit of code size.
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-14 15:05:35 +00:00
Toby Jaffey
065d2c64aa TinyGL example 2025-12-14 14:45:10 +00:00
Toby Jaffey
7313047fd1 Simple fuzzer 2025-12-14 12:34:53 +00:00
Toby Jaffey
0736381925 Slim down mini-rv32imaa by removing zicsr and atomics - which are unused. 2025-12-14 11:49:28 +00:00
Toby Jaffey
861c75d80e Remove cycle counting and timers from mini-rv32ima 2025-12-14 11:19:23 +00:00
Toby Jaffey
a693fed59c Show coverage report for all uvm32 2025-12-14 11:15:59 +00:00
Toby Jaffey
5dc9acdf3d When a trap occurs in mini-rv32ima, always pass to the host rather than allowing running code to handle it. This would be important for a real OS, but the aim of uvm32 is embeddable logic - not full emulation.
As all traps are caught by host, begin testing mini-rv32ima internals by checking PC oob and PC alignment.
2025-12-14 11:00:45 +00:00
Toby Jaffey
be5dbbfa44 Latest doom binary (since crt0.S changes) 2025-12-14 11:00:26 +00:00
Toby Jaffey
8d67bf2fc3 Latest maze binary 2025-12-14 10:59:59 +00:00
Toby Jaffey
a635846e69 Remove -fpeel-loops, now that real issue has been fixed. 2025-12-14 09:50:14 +00:00
Toby Jaffey
044d600b86 Merge branch 'main' of github.com:ringtailsoftware/uvm32 2025-12-14 09:42:31 +00:00
Toby Jaffey
7a39a69f3d Move label 2025-12-14 09:42:03 +00:00
Toby Jaffey
14383da04d Only deploy from main branch 2025-12-14 09:41:11 +00:00
Toby Jaffey
b7269c23b3
Merge pull request #2 from 1player/main
apps/maze: fix possible stack overflow
2025-12-14 09:37:50 +00:00
Stéphane Travostino
cdfae7d453 apps/maze: fix possible stack overflow
The original code this app is inspired from uses rand(), which returns
a number >= 0.
mulberry32() on the other hand can return a negative number, in which
case will overflow the accesses in the dirs array. Fix that by forcing
the result to be unsigned.
2025-12-14 10:15:04 +01:00
Toby Jaffey
2c5f1e33fe Label
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-14 03:26:41 +00:00
Toby Jaffey
079cf2c9bd Add CI workflow to create a coverage badge via github pages 2025-12-14 03:08:59 +00:00
Toby Jaffey
cfc1286874 Regenerate binaries, now default crt0 has changed 2025-12-14 01:36:47 +00:00
Toby Jaffey
6adbc53ad9 Remove impossible states 2025-12-14 01:34:59 +00:00
Toby Jaffey
a5305d64dc Test that invalid lX opcodes trigger mini-rv32 internal core error 2025-12-14 01:21:42 +00:00
Toby Jaffey
fe51154698 Test for lb, lbu, lw, sb, sbu, sw explicitly 2025-12-14 00:58:35 +00:00
Toby Jaffey
2037f6e575 Test memory read outside of memory and extram regions. 2025-12-14 00:32:50 +00:00
Toby Jaffey
179466eae4 Refactor 2025-12-14 00:18:06 +00:00
Toby Jaffey
173d5056a5 Completely remove UVM32_STACK_PROTECTION unless enabled (requires manually changing crt0.S), as this saves 16 bytes on every .bin 2025-12-14 00:09:32 +00:00
Toby Jaffey
c1399fbe86 Test coverage reports info 2025-12-13 23:31:43 +00:00
Toby Jaffey
aae4eacfb8 Test getslice_fixed when a buffer is requests which exceeds memory 2025-12-13 23:29:45 +00:00