ppTests unconnected_drive

This commit is contained in:
damc 2022-07-26 11:25:59 +02:00
parent 5c96bcb7e6
commit 3641284d68
2 changed files with 30 additions and 0 deletions

View File

@ -1550,4 +1550,21 @@ mod tests {
testfile_contents("timescale.sv") testfile_contents("timescale.sv")
); );
} // }}} } // }}}
#[test]
fn unconnected_drive() { // {{{
let include_paths = [testfile_path("")];
let (ret, _) = preprocess(
testfile_path("unconnected_drive.sv"),
&HashMap::new(),
&include_paths,
false,
false,
)
.unwrap();
assert_eq!(
ret.text(),
testfile_contents("unconnected_drive.sv")
);
} // }}}
} }

View File

@ -0,0 +1,13 @@
// IEEE1800-2017 Clause 22.9
// The directive `unconnected_drive takes one of two arguments - pull1 or
// pull 0. When pull1 is specified, unconnected ports are pulled down. It is
// advisable to pair each `unconnected_drive with a
// `nounconnected_drive, but it is not required. The latest occurrence of
// either directive in the source controls what happens to unconnected ports.
// These directives shall be specified outside the design element declarations.
// The `resetall directive includes the effects of a `nounconnected
// directive.
`unconnected_drive pull0
`unconnected_drive pull1
`nounconnected_drive
// This file should be emitted from the preprocessor unchanged.