Skip to content

About

temporal name

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Hyperloop UPV firmware, (eventually) communications and (eventually) physical emulator

This is a simulator. Not an emulator (yet).

Roadmap

TBD. To see short term wanted changes, see TODO.md.

Usage

sim --cfg <config json> [--max-iterations <integer>] [--max-time <string>]

example:

sim --cfg cfg.json --max-iterations 1000_000

Building

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

Source structure

  • simulator.odin: contains main program for the simulator
  • cmdline.odin: contains command line parsing for core simulator
  • sim_platform: contains any platform specific code needed for main program (simulator.odin will use this when it is made)
  • sim_peripherals: contains all simulation for peripherals
  • mcu/stm32h723xx/core_cm7.odin: contains definitions for cm7 core registers
  • mcu/stm32h723xx/stm32h723xx.odin: contains definitions for stm32h723xx peripheral registers
  • usim: contains the api for micro simulators

Extra info:

  • Changes.md: lists changes that had to be made to make the simulated board code compile/run
  • example-board: an example code for a board
  • example-usim: example micro simulator code
  • codegen/ioctl_defs_linux.c: small code to autogenerate sim_platform_linux_ioctls.odin

Reasoning for the language we are going to use

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

About

temporal name

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages