isPrimitiveType static method

bool isPrimitiveType(
  1. String cellType
)

Whether cellType represents a netlist built-in primitive cell type.

Returns true for $-prefixed types ($mux, $dff, $and, etc.) which are netlist built-in operators and primitives.

Tool-specific primitive types (e.g. ROHD's FlipFlop) should be handled by the producer: the synthesizer should map them to $-prefixed cell types in the JSON output, or the adapter should set isPrimitive on the occurrence at construction time.

Use this before a HierarchyOccurrence exists (e.g. when deciding whether to recurse into a netlist cell definition). For an existing occurrence, use the getter isPrimitiveCell instead.

Implementation

static bool isPrimitiveType(String cellType) => cellType.startsWith(r'$');