proc SCHEMATIC_c2_packet_detect_and_slice {} {
make input -name rx_a -origin {290 150}
make input -name rx_b -origin {290 210}
make output -name out -origin {460 150}
make output -name enable_out -origin {460 210}
make input -name preamble_vec -origin {290 270}
}

proc ICON_c2_packet_detect_and_slice args {
  icon_setup $args {{origin {0 0}} {orient R0} {name x} {data_length 10}}
icon_term -type input -origin {-100 -10} -name rx_a
icon_term -type input -origin {-100 10} -name rx_b
icon_term -type output -origin {100 -10} -name out
icon_term -type output -origin {100 30} -name enable_out
icon_term -type input -origin {-100 40} -name preamble_vec
icon_property -origin {-90 -10} -label rx_a
icon_property -origin {-90 10} -label rx_b
icon_property -origin {-90 40} -label preamble_vec
icon_property -origin {90 -10} -anchor e -label out
icon_property -origin {90 30} -anchor e -label enable_out
icon_property -origin {-90 -60} -label {$name}
icon_property -origin {-90 -40} -label c2_packet_detect_and_slice
  icon_line -100 -50 100 -50 100 60 -100 60 -100 -50
icon_property -origin {-90 70} -label {data_length=$data_length bits}
  icon_property -origin {-90 120} -type user -name name -default x
  icon_property -origin {-90 140} -type user -name data_length -default 10
}

