proc SCHEMATIC_leadlagfilter_clocked {} {

make input -name in -origin {300 -640}
make output -name out -origin {380 -640}

}

proc ICON_leadlagfilter_clocked args {
  icon_setup $args {{origin {0 0}} {orient R0} {name x} {fp {}} {fz {}} {gain {}} {clk_freq {}}}
icon_term -type input -origin {-90 0} -name in
icon_term -type output -origin {90 0} -name out
icon_term -type input -origin {-90 30} -name clk
  icon_property -origin {-70 200} -type user -name name -default x
  icon_property -origin {-70 220} -type user -name fp
  icon_line -90 -50 -90 80 90 80 90 -50 -90 -50
icon_property -origin {-80 0} -label in
icon_property -origin {80 0} -anchor e -label out
icon_property -origin {-80 -40} -label leadlagfilter_clocked
icon_property -origin {0 50} -anchor center -label {gain*(1 + s / ( 2*pi*fz ) )}
icon_property -origin {0 70} -anchor center -label {s*(1 + s / ( 2*pi*fp ) )}
  icon_line -70 60 70 60
  icon_property -origin {-70 240} -type user -name fz
  icon_property -origin {-70 260} -type user -name gain
icon_property -origin {-60 100} -label {fp=$fp Hz}
icon_property -origin {-60 120} -label {fz=$fz Hz}
icon_property -origin {-60 140} -label {gain=$gain}
icon_property -origin {-90 -60} -label {$name}
icon_property -origin {-80 30} -label clk
  icon_line -90 20 -80 30 -90 40
  icon_property -origin {-70 280} -type user -name clk_freq
icon_property -origin {-60 160} -label {clk_freq=$clk_freq}
}

