diff --git a/Cargo.lock b/Cargo.lock index d6cd34b..4542a3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1416,6 +1416,7 @@ dependencies = [ name = "sv-parser" version = "0.13.3" dependencies = [ + "log", "nom", "nom-greedyerror", "sv-parser-error", diff --git a/src/core/hdlparam.rs b/src/core/hdlparam.rs index ea2e64f..ce696e8 100644 --- a/src/core/hdlparam.rs +++ b/src/core/hdlparam.rs @@ -295,6 +295,7 @@ impl Instance { #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Module { pub name: String, + #[serde(rename = "archName")] pub arch_name: String, pub params: Vec, pub ports: Vec, diff --git a/src/core/primitive_parser.rs b/src/core/primitive_parser.rs index 9d62f7e..968602c 100644 --- a/src/core/primitive_parser.rs +++ b/src/core/primitive_parser.rs @@ -271,6 +271,7 @@ mod tests { const TESTDIR: &str = "primitive_files"; #[test] + fn gen_primitive_bin() { if let Ok(primitive_info) = init_parse_primitive_files("primitive_files") { let serialized_data = bincode::serialize(&primitive_info).unwrap(); @@ -282,6 +283,13 @@ mod tests { } } + #[test] + fn read_primitive_bin() { + let target_path = "target/primitive.bin"; + let load = crate::core::primitive_parser::load_primitive_bin(&target_path); + assert!(load.is_some()); + } + #[test] fn test_xml() { let res = xml_parser(TESTFILE);