Crates.io | llhd-sim |
lib.rs | llhd-sim |
version | 0.4.0 |
source | src |
created_at | 2019-01-05 14:43:44.056541 |
updated_at | 2020-08-26 09:34:46.681168 |
description | Deprecated reference simulator for Low Level Hardware Description assembly. Now part of the LLHD crate. |
homepage | |
repository | https://github.com/fabianschuiki/llhd-sim |
max_upload_size | |
id | 105655 |
size | 172,107 |
Moved: llhd-sim is now part of the llhd repository and crate. This repository will no longer be updated.
This is the reference simulator for llhd, striving to be complete but as minimal as possible. Its goal is to serve as a starting point for developing more sophisticated simulators for hardware written in llhd. As a secondary goal it acts as an application example of llhd.
You need a working Rust installation. Use cargo to install llhd-sim:
cargo install llhd-sim
Given the following input file:
// foo.llhd
proc @foo () (i32$ %out) {
%entry:
drv %out 0 1ns
drv %out 42 2ns
%0 = add i32 9000 1
drv %out %0 3ns
halt
}
Use llhd-sim to simulate the described hardware and produce a VCD file:
llhd-sim foo.llhd
gtkwave /tmp/output.vcd