mirror of https://github.com/llvm/circt.git
[ImportVerilog] Add support for elaboration system tasks (#7632)
Simply skip the elaboration system tasks `$info`, `$warning`, `$error`, and `$fatal` outside procedural code. Slang already processes these tasks and generates the corresponding diagnostics for us.
This commit is contained in:
parent
b7e2e2005d
commit
ee8e605ac6
|
@ -69,6 +69,11 @@ struct BaseVisitor {
|
|||
return success();
|
||||
}
|
||||
|
||||
// Skip elaboration system tasks. These are reported directly by Slang.
|
||||
LogicalResult visit(const slang::ast::ElabSystemTaskSymbol &) {
|
||||
return success();
|
||||
}
|
||||
|
||||
// Handle parameters.
|
||||
LogicalResult visit(const slang::ast::ParameterSymbol ¶m) {
|
||||
visitParameter(param);
|
||||
|
|
|
@ -72,3 +72,23 @@ module Foo;
|
|||
// expected-error @below {{unpacked arrays in 'inside' expressions not supported}}
|
||||
int c = a inside { b };
|
||||
endmodule
|
||||
|
||||
// -----
|
||||
module Foo;
|
||||
// expected-remark @below {{hello}}
|
||||
$info("hello");
|
||||
// expected-warning @below {{hello}}
|
||||
$warning("hello");
|
||||
endmodule
|
||||
|
||||
// -----
|
||||
module Foo;
|
||||
// expected-error @below {{hello}}
|
||||
$error("hello");
|
||||
endmodule
|
||||
|
||||
// -----
|
||||
module Foo;
|
||||
// expected-error @below {{hello}}
|
||||
$fatal(0, "hello");
|
||||
endmodule
|
||||
|
|
Loading…
Reference in New Issue