proc SCHEMATIC_regen_latch {} {

make input -name d -origin {290 290}
make input -name clk -origin {290 330}
make output -name q -origin {360 290}

}

proc ICON_regen_latch args {
  icon_setup $args {{origin {0 0}} {orient R0} {name x} {gain 1} {f_bw 10e9}}
icon_term -type input -origin {-30 -10} -name d
icon_term -type input -origin {-30 20} -name clk
icon_term -type output -origin {30 -10} -name q
icon_property -origin {-20 -10} -label d
icon_property -origin {-20 20} -label clk
icon_property -origin {20 -10} -anchor e -label q
icon_property -origin {-20 -50} -label {$name}
icon_property -origin {-30 -30} -label regen_latch
  icon_line -30 -40 30 -40 30 40 -30 40 -30 -40
icon_property -origin {-30 50} -label {gain=$gain}
  icon_property -origin {-30 90} -type user -name name -default x
  icon_property -origin {-30 110} -type user -name gain -default 1
icon_property -origin {-30 70} -label {f_bw=$f_bw}
  icon_property -origin {-30 130} -type user -name f_bw -default 10e9
  icon_line -30 10 -20 20 -30 30
  icon_line -10 -10 0 -10 0 20 10 20
  icon_line 0 10 -10 0
  icon_line 0 10 10 0
}

