The SystemRDL compiler provides several optional warnings. These lint-like checks report constructs that are not inherently wrong, but may be considered risky.
All warning messages are disabled by default.
Individual warning messages can be enabled by passing one or more of the
following flags into the
warning_flags option of the
RDLCompiler constructor. Multiple flags can be combined
using bitwise OR (the
Enable all warnings.
Check if a field that implements storage, or is a runtime constant, is missing it’s reset value.
Check if a field’s bit offset is not explicitly specified.
Some organizations may want to enforce explicit assignment of bit offsets to avoid unexpected field packing.
Check if a component’s address offset is not explicitly assigned.
Some organizations may want to enforce explicit assignment of addresses to avoid unintended address map changes.
Check if an instance array’s address stride is not a power of two.
Enforce that all addressable components are aligned based on their size. Alignment is determined by the component’s size rounded up to the next power of two.
Strict self-alignment may be desireable since it can simplify address decode logic for hierarchical designs.
This rule is a superset of
- class systemrdl.RDLCompileError¶
Base class for all SystemRDL compiler exceptions
- class systemrdl.messages.MessagePrinter¶
Printer class that handles formatting and emitting compiler messages
This class can be extended in order to provide custom compiler message formatting or logging
- emit_message(lines: List[str]) None ¶
Emit message. Default printer emits messages to stderr
lines (list) – List of strings containing each line of the message
- format_message(severity: Severity, text: str, src_ref: Optional[SourceRefBase]) List[str] ¶
Formats the message prior to emitting it.
Severity) – Message severity.
text (str) – Body of message
SourceRefBase) – Reference to source context object
List of strings for each line of the message
- Return type:
- class systemrdl.messages.MessageHandler¶
- error(text: str, src_ref: Optional[SourceRefBase] = None) None ¶
Print an error message. Sets
text (str) – Message text
src_ref (SourceRefBase) – Optional source reference object to provide message context
- fatal(text: str, src_ref: Optional[SourceRefBase] = None) NoReturn ¶
Print a fatal message.
Set to True if an error message was ever emitted