// SPDX-License-Identifier: MIT //! A Rust Hitachi SH7604 (SH-2) core: the CPU and its on-chip modules, transcribed module //! for module from sh2-python (the specification) and proven equivalent to it bus cycle //! for bus cycle (docs/status.md). //! //! Modules mirror the reference's files: `bus` (bus.py), `module` (_module.py), `state`, //! `cpu`, `core` (_core.py), `pipeline`, `decode` (_decode.py, generated), `dispatch` //! (the reference's dispatch table, generated), the instruction families `arith`, //! `logic`, `shift`, `branch`, `multiply`, `system`, `transfer`, the on-chip modules //! `cache`, `bsc`, `intc`, `ubc`, `dmac`, `divu`, `frt`, `wdt`, `sci`, `power`, and the //! tooling `disasm` and `harness`. The reference's `debug.py`, `trace.py`, `console.py` //! and `__main__.py` are tools, not behaviour, and are not transcribed (README). // A transcription keeps the reference's shape where clippy would rewrite it (its // clamps as if/else, a variable set in branches, a loop over an index): charter, x-rust. #![allow(clippy::manual_clamp, clippy::needless_late_init, clippy::needless_range_loop)] pub mod arith; pub mod bench; pub mod branch; pub mod bsc; pub mod bus; pub mod cache; pub mod core; pub mod cpu; pub mod decode; pub mod disasm; pub mod dispatch; pub mod divu; pub mod dmac; pub mod frt; pub mod harness; pub mod intc; pub mod logic; pub mod module; pub mod multiply; pub mod pipeline; pub mod power; pub mod sci; pub mod shift; pub mod state; pub mod system; pub mod transfer; pub mod ubc; pub mod wdt; #[cfg(target_arch = "wasm32")] pub mod wasm; pub use bus::{Bus, BusContext, Pins, DATA, DMA, DMA1, FETCH, FILL, FIRST, HIT, REFRESH, THROUGH, VECTOR, WRITE}; pub use cpu::{Mode, Options, Sh7604}; pub use state::ChipState;