ppTests celldefine

This commit is contained in:
damc 2022-07-26 11:24:39 +02:00
parent dc36b4b11f
commit 466301c9c9
2 changed files with 30 additions and 0 deletions

View File

@ -1117,6 +1117,23 @@ mod tests {
);
} // }}}
#[test]
fn celldefine() { // {{{
let include_paths = [testfile_path("")];
let (ret, _) = preprocess(
testfile_path("celldefine.sv"),
&HashMap::new(),
&include_paths,
false,
false,
)
.unwrap();
assert_eq!(
ret.text(),
testfile_contents("celldefine.sv")
);
} // }}}
#[test]
fn ifdef_nested() { // {{{
let (ret, _) = preprocess(

View File

@ -0,0 +1,13 @@
// IEEE1800-2017 Clause 22.10
// The directives `celldefine and `endcelldefine tag modules as cell modules.
// Cells are used by certain PLI routines and may be useful for applications
// such as delay calculations. It is advisable to pair each `celldefine with an
// `endcelldefine, but it is not required. The latest occurrence of either
// directive in the source controls whether modules are tagged as cell modules.
// More than one of these pairs may appear in a single source description.
// These directives may appear anywhere in the source description, but it is
// recommended that the directives be specified outside any design elements.
// The `resetall directive includes the effects of a `endcelldefine directive.
`celldefine
`endcelldefine
// This file should be emitted from the preprocessor unchanged.