On Fri, Apr 24, 2009 at 7:52 AM, Dick Hollenbeck <[email protected]> wrote: > Why is this code in jtag_add_pathmove()? > > > ?????????????????? > > /* the last state has to be a stable state */ > if (!tap_is_state_stable(path[num_states - 1])) > { > LOG_ERROR("BUG: TAP path doesn't finish in a stable state"); > exit(-1); > } > > ??????????????????? > > > > > It is not obvious to me why this function should not be allowed to move > between any states as allowed by the tap state diagram which is enforced > by the nifty tap_state_transition() tests: > > > if ( tap_state_transition(cur_state, true) != path[i] > && tap_state_transition(cur_state, false) != path[i]) > { > LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition", > tap_state_name(cur_state), tap_state_name(path[i])); > exit(-1); > }
One reason is to restrict things so as to allow hardware implementations of the JTAG state machine. Why would we need said flexibility? It's not needed by the code today... -- Øyvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
