Files
2025-12-04 13:12:24 +00:00

11 KiB

Markup Result
 
^{superscript}
 
superscript 
 
Driver Board^{Rev A}
 
Driver BoardRev A

 
_{subscript}
 
subscript 
 
D_{0} - D_{15}
 
D0 - D15
 
~{overbar}
 
~{CLK}
       
overbar
   
CLK
 
${variable}
 
variable_value
 
${REVISION}
 
2020.1

 
${refdes:field}
 
field_value of symbol refdes
 
${R3:VALUE}
 
150K

 
${ROW} (in tables)
 
0, 1, 2... (0-based)
 
${COL} (in tables)
 
0, 1, 2... (0-based)
 
${ADDR} (in tables)
 
A0, B1, C2... (0-based)

 
@{expression}
 
evaluated_result
 
@{2 + 3}
 
5
 
@{${ROW} + 1}
 
4 (when ROW=3)

String Comparison & Conditional Text
 
@{"text" == "text"}
 
1
 
@{"text" != "other"}
 
1
 
@{if(condition, true_val, false_val)}
 
Conditional text display
 
@{if("${LAYER}" == "F.Cu", "TOP", "BOTTOM")}
 
TOP (on front layer) or BOTTOM
 
@{if(${ROW} > 5, "High", "Low")}
 
Numeric comparisons work too

Symbol Pin Functions
 
${refdes:REFERENCE(pin)}
 
Full reference with unit for pin
 
${J1:REFERENCE(3)}
 
J1B (for multi-unit symbol)
 
${refdes:SHORT_REFERENCE(pin)}
 
Reference without unit letter for pin
 
${J1:SHORT_REFERENCE(3)}
 
J1
 
${refdes:UNIT(pin)}
 
Unit letter only for pin
 
${J1:UNIT(3)}
 
B (unit letter for pin 3)
 
${refdes:NET_NAME(pin)}
 
Net name connected to pin
 
${R1:NET_NAME(1)}
 
VCC
 
${refdes:PIN_NAME(pin)}
 
Pin name or selected alternate
 
${U1:PIN_NAME(5)}
 
USART1_TX (alternate) or PA9 (base)
 
${refdes:PIN_BASE_NAME(pin)}
 
Base pin name (ignoring alternates)
 
${U1:PIN_BASE_NAME(5)}
 
PA9
 
${refdes:PIN_ALT_LIST(pin)}
 
All alternate pin functions (excludes base name)
 
${U1:PIN_ALT_LIST(5)}
 
USART1_TX, TIM1_CH2, I2C1_SCL
 
${refdes:SHORT_NET_NAME(pin)}
 
Short net name or NC if unconnected
 
${J1:SHORT_NET_NAME(3)}
 
GND or NC
 
${refdes:NET_CLASS(pin)}
 
Net class for pin
 
${J1:NET_CLASS(1)}
 
Power

Escape Sequences
 
\${LITERAL}
 
${LITERAL} (not expanded)
 
Price: \$25.00
 
Price: $25.00
 
\@{x+y}
 
@{x+y} (not evaluated)

Nested Variables
 
${J1:REFERENCE(@{${ROW}+2})}
 
J1B (when ROW=0, pin 2 in unit B)
 
${J1:NET_NAME(${COL})}
 
Dynamic net lookup in tables

Table Cell References
 
${CELL("A0")}
 
Evaluated value from cell A0
 
${CELL(0, 1)}
 
Value from row 0, column 1
 
${CELL(${ADDR})}
 
Dynamic cell reference
 
${CELL(${ROW}-1, ${COL})}
 
Value from cell above (if ROW > 0)


Bus Definition               Resultant Nets
 
prefix[m..n]
 
prefixm to prefixn
 
D[0..7]
 
D0, D1, D2, D3, D4, D5, D6, D7

 
{net1 net2 ...}
 
net1, net2, ...
 
{SCL SDA}
 
SCL, SDA

 
prefix{net1 net2 ...}
 
prefix.net1, prefix.net2, ...
 
USB1{D+ D-}
 
USB1.D+, USB1.D-

 
MEM{D[1..2] LATCH}
 
MEM.D1, MEM.D2, MEM.LATCH
 
MEM{D_{[1..2]} ~{LATCH}}
                         
MEM.D1, MEM.D2, MEM.LATCH

Note that markup has precedence over bus definitions.

Pin Functions: Automatically find the correct unit placement. For multi-unit symbols, functions like NET_NAME(pin) work even if the pin is in a different unit than the one on the current sheet.

Table Cell References: The CELL() function works only in table cells. Use ${CELL("A0")} or ${CELL(row, col)} to reference other cells in the same table. Row and column numbers are 0-based (A0 is the first row, first column). CELL returns the evaluated/displayed value, not the raw cell text.

Nested Variables: Variables can contain other variables. Inner variables are expanded first. Maximum nesting depth: 6 levels.

Error Messages:

  • <UNRESOLVED: token> - Variable or function cannot be resolved
  • <Unit X not placed> - Pin is in a unit not placed on any sheet
  • <Unresolved: Cell X not found> - Cell address is out of table bounds