Trending

World technology news

→
A desktop oscilloscope illustrating hardware testing for embedded systems.
crates.ioIn-depth report

Litz 0.10.1 packages Rust firmware simulation software with file-based circuit diagrams

The new Rust package assembles simulator interfaces for circuit connections, board definitions and device components stored in project files.

·crates.io
Reading progress0%

One package version confirmed by separate records

Litz 0.10.1 was published on crates.io on November 29 at 02:48:15 UTC, or 05:48:15 in Istanbul. The Rust package gathers simulator interfaces for a core, chip families, circuits and a component catalogue. Docs.rs separately records a successful documentation build for the version. That build confirms that its documented interfaces were generated. The scope of any simulator result still depends on the selected model and peripherals. The package documentation describes a shared core for native and WebAssembly use.

The circuit is a project file

Litz represents boards with a diagram.json file. Its Diagram interface parses the connections, resolves wires into nets and validates them against a catalogue. Part and board descriptions use separate TOML files. That layout gives a project a way to review a changed pin or circuit connection apart from the firmware. Preserve both the board definition and catalogue version with the test. Two people can then distinguish a firmware update from a different interpretation of the circuit.

Shared concepts and chip-specific behavior

The public API exposes concepts for time, pins and buses through its core. A separate microcontroller layer describes building blocks such as memory maps, clock domains and interrupt routing. The ESP interface provides an entry point for an ESP32-family model. A test report can identify which circuit and chip model it used, rather than identifying only the firmware. The same program can observe different results when the configured resources differ. Treat the simulator’s event sequence and electrical measurements on real hardware as separate kinds of evidence.

Test how each execution environment loads the project

Documentation describes native command-line use for automation and a WebAssembly interface for browser or WASI environments. Run a small example against the same circuit file and expected result in both target environments if both matter. Record how the input files are loaded and how an error is reported. A missing catalogue part is a useful separate fixture because it establishes whether a failure can be traced to the supplied board description. File handling can behave differently even when the simulation engine is shared.

Choose measurements that still need hardware

A simulator can help repeat inputs and examine the program’s observed sequence. Electrical margins, unstable connections and timing-sensitive behavior may require physical measurements. A bus transaction can follow the expected sequence in a simulation while showing different edge or delay behavior on a bench. State which hardware effects your test covers and which observations come from a physical device. Pin the firmware, circuit description and simulator version in the test record. If the result changes later, those three pieces can be compared independently.

Photo · Radarvector / Wikimedia Commons ↗ · CC BY-SA 4.0

Sources and verification
Be the first reader ✎ Write a comment

Reader discussion

Discussion prompt

Which alternative architecture would you try for the same problem?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.