Merge pull request #15 from oscargus/vhdl
Add support for VHDL std_ulogic
This commit is contained in:
commit
22eaf8da15
|
@ -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..];
|
||||
|
|
|
@ -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<u8, BinaryParserErrTypes> {
|
|||
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)),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue