diff --git a/src/vcd/parse/events.rs b/src/vcd/parse/events.rs index 2246d15..1a75e73 100644 --- a/src/vcd/parse/events.rs +++ b/src/vcd/parse/events.rs @@ -96,7 +96,11 @@ pub(super) fn parse_events<'a, R: std::io::Read>( Err( BinaryParserErrTypes::XValue | BinaryParserErrTypes::ZValue - | BinaryParserErrTypes::UValue, + | BinaryParserErrTypes::UValue + | BinaryParserErrTypes::WValue + | BinaryParserErrTypes::HValue + | BinaryParserErrTypes::DashValue + | BinaryParserErrTypes::LValue, ) => { store_as_string = true; value_string = binary_value.to_string(); @@ -408,7 +412,7 @@ pub(super) fn parse_events<'a, R: std::io::Read>( } // // other one bit cases - "x" | "X" | "z" | "Z" | "u" | "U" => { + "x" | "X" | "z" | "Z" | "u" | "U" | "h" | "H" | "l" | "L" | "w" | "W" | "-" => { let val = word.to_string(); // lokup signal idx let hash = &word[1..]; diff --git a/src/vcd/utilities.rs b/src/vcd/utilities.rs index 3fb5122..0f3e246 100644 --- a/src/vcd/utilities.rs +++ b/src/vcd/utilities.rs @@ -7,6 +7,10 @@ pub(super) enum BinaryParserErrTypes { XValue, ZValue, UValue, + HValue, + LValue, + DashValue, + WValue, OtherValue(char), TooLong, } @@ -39,6 +43,10 @@ fn base2_str_to_byte(word: &[u8]) -> Result { b'x' | b'X' => return Err(BinaryParserErrTypes::XValue), b'z' | b'Z' => return Err(BinaryParserErrTypes::ZValue), b'u' | b'U' => return Err(BinaryParserErrTypes::UValue), + b'l' | b'L' => return Err(BinaryParserErrTypes::LValue), + b'h' | b'H' => return Err(BinaryParserErrTypes::HValue), + b'w' | b'W' => return Err(BinaryParserErrTypes::WValue), + b'-' => return Err(BinaryParserErrTypes::DashValue), _ => return Err(BinaryParserErrTypes::OtherValue(*chr as char)), } }