proc SCHEMATIC_nand2 {} {
make input -name a -origin {160 -710}
make input -name b -origin {160 -670}
make output -name y -origin {560 -690}
make and2 -name xi0 -origin {280 -690}
make inv -name xi1 -origin {390 -690}
  make_wire 240 -710 160 -710
  make_wire 240 -670 160 -670
  make_wire 360 -690 300 -690
  make_wire 450 -690 560 -690
}

proc ICON_nand2 args {


  icon_setup $args {{origin {0 0}} {orient R0} {name x}}
icon_term -type input -origin {-40 -20} -name a
icon_term -type input -origin {-40 20} -name b
icon_term -type output -origin {40 0} -name y
  icon_property -origin {-40 70} -type user -name name -default x
  icon_arc -40 -30 20 30 -start 269 -extent 181
  icon_line -40 -30 -10 -30
  icon_line -40 30 -10 30
  icon_arc 20 -10 40 10 -start 181 -extent 359
  icon_line -40 -30 -40 30
icon_property -origin {-30 -20} -label a
icon_property -origin {-30 20} -label b
icon_property -origin {10 0} -label y
icon_property -origin {-10 40} -label nand2
icon_property -origin {-40 -40} -label {$name}


}

