@@ 7,15 7,6 @@ let comp_ignored comp =
comp.Comp.ref.[0] = '#'
|| Fields.get comp.Comp.fields Fields.Keys.spice_netlist_enabled "Y" <> "Y"
-let write_comp outch pin_cache comp name =
- let pin_nets = map (fun pin ->
- Hashtbl.find pin_cache (comp.Comp.ref, pin.Pin.number)
- ) comp.Comp.part.CompDef.pins in
- output_string outch name;
- output_string outch (" " ^ (String.concat " " pin_nets));
- output_string outch (" " ^ (comp.Comp.value));
- output_string outch "\n"
-
let make_cache kf vf xs =
let tbl = Hashtbl.create (Enum.count xs) in
Enum.iter (fun x ->
@@ 41,6 32,15 @@ let make_unique used name =
in helper 2
end
+let write_comp outch pin_cache comp name =
+ let pin_nets = map (fun pin ->
+ Hashtbl.find pin_cache (comp.Comp.ref, pin.Pin.number)
+ ) comp.Comp.part.CompDef.pins in
+ output_string outch name;
+ output_string outch (" " ^ (String.concat " " pin_nets));
+ output_string outch (" " ^ (comp.Comp.value));
+ output_string outch "\n"
+
let write_netlist outch schematic netlist =
let net_names = make_cache id ( fun net_name ->
Netlist.driver_net_name netlist net_name