Skip to content

MPN

The mpn statement defines the "Manufacturer Part Number" of a component. It is used to create the bill of materials and to check the sourceability of a `pcb-component``.

This statement is valid in the pcb-component context.

Signature

mpn = <String>

This statement is optional. The default value will be false in case no mpn statement is found in a component definition.

Any string is a valid mpn.

Each pcb-component may have exactly one mpn statement. If more than one statement is encountered in a definition, then a DuplicateCStmtError exception will be raised.

Examples

pcb-component usb-iface:
  mpn = "TPD3S014DBVR"

pcb-component dip-switch (n-sw:Int = 8)
  mpn = to-string("219-%_MSTR" % [n-sw])

In the usb-iface example, mpn = "TPD3S014DBVR" The part number of this component is TPD3S014DBVR

Parametrically constructed components are common pattern. In the dip-switch example, we have an argument n-sw to the component definition. We use this argument value to construct the mpn using string formatting. For the default argument of 8, this results in mpn = "219-8MSTR".