proc SCHEMATIC_quaddetect {} {
make output -name out -origin {550 -260}
make input -name in -origin {-120 -390}
make fixeddelay -name xi7 -delaysample delaysample -origin {20 -240}
make multiplier -name xi0 -origin {110 -390}
make rcfilter -name xi1 -fo fo -origin {240 -390}
make rcfilter -name xi2 -fo fo -origin {360 -390}
make rcfilter -name xi3 -fo fo -origin {480 -390}
make rcfilter -name xi6 -fo fo -origin {230 -260}
make rcfilter -name xi5 -fo fo -origin {340 -260}
make rcfilter -name xi4 -fo fo -origin {460 -260}
  make_wire -80 -390 70 -390
  make_wire -120 -390 -80 -390
  make_wire 550 -310 160 -310
  make_wire 110 -350 110 -250
  make_wire -80 -390 -80 -250
  make_wire -20 -250 -80 -250
  make_wire 60 -250 110 -250
  make_wire 200 -390 150 -390
  make_wire 320 -390 280 -390
  make_wire 440 -390 400 -390
  make_wire 520 -390 550 -390
  make_wire 500 -260 550 -260
  make_wire 380 -260 420 -260
  make_wire 270 -260 300 -260
  make_wire 190 -260 160 -260
  make_wire 160 -310 160 -260
  make_wire 550 -390 550 -310
}

proc ICON_quaddetect args {

  icon_setup $args {{origin {0 0}} {orient R0} {name x} {fo {}} {delaysample {}}}
icon_term -type input -origin {-40 0} -name in
icon_term -type output -origin {40 0} -name out
  icon_property -origin {-50 80} -type user -name name -default x
  icon_property -origin {-50 100} -type user -name fo
  icon_property -origin {-50 120} -type user -name delaysample
icon_property -origin {-40 40} -label {fo=$fo}
icon_property -origin {-40 60} -label {delaysample=$delaysample}
icon_property -origin {-30 0} -label in
icon_property -origin {30 0} -anchor e -label out
icon_property -origin {0 20} -anchor center -label quaddetect
  icon_line -40 -20 -40 30 40 30 40 -20 -40 -20
icon_property -origin {-40 -30} -label {$name}

}

