ibnl(1) a generic IB netlist format

3. Guidelines for writing a System IBNL File

The following procedure should be followed in order to provide a new system IBNL:
a)
Name the file after the system name: <any sys name (no spaces)>.ibnl
b)
Define a SYSTEM section for each board included in the system
c)
The port names of the boards are just strings, we use the simple format of Pn where N is just a serial number but you can pick any name you want. Just make sure it is unique.
d)
When different flavors of the boards exists like when you have a 4x and 12x option for a board name the optional boards with a modifier postfix. An example for such system that supports a LEAF board of 12x and 4x types would be to define two SYSTEMS:

SYSTEM LEAF,LEAF:4x,LEAF:4X

...

SYSTEM LEAF:12x,LEAF:12X

...

NOTE-3: The instantiations of the LEAF boards in another board or the top system need not specify the postfix and are being decided upon only when the topology file is being parsed. The ``SYSTEM LEAF'' with no postfix will be used by default. To continue the example here is how the LEAFs are instantiated in the top system:

TOPSYSTEM MyIbSystem

LEAF leaf1

...

LEAF leaf2

...

The actual 4x or 12x version of the LEAF board can then be specified in the topology file CFG section to select the right combination of optional boards in the system. An example will be:

MyIbSystem N001 CFG: leaf2=12x

In this case leaf1 will be 4x as no special modifier is defined for it (and LEAF is by default a 4x leaf). Leaf2 will be 12x as defined in the CFG section.

e)
Special considerations should be made to design the top system section when several optional board types exist. Top system section might include multiple definitions for front panel plugs like P1-4x and P1-12x (yes these are just names that should follow the writing on the front or back panels). As the different flavors of the boards are not required to define the same names for their ports including a 12x port might leave some of the top level connections dangling (not connected) and thus the front panel ports of the other flavor will be removed from the final system definition. As an example let us consider a simple board LEAF with 3 4x port flavor and one 12x port flavors. We recommend connecting it in the top level using the following scheme:

SYSTEM LEAF:4x

NODE U1

1 -4x-> 4XP1

2 -4x-> 4XP2

3 -4x-> 4XP3

...

SYSTEM LEAF:12x

NODE U1

1 -12x-> 12XP1

...

TOPSYSTEM myIbSystem

SUBSYSTEM LEAF leaf1

4XP1 -> L1/P1

4XP2 -> L1/P2

4XP3 -> L1/P3

12XP1 -> L1/P1-12x

f)
Place the file in the <prefix>/lib/IBDM/ibdm1.0/ibnl directory
g)
Check the new file syntax by placing it in the ibnl directory as described above, creating a simple topology (ibdm-topo-file file with one such system and running ibdmtr utility to parse it tracing a simple path through it.

4. Formal definition in YACC Syntax:

INT ::= ([1-9][0-9]*|0) ;

WIDTH ::= (4x|8x|12x) ;

SPEED ::= (2.5G|5G|10G) ;

NODETYPE ::= (SW|CA|HCA) ;

NAME ::= ([\[\]\\\*/A-Za-z0-9_.:%@~]+) ;

NL: LINE | NL LINE;

ONL: | NL;

ibnl: ONL systems topsystem;

systems: | systems system ;

sub_inst_attributes: | sub_inst_attributes sub_inst_attribute NL;

sub_inst_attribute: NAME '=' NAME '=' NAME | NAME '=' NAME '=' INT | NAME '=' NAME ;

topsystem: TOPSYSTEM system_names NL sub_inst_attributes insts ;

system: SYSTEM system_names NL insts ;

system_names: system_name | system_names ',' system_name ;

system_name: NAME ;

insts: | insts node | insts subsystem ;

node: node_header NL node_connections ;

node_header: NODE NODETYPE INT NAME NAME ;

node_connections: | node_connections node_connection NL ;

node_connection: node_to_node_link | node_to_port_link ;

node_to_node_link: INT '-' WIDTH '-' SPEED '-' '>' NAME | INT '-' WIDTH '-' '>' NAME INT | INT '-' SPEED '-' '>' NAME INT | INT '-' '>' NAME INT ;

node_to_port_link: INT '-' WIDTH '-' SPEED '-' '>' NAME | INT '-' WIDTH '-' '>' NAME | INT '-' SPEED '-' '>' NAME | INT '-' '>' NAME ;

subsystem: subsystem_header NL subsystem_connections ;

subsystem_header: SUBSYSTEM NAME NAME ;

subsystem_connections: | subsystem_connections subsystem_connection NL ;

subsystem_connection: subsystem_to_subsystem_link | subsystem_to_port_link ;

subsystem_to_subsystem_link: NAME '-' WIDTH '-' SPEED '-' '>' NAME NAME | NAME '-' WIDTH '-' '>' NAME NAME | NAME '-' SPEED '-' '>' NAME NAME | NAME '-' '>' NAME NAME ;

subsystem_to_port_link: NAME '-' WIDTH '-' SPEED '-' '>' NAME | NAME '-' WIDTH '-' '>' NAME | NAME '-' SPEED '-' '>' NAME | NAME '-' '>' NAME ;