Properties

Properties are a flexible way to add data to ports, instances, and nets. We can create and query properties inside components and modules.

Syntax

  import jitx
  import ocdb/utils/property-structs

pcb-component mycomponent :
  pin a
  pin b

  property(a.leakage-current) = 50.0e-6
  has-property?(a.leakage-current) ; returns true
  property(a.leakage-current) ; returns 50.0e-6

  property(b.power-pin) = PowerPin(min-typ-max(4.5, 5.5, 5.0))

  property(self.rated-temperature) = min-max(-55.0 125.0)

pcb-module my-module :
  port i2c : i2c
  inst comp : my-component

  net SDA (i2c.sda comp.a)
  net VDD (i2c.sda comp.b)

  property(comp.rated-temperature) ; returns min-max(-55.0 125.0)
  property(comp.a.leakage-current) ; returns 50.0e-6

  property(comp.no-clean) = false
  has-property?(comp.no-clean) ; returns true
  property(comp.no-clean) ; returns false

  property(VDD.voltage) = min-max(3.0, 3.5)

Description

Component property statements

property(a.leakage-current) = 50.0e-6 Create a property on pin a with name leakage-current and value 50.0e-6.

has-property?(a.leakage-current) Check if pin a has a property named leakage-current.

property(a.leakage-current) Get the value of the property on pin a named leakage-current.

property(b.power-pin) = PowerPin(min-typ-max(4.5, 5.5, 5.0)) Create a property on pin b with name power-pin and value of a pcb-struct from ocdb/utils/property-structs.

property(self.rated-temperature) = min-max(-55.0 125.0) Create a property on the component with name rated-temperature and value of a pcb-struct from ocdb/utils/property-structs.

Module property statements

property(comp.rated-temperature) Get the value of the property named rated-temperature on the instance of comp : my-component.

property(comp.a.leakage-current) Get the value of the property named leakage-current on pin a of the instance of comp : my-component.

property(comp.no-clean) = false Create a property named no-clean on the instance of comp : my-component, and give it the value false.

has-property?(comp.no-clean) Check if a property named no-clean on the instance of comp : my-component exists.

property(comp.no-clean) Get the value of a property named no-clean on the instance of comp : my-component.

property(VDD.voltage) = min-max(3.0, 3.5) Create a property named voltage on the net VDD, and give it the value min-max(3.0, 3.5).