Welcome to Python Svdata’s documentation!
- class python_svdata.SvData
This is the main data structure that is returned by the parser.
- Parameters:
modules (list[SvModuleDeclaration]) – A list of all the modules in the file.
packages (list[SvPackageDeclaration]) – A list of all the packages in the file.
- class python_svdata.SvDataKind
Data kinds.
- Parameters:
Net (str) – A net.
Variable (str) – A variable.
IMPLICIT (str) – An implicit data kind.
- class python_svdata.SvDataType
Data types.
- Parameters:
Logic (str) – A logic type.
Reg (str) – A reg type.
Bit (str) – A bit type.
Byte (str) – A byte type.
Integer (str) – An integer type.
Int (str) – An int type.
Shortint (str) – A shortint type.
Longint (str) – A longint type.
Time (str) – A time type.
Real (str) – A real type.
Shortreal (str) – A shortreal type.
Realtime (str) – A realtime type.
Array (str) – An array type.
Enum (str) – An enum type.
Struct (str) – A struct type.
Union (str) – A union type.
Class (str) – A class type.
TypeRef (str) – A type reference.
String (str) – A string type.
Unsupported (str) – An unsupported type.
IMPLICIT (str) – An implicit type.
- class python_svdata.SvInstance
Instances.
- Parameters:
module_identifier (str) – The module identifier of the instance.
hierarchical_instance (str) – The hierarchical instance of the instance.
hierarchy (List[str]) – The hierarchy of the instance.
connections (List[List[str]]) – The connections of the instance.
- class python_svdata.SvModuleDeclaration
Store the information about a module.
- Parameters:
identifier (str) – The name of the module.
parameters (list[SvParameter]) – A list of all the parameters in the module.
ports (list[SvPort]) – A list of all the ports in the module.
instances (list[SvInstance]) – A list of all the instances in the module.
filepath (str) – The path to the file that contains the module.
comments (list[str]) – A list of all the comments in the module.
- class python_svdata.SvNetType
Net types.
- Parameters:
Wire (str) – A wire.
Uwire (str) – An uwire.
Tri (str) – A tri.
Wor (str) – A wor.
Wand (str) – A wand.
Triand (str) – A triand.
Trior (str) – A trior.
Trireg (str) – A trireg.
Tri0 (str) – A tri0.
Tri1 (str) – A tri1.
Supply0 (str) – A supply0.
Supply1 (str) – A supply1.
IMPLICIT (str) – An implicit net type.
- class python_svdata.SvPackageDeclaration
Store the information about a package.
- Parameters:
identifier (str) – The name of the package.
parameters (list[SvParameter]) – A list of all the parameters in the package.
filepath (str) – The path to the file that contains the package.
- class python_svdata.SvParamType
Parameter types.
- Parameters:
Parameter (str) – A parameter.
LocalParam (str) – A local parameter.
- class python_svdata.SvParameter
Store the information about a parameter.
- Parameters:
identifier (str) – The name of the parameter.
expression (str | None) – The expression of the parameter.
paramtype (SvParamType) – The type of the parameter.
datatype (SvDataType | None) – The data type of the parameter.
datatype_overridable (bool) – Whether the data type of the parameter is overridable.
classid (str | None) – The class id of the parameter.
signedness (SvSignedness | None) – The signedness of the parameter.
signedness_overridable (bool) – Whether the signedness of the parameter is overridable.
num_bits (int | None) – The number of bits of the parameter.
packed_dimensions (list[SvPackedDimension]) – A list of all the packed dimensions of the parameter.
unpacked_dimensions (list[SvUnpackedDimension]) – A list of all the unpacked dimensions of the parameter.
comment (list[str] | None) – A list of all the comments of the parameter.
- class python_svdata.SvPort
Ports.
- Parameters:
identifier (str) – The identifier of the port.
direction (SvPortDirection) – The direction of the port.
datakind (SvDataKind) – The data kind of the port.
datatype (SvDataType) – The data type of the port.
classid (str) – The class identifier of the port.
nettype (SvNetType) – The net type of the port.
signedness (SvSignedness) – The signedness of the port.
packed_dimensions (List[SvPackedDimension]) – The packed dimensions of the port.
unpacked_dimensions (List[SvUnpackedDimension]) – The unpacked dimensions of the port.
comment (List[str] | None) – The comment of the port.
- class python_svdata.SvPortDirection
Port directions.
- Parameters:
Inout (str) – An inout port.
Input (str) – An input port.
Output (str) – An output port.
Ref (str) – A ref port.
IMPLICIT (str) – An implicit port.
- class python_svdata.SvSignedness
Signedness.
- Parameters:
Signed (str) – A signed value.
Unsigned (str) – An unsigned value.
Unsupported (str) – An unsupported value.
IMPLICIT (str) – An implicit value.
- python_svdata.read_sv_file(file_path)
Reads a systemverilog file and returns an SvData object.