Kicad-to-HAL: Naming Nets

(*20*)Nets connecting Kicad elements get their names in three alternative ways, each and every handled quite in a different way via Kicad-to-HAL.

(*20*)The most straightforward case occurs with a International Label hooked up to the web, as with the All-home sign at the proper, which can also be referenced any place within the schematic :

(*1*)
House switches enter – schematic
(*12*)

(*20*) The XML record carries the International Label textual content as the web title:

<internet code="154" title="All-home"> <node ref="joint.3.100" pin="20"/> <node ref="joint.2.100" pin="20"/> <node ref="joint.0.100" pin="20"/> <node ref="joint.1.100" pin="20"/> <node ref="dbounce.100" pin="2"/>
</internet>

(*20*)The order of the nodes inside the internet depends upon which one Kicad encounters first, so Kicad-to-HAL varieties the vacation spot references in ascending order:

(*4*)
internet All-home <= dbounce.0.out => joint.0.home-sw-in joint.1.home-sw-in joint.2.home-sw-in joint.3.home-sw-in # dbounce.100

(*20*)The ASCII-art arrows across the HAL supply reference set it off from the remainder of the litter, with the remark (off-screen best for you) giving the unique Kicad supply element reference.

(*20*)Kicad generates a reputation for nameless nets, just like the one between the 5I25 GPIO pin and the debouncer, from the primary element it encounters:

 <internet code="617" title="Internet-(dbounce.100-Pad1)"> <node ref="hm2_5i25.0.gpio.013.100" pin="2"/> <node ref="dbounce.100" pin="1"/> </internet>

(*20*)Kicad-to-HAL replaces the ones names with a much less noisy one in an ascending collection:

(*4*)
internet N_159 <= hm2_5i25.0.gpio.013.in_not => dbounce.0.in # hm2_5i25.0.gpio.013.100

(*20*)The nameless Kicad internet between the parameter atmosphere the debounce extend begins with a identical title:

<internet code="127" title="Internet-(mux2.100-Pad1)"> <node ref="parameter.106" pin="1"/> <node ref="mux2.100" pin="1"/>
</internet>

(*20*)Kicad-to-HAL extracts the supply and vacation spot nodes from the web to supply a HAL setp command for each and every vacation spot:

(*4*)
setp dbounce.0.extend 3 # parameter.111

(*20*)Kicad nets can get a reputation from a Native Label obtainable most effective on that exact schematic sheet:

(*3*)
Jog Velocity conversion – schematic
(*12*)

(*20*)The ones Kicad internet names come with the sheet title as a prefix:

<internet code="130" title="/Jog Velocity/Angular-Movement"> <node ref="mux2.100" pin="3"/> <node ref="or2.112" pin="3"/>
</internet>
<internet code="132" title="/Jog Velocity/Vel-According to-2d"> <node ref="scale.104" pin="1"/> <node ref="mux2.100" pin="4"/>
</internet>
<internet code="138" title="/Jog Velocity/Vel-According to-Minute"> <node ref="scale.101" pin="1"/> <node ref="scale.104" pin="4"/> <node ref="scale.100" pin="1"/>
</internet>

(*20*)It’s now not transparent which characters HAL regards as legitimate, so KIcad-to-HAL smashes the Kicad title flat:

(*4*)
internet _Jog_Speed_Angular-Movement <= or2.12.out => mux2.0.sel # or2.112
internet _Jog_Speed_Vel-According to-Minute <= scale.4.out => scale.0.in scale.1.in # scale.104
internet _Jog_Speed_Vel-According to-2d <= mux2.0.out => scale.4.in # mux2.100

(*20*)Kicad-to-HAL varieties the HAL internet listing via title to make a selected internet more straightforward to search out.

(*20*)The XML netlist record incorporates a zillion single-node nets, one for each and every unconnected pin within the schematic. If the Kicad internet title doesn’t get started with Internet-, KIcad-to-HAL will come with a observe within the HAL record:

(*4*)
#* Named internet with unmarried pin: hm2_5i25.0.100 read_gpio

(*20*)Prefix the pin title (whilst you create the emblem) with an asterisk to suppress that message. This shall be most precious for HAL serve as pins meant for an not obligatory thread connection:

(*2*)
Kicad Image Houses – HM2_5I25
(*12*)

(*20*)Kicad-to-HAL does now not generate HAL nets for Kicad nets with -thread of their names, as the ones generate addf instructions.