# sch-rnd - the devmap file format

A devmap file is a lihata document. The root node is ha:std_devmap.v1, which has a ha:comp_attribs subtree. This subtree contains all attributes that are set on the component that refers to the devmap.

Scalar attributes are plain text nodes in key=value form. Array attributes are lists of text items.

For example this is the devmap file for 2n7002 in sot23:

    ha:std_devmap.v1 {
     ha:comp_attribs {
      footprint=sot23
      li:portmap={
       {G->pcb/pinnum=1}
       {S->pcb/pinnum=2}
       {D->pcb/pinnum=3}
      }
     }
    }

It sets the footprint to sot23 then specifies a portmap array. Since portmap items contain slash, they each need to be quoted using {}.

Note: devmap does not know about the portmap syntax. For devmap li:portmap is just an arbitrary array-type attribute with 3 string/text items in it. Portmap has its own documentation, and can be used independently of devmap.