system_rust 0.1.2

This is a hardware simulation framework inspired by SystemC for Rust. It features multithreading with a sender-receiver architecture, 4-state logic types, and logging functionality.
Documentation

SystemRust

Description

SystemRust is a Rust-crate für hardware simulation akin to systemC for C++. I have developed this for my masters-project for my degree in computational engineering at the University of Rostock in the summer semester of 2025.

Supervisors:

  • M.Sc. Benjamin Beichler
  • M.Sc. Nico Graumüller
  • Prof.Dr.Ing. Christian Haubelt

Licence

  • MIT

Git-Repository

https://gitlab.amd.e-technik.uni-rostock.de/systemcrust/systemrust

UML-Diagram

UML Diagramm

Convert the log file to a .vcd file

If you would like to view the signal changes there is a folder with a C# script in the gitlab directory to convert it. The .vcd file can then be viewed with tools such as GTKWave.

Before you call SimulationContext::simulate(...) in your code you want to initialize a logger. I'm using env_logger

let log_file = File::create("app.log").unwrap();
env_logger::Builder::new()
    .format(|buf, record| {
        writeln!(buf, "{}", record.args())?;
        Ok(())
    })
    .filter_level(LevelFilter::Info)
    .target(env_logger::Target::Pipe(Box::new(log_file)))
    .init();

Then after your SimulationContext::simulate(...) function just call convert_log_to_vcd(...).