If indeed there is a problem in the current Bunch counter, it seems to be related to the B0 marker. One way to fix this is not to use it. In the heart chip, heart.gdf, simply use timer5, TRACKIN CLK, Control 3, as the B0 output of the Heart Chip into the Bunch chip, instead of the true _b0_out. This clock already is shifted by the 0,25,50 or 75 ns tap, and only starts after a H-R-R, B0. So in the bunch counter Bunch.gdf, use this signal (timer5) in place of the cdfclk. Then have a comparator, that resets the counter, when the count is 159. Only need to reset the counter in the beginning of a Run. Well, just use the _Halt signal coming into the Bunch chip. To phase delay the counter by the 0-7 clocks, use a mechanism similar to the one already used...
I leave the implementation as an exercise to the reader.

Pedro Amaral