Crate emulator_hal

source ·
Expand description

crates.io Documentation Minimum Supported Rust Version

§emulator-hal

A set of traits for interfacing between emulated hardware devices

§Design Goals

  • Must be useable using fully static code, to allow maximum performance for simple static emulators, and test components

  • Must be able to create a trait object from these traits, to allow maximum modularity for complex emulators

  • Must be minimal, to abstract the most common parts needed to build an emulator, without trying to support all possible extended features

  • Make it possible to abstract CPU, memory, and peripheral emulation implementations that can be reused between different emulator ecosystems

  • Support use in no_std where it makes sense, to allow component reuse on embedded platforms that emulate other hardware

§Out of Scope

  • a complete framework for constructing an emulator. Instead these are the glue between library components that make up an emulator

§License

Licensed under either of

at your option.

§Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Structs§

  • An adapter that uses the FromAddress trait to translate an address before accessing a wrapped bus object
  • An adapter that applies an address translation before accessing a wrapped bus object
  • A dummy object that implements BusAccess, but does nothing

Enums§

  • A simple pre-defined error type for bus transactions
  • Represents the order of bytes in a BusAccess operation

Traits§

  • A device that can be addressed to read data from or write data to the device.
  • Control the execution of a CPU device for debugging purposes
  • Represents an error that occurred during a bus transaction
  • Used to translate an address from one address space into another
  • Inspect the state of a device, and emit it to an object that implements fmt::Write
  • Represents a monotonic instant in time
  • Used to translate an address from one address space into another
  • Represents a device that can change state with the passage of a clock signal