This is a simulator. Not an emulator (yet).
TBD. To see short term wanted changes, see TODO.md.
sim --cfg <config json> [--max-iterations <integer>] [--max-time <string>]
example:
sim --cfg cfg.json --max-iterations 1000_000
odin run .
or alternatively, keep the build executable and run it later:
on linux:
odin build . -out:build
./build
on windows:
odin build . -out:build.exe
build
simulator.odin: contains main program for the simulatorcmdline.odin: contains command line parsing for core simulatorsim_platform: contains any platform specific code needed for main program (simulator.odinwill use this when it is made)sim_peripherals: contains all simulation for peripheralsmcu/stm32h723xx/core_cm7.odin: contains definitions for cm7 core registersmcu/stm32h723xx/stm32h723xx.odin: contains definitions for stm32h723xx peripheral registersusim: contains the api for micro simulators
Extra info:
Changes.md: lists changes that had to be made to make the simulated board code compile/runexample-board: an example code for a boardexample-usim: example micro simulator codecodegen/ioctl_defs_linux.c: small code to autogeneratesim_platform_linux_ioctls.odin
We are choosing Odin because:
- It is a systems programming language
- It is simple, as opposed to C++ and Rust. The overview describes the whole language
- It has a good standard library, as opposed to C or C++ which don't include much
- It has hashmaps builtin to the language (which we will probably use)
- It has generics and reflection (which we will probably use)
- It has inline assembly built in to the compiler (we might use this)
- It has a large repository of easy to find example code
- It contains, in its standard library an odin parser
- It contains, in its standard library an easy to use profiler
- It contains, in its standard library a high-performance multi-architecture encoder/decoder/printer
- It contains, in its vendor library (provided by the compiler), a high performance real time physics simulation library
- It is soon to get to v1.0
Personally:
- It is a language I enjoy using
- It is a language I have used many times before, as opposed to Rust, Haskell, Java, Prolog or Javascript