proc SCHEMATIC_diode_charge_pump {} {

make input -name in_pos -origin {310 -130}
make input -name in_neg -origin {310 10}
make output -name out -origin {660 -130}
make add2 -name xi0 -origin {570 -130}
make gain -name xi1 -gain diode_eff -origin {420 -130}
make gain -name xi2 -gain -diode_eff -origin {420 10}
  make_wire 470 -130 540 -130
  make_wire 600 -130 660 -130
  make_wire 470 10 570 10
  make_wire 310 -130 380 -130
  make_wire 310 10 380 10
  make_wire 570 -100 570 10

}

proc ICON_diode_charge_pump args {
  icon_setup $args {{origin {0 0}} {orient R0} {name x} {diode_eff 1.0}}
icon_term -type input -origin {-80 -20} -name in_pos
icon_term -type input -origin {-80 10} -name in_neg
icon_term -type output -origin {80 0} -name out
icon_property -origin {-80 -50} -label {$name}
icon_property -origin {-80 70} -label {diode_eff = $diode_eff (mA/mW)}
  icon_property -origin {-70 110} -type user -name name -default x
  icon_property -origin {-70 130} -type user -name diode_eff -default 1.0
  icon_line -80 -40 80 -40 80 50 -80 50 -80 -40
icon_property -origin {-70 40} -label diode_charge_pump
icon_property -origin {-70 -20} -label in_pos
icon_property -origin {-70 10} -label in_neg
icon_property -origin {70 0} -anchor e -label out
}

