Crates.io | readmem |
lib.rs | readmem |
version | 0.1.0 |
source | src |
created_at | 2020-11-07 09:41:33.011985 |
updated_at | 2020-11-07 09:41:33.011985 |
description | Read support for Verilog $readmemb/$readmemh files |
homepage | |
repository | https://github.com/lf-/readmem |
max_upload_size | |
id | 309584 |
size | 11,090 |
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());