implementing clock_detect in dfg_graph_avs.cpp