摘要 |
PROBLEM TO BE SOLVED: To correctly accumulate the number of packet bytes of a variable length packet and to accelerate counting. SOLUTION: A counting device comprises a subcounter 2 for counting the number of bytes of a packet made to pass through a packet processing part 1 and outputting a subcounter value, an overflow detection signal and a valid/ invalid EOP detection signal to registers 6, 7 and 8, an accumulation counter 3 for accumulating the subcounter value, and a host managing part 5 for reading an accumulated value of the accumulation counter 3 at prescribed timing and outputting the accumulated value of the number of bytes of an input packet according to contents of the registers 6, 7 and 8. The host managing part 5 accumulates the number of bytes for overflow on the basis of an overflow detection signal and correctly output the number of the total valid bytes even though the subcounter 3 overflows. COPYRIGHT: (C)2003,JPO
|