mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Rename emulator to host, for clarity
This commit is contained in:
parent
6d12ce5a80
commit
3e4c87fa1d
21 changed files with 29 additions and 29 deletions
12
Makefile
12
Makefile
|
|
@ -1,12 +1,12 @@
|
|||
all:
|
||||
(cd emulator && make)
|
||||
(cd emulator-mini && make)
|
||||
(cd emulator-parallel && make)
|
||||
(cd host && make)
|
||||
(cd host-mini && make)
|
||||
(cd host-parallel && make)
|
||||
#(cd apps && make) # do not build apps by default, as they require a variety of dev tools
|
||||
|
||||
clean:
|
||||
(cd emulator && make clean)
|
||||
(cd emulator-mini && make clean)
|
||||
(cd emulator-parallel && make clean)
|
||||
(cd host && make clean)
|
||||
(cd host-mini && make clean)
|
||||
(cd host-parallel && make clean)
|
||||
(cd apps && make clean)
|
||||
|
||||
|
|
|
|||
14
README.md
14
README.md
|
|
@ -16,7 +16,7 @@ Check out the [apps](apps) folder for more.
|
|||
## Quickstart
|
||||
|
||||
make
|
||||
emulator/emulator precompiled/mandel.bin
|
||||
host/host precompiled/mandel.bin
|
||||
|
||||
Build one of the sample apps (requires docker for C, or Zig, or Rust)
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ Build one of the sample apps (requires docker for C, or Zig, or Rust)
|
|||
|
||||
Run the app
|
||||
|
||||
./emulator ../apps/helloworld/helloworld.bin
|
||||
./host ../apps/helloworld/helloworld.bin
|
||||
|
||||
## Quickstart API
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ There are two system ioreqs used by uvm32, `halt()` and `yield()`.
|
|||
New ioreqs can be added to the host via `uvm32_init()`.
|
||||
Each ioreq maps a CSR number to a value understood by the host (`F_PRINTD` below) and has an associated type which tells the host how to interpret the data passed to the CSR.
|
||||
|
||||
Here is a full example of a working VM host from [apps/emulator-mini](apps/emulator-mini)
|
||||
Here is a full example of a working VM host from [apps/host-mini](apps/host-mini)
|
||||
|
||||
--
|
||||
|
||||
|
|
@ -150,10 +150,10 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
## Samples
|
||||
|
||||
* [emulator](emulator) vm host which loads a binary and runs to completion, handling multiple ioreq types
|
||||
* [emulator-mini](emulator-mini) minimal vm host (shown above), with baked in bytecode
|
||||
* [emulator-parallel](emulator-parallel) parallel vm host running multiple vm instances concurrently, with baked in bytecode
|
||||
* [emulator-arduino](emulator-arduino) vm host as Arduino sketch (tested on Arduino Uno ATmega328P, uses 9950 bytes of flash/1254 bytes RAM)
|
||||
* [host](host) vm host which loads a binary and runs to completion, handling multiple ioreq types
|
||||
* [host-mini](host-mini) minimal vm host (shown above), with baked in bytecode
|
||||
* [host-parallel](host-parallel) parallel vm host running multiple vm instances concurrently, with baked in bytecode
|
||||
* [host-arduino](host-arduino) vm host as Arduino sketch (tested on Arduino Uno ATmega328P, uses 9950 bytes of flash/1254 bytes RAM)
|
||||
* [apps/helloworld](apps/helloworld) C hello world program
|
||||
* [apps/sketch](apps/sketch) C Arduino/Wiring/Processing type program in `setup()` and `loop()` style
|
||||
* [apps/rust-hello](apps/rust-hello) Rust hello world program
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ disasm: all
|
|||
$(PREFIX)objdump -S -d -f ${PROJECT}.elf
|
||||
|
||||
test: all
|
||||
../../emulator/emulator ${PWD}/${PROJECT}.bin
|
||||
../../host/host ${PWD}/${PROJECT}.bin
|
||||
|
||||
clean:
|
||||
rm -f ${PROJECT}.o ${PROJECT}.elf ${PROJECT}.bin
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ all:
|
|||
cargo build -r --target riscv32im-unknown-none-elf && docker run -v `pwd`:/data -w /data --rm riscv-dev riscv64-unknown-elf-objcopy target/riscv32im-unknown-none-elf/release/rust-hello -O binary rust-hello.bin
|
||||
|
||||
test: all
|
||||
../../emulator/emulator rust-hello.bin
|
||||
../../host/host rust-hello.bin
|
||||
|
||||
clean:
|
||||
rm -rf rust-hello.bin target
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ disasm: all
|
|||
$(PREFIX)objdump -S -d -f ${PROJECT}.elf
|
||||
|
||||
test: all
|
||||
../../emulator/emulator ${PWD}/${PROJECT}.bin
|
||||
../../host/host ${PWD}/${PROJECT}.bin
|
||||
|
||||
clean:
|
||||
rm -f ${PROJECT}.o ${PROJECT}.elf ${PROJECT}.bin
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ clean:
|
|||
rm -rf mandel.bin zig-out .zig-cache
|
||||
|
||||
test: all
|
||||
../../emulator/emulator mandel.bin
|
||||
../../host/host mandel.bin
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
all:
|
||||
gcc -Wall -DUVM32_MEMORY_SIZE=512 -I../uvm32 -o emulator-mini ../uvm32/uvm32.c emulator-mini.c
|
||||
|
||||
clean:
|
||||
rm -f emulator-mini
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
all:
|
||||
gcc -Wall -DUVM32_MEMORY_SIZE=512 -I../uvm32 -o emulator-parallel ../uvm32/uvm32.c emulator-parallel.c
|
||||
|
||||
clean:
|
||||
rm -f emulator-parallel
|
||||
5
host-mini/Makefile
Normal file
5
host-mini/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
all:
|
||||
gcc -Wall -DUVM32_MEMORY_SIZE=512 -I../uvm32 -o host-mini ../uvm32/uvm32.c host-mini.c
|
||||
|
||||
clean:
|
||||
rm -f host-mini
|
||||
5
host-parallel/Makefile
Normal file
5
host-parallel/Makefile
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
all:
|
||||
gcc -Wall -DUVM32_MEMORY_SIZE=512 -I../uvm32 -o host-parallel ../uvm32/uvm32.c host-parallel.c
|
||||
|
||||
clean:
|
||||
rm -f host-parallel
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
all:
|
||||
gcc -Wall -Werror -pedantic -std=c99 -DUVM32_MEMORY_SIZE=16384 -I../uvm32 -o emulator ../uvm32/uvm32.c emulator.c
|
||||
gcc -Wall -Werror -pedantic -std=c99 -DUVM32_MEMORY_SIZE=16384 -I../uvm32 -o host ../uvm32/uvm32.c host.c
|
||||
|
||||
clean:
|
||||
rm -f emulator
|
||||
rm -f host
|
||||
Loading…
Add table
Add a link
Reference in a new issue