Commit graph

238 commits

Author SHA1 Message Date
Toby Jaffey
8fca9fcec1 Disable strict C99, as binary constants are currently used in rv32c code 2025-12-17 15:51:19 +00:00
Toby Jaffey
adec69e1d7 Attempt to enable RV32 C extension. c.lw and c.sw are definitely broken somehow wrt MMIO memory.
Examples built using C extensions, many fail in strange ways
2025-12-17 15:43:15 +00:00
Toby Jaffey
652094c289 Unmodified compressed instruction support 2025-12-17 14:08:46 +00:00
Toby Jaffey
3d83844d5c Fix markdown blip
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-17 11:07:57 +00:00
Toby Jaffey
0bbe373b56 Link to syscall.md
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-17 07:46:08 +00:00
Toby Jaffey
6989c3e067 Link to big-endian fork
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-16 22:36:08 +00:00
Toby Jaffey
8c68d48f80 Add some documentation on syscalls and argument handling 2025-12-16 22:04:50 +00:00
Toby Jaffey
4d3b393205 Add host-sdl info 2025-12-16 19:30:14 +00:00
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