ppTests unconnected_drive
This commit is contained in:
parent
5c96bcb7e6
commit
3641284d68
@ -1550,4 +1550,21 @@ mod tests {
|
||||
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")
|
||||
);
|
||||
} // }}}
|
||||
}
|
||||
|
13
sv-parser-pp/testcases/unconnected_drive.sv
Normal file
13
sv-parser-pp/testcases/unconnected_drive.sv
Normal 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.
|
Loading…
x
Reference in New Issue
Block a user