#verilog #read #content-type #readmemb-readmemh

readmem

Read support for Verilog $readmemb/$readmemh files

1 unstable release

0.1.0 Nov 7, 2020

#1496 in Hardware support

MIT license

8KB
154 lines

readmem

A rust library to read data of the format required by the Verilog system tasks $readmemb and $readmemh.

Example:

let file_content = r#"
    @0 0
    @1 1 // one!
    2
"#;
use readmem::{readmem, ContentType};
assert_eq!(vec![0, 1, 2], readmem::<u8>(file_content, ContentType::Hex).unwrap());

lib.rs:

A library for reading in Verilog $readmemb/$readmemh files formatted per IEEE Std. 1364-2005, §17.2.9

Dependencies

~2–2.8MB
~57K SLoC