主要内容

Supported SystemVerilog Constructs for HDL Import

R2026b

Use the importhdl function to import synthesizable SystemVerilog code into the Simulink® modeling environment. Make sure that the constructs used in the HDL code are supported by the importhdl function.

The following tables list the supported SystemVerilog constructs that you can use when you import your HDL code. If you use an unsupported construct, the importhdl function generates an error when parsing the input HDL file. SystemVerilog HDL import can sometimes ignore the presence of certain constructs in the HDL code. To learn more, see the Comments column in the table.

Supported Verilog Constructs

When you import SystemVerilog files, the importhdl function also supports all supported Verilog® constructs. You can use these constructs inside SystemVerilog files without modification. For more information about supported Verilog constructs for HDL import, see Supported Verilog Constructs for HDL Import.

The following tables describe additional SystemVerilog language features that HDL import supports beyond those documented in Supported Verilog Constructs for HDL Import.

Procedural Blocks and Subprograms

SystemVerilog ConstructsSupported?Comments
always_combYes–
always_ffYes–
always_latchNo–
Function declarationYesSupports SystemVerilog function syntax with typed arguments, explicit return types, and SystemVerilog data types such as logic, bit, byte, shortint, int, and longint.

Data Types and Type Definitions

SystemVerilog ConstructsSupported?Comments
logicYesSupports only 0 and 1 values. Unknown (X) and high-impedance (Z) values are not supported.
bitYes–
byteYes–
shortintYes–
intYes–
longintYes–
realNo–
shortrealNo–
Packed arraysYesSupports one-dimensional packed arrays only. Multidimensional packed arrays are not supported.
Unpacked arraysNo–
enumNo–
typedefNo–
structNo–
unionNo–

Case Statement Qualifiers

SystemVerilog ConstructsSupported?Comments
uniqueYesIgnored
unique0YesIgnored
priorityYesIgnored

Package Declarations

SystemVerilog ConstructsSupported?Comments
Package declaration No–
Package import declaration No–

Parameters and Constants

SystemVerilog ConstructsSupported?Comments
Typed parameter declaration YesSupports parameters declared with basic SystemVerilog data types such as bit, logic, byte, shortint, int, and longint.
Typed localparam declaration YesSupports localparams declared with basic SystemVerilog data types such as bit, logic, byte, shortint, int, and longint.
const declaration No 

Others Constructs

SystemVerilog ConstructsSupported?Comments
constNo–
unsignedYes–
.name (implicit port connection) No–
.* (wildcard port connection) No–
Case equality operators (===, !==) No–

Limitations

The following types of constructs are not supported and result in errors:

  • Classes and object-oriented programming (OOP) features

  • Assertions and coverage constructs

  • Dynamic arrays, associative arrays, and queues

  • Randomization and constraint-related constructs

  • Direct Programming Interface (DPI) constructs

  • Testbench-only constructs

See Also

Functions

Topics