SvPortSim.Verilator.Wrapper.Validator (SvPortSim v0.1.0)

Copy Markdown View Source

Validates public inputs for generated Verilator wrapper source construction.

This module owns the safe SystemVerilog top-module identifier subset used by SvPortSim.Verilator.Wrapper. The accepted subset is intentionally narrow: an ASCII letter or underscore followed by ASCII letters, digits, underscores, or dollar signs.

Summary

Functions

Validates a top-module name for wrapper generation.

Returns whether top_module is accepted by the wrapper generator.

Functions

top_module(top_module)

@spec top_module(term()) :: :ok | {:error, {:invalid_top_module, term()}}

Validates a top-module name for wrapper generation.

top_module?(top_module)

@spec top_module?(term()) :: boolean()

Returns whether top_module is accepted by the wrapper generator.