proc SCHEMATIC_ds_dt_ord3_mash_mbit_uint {} {
make input -name clk -origin {-410 50}
make ds_dt_ord3_mash_3bit_uint -name xi9 -wid_in n_lsb -origin {640 0}
make split_msb_lsb_uint -name xi13 -n_msb n_msb -n_lsb n_lsb -origin {230 -80}
make add2_int -orient RY -name xi14 -origin {890 -30}
make input -name in -origin {-410 -110}
make output -name out -origin {1140 -30}
make name_net -name in_msb -origin {390 -110}
make name_net -name ds_out -origin {810 -30}
make name_net -name in_lsb -origin {390 -30}
make sat_limits_uint -name xi15 -n n_msb+n_lsb -origin {10 -120}
make name_net -orient RX -name clk -origin {960 0}
make reg_int -name xi1 -origin {1050 -20}
make sampler_w_delay -name xi0 -origin {-260 -110}
make name_net -name in_sampled -origin {-130 -110}
make name_net -orient RX -name clk -origin {490 -210}
make name_net -orient RX -name clk -origin {690 -210}
make reg_int -name xi2 -origin {580 -230}
make reg_int -name xi3 -origin {780 -230}
  make_wire 810 -30 760 -30
  make_wire 810 -30 860 -30
  make_wire 390 -30 310 -30
  make_wire 390 -30 520 -30
  make_wire 90 -110 150 -110
  make_wire 990 0 960 0
  make_wire 990 -30 920 -30
  make_wire 1110 -30 1140 -30
  make_wire -340 -70 -380 -70
  make_wire -340 -110 -410 -110
  make_wire -380 50 -410 50
  make_wire 520 50 -380 50
  make_wire -180 -110 -130 -110
  make_wire -130 -110 -70 -110
  make_wire 520 -240 450 -240
  make_wire 310 -110 390 -110
  make_wire 390 -110 450 -110
  make_wire -380 -70 -380 50
  make_wire 520 -210 490 -210
  make_wire 720 -210 690 -210
  make_wire 840 -240 890 -240
  make_wire 640 -240 720 -240
  make_wire 890 -240 890 -60
  make_wire 450 -240 450 -110
}

proc ICON_ds_dt_ord3_mash_mbit_uint args {

  icon_setup $args {{origin {0 0}} {orient R0} {name x} {n_msb 4} {n_lsb 16}}
icon_term -type input -origin {-120 -30} -name in
icon_term -type input -origin {-120 50} -name clk
icon_term -type output -origin {120 -30} -name out
icon_property -origin {-110 -30} -label in
icon_property -origin {-110 50} -label clk
icon_property -origin {110 -30} -anchor e -label out
icon_property -origin {-110 -80} -label {$name}
icon_property -origin {-110 -60} -label ds_dt_ord3_mash_mbit_uint
  icon_line -120 -70 120 -70 120 70 -120 70 -120 -70
icon_property -origin {-110 80} -label {n_msb=$n_msb}
  icon_property -origin {-110 150} -type user -name name -default x
  icon_property -origin {-110 170} -type user -name n_msb -default 4
  icon_line -120 40 -110 50 -120 60
icon_property -origin {-110 10} -label (n_msb+n_lsb)
icon_property -origin {110 -10} -anchor e -label (signed)
icon_property -origin {-110 -10} -label (unsigned)
  icon_property -origin {-110 190} -type user -name n_lsb -default 16
icon_property -origin {-110 100} -label {n_lsb=$n_lsb}
icon_property -origin {-110 120} -label {(Note:  n_msb+n_lsb <= 30 bits)}
icon_property -origin {110 10} -anchor e -label (n_msb+qnoise)

}

