Method and system for counting data packets
First Claim
1. A method for counting data packets, comprising:
- counting packet pulse signals when a low bit counter is in a count state, sending a carry signal when the low bit counter is full;
polling all channels and determining a channel in which the low bit counter sends the carry signal, calculating an address of a Random Access Memory (RAM) corresponding to the low bit counter according to a channel number of the channel and a type of the data packets in the channel, and forwarding the calculated RAM address to a state machine;
acquiring, by the state machine, data from the address of the RAM corresponding to the low bit counter adding 1 to the acquired data and writing the added data into the address,a counting speed for the data packets is increased by combining the low bit counter and the RAM.
1 Assignment
0 Petitions
Accused Products
Abstract
The disclosure provides a method for counting data packets, which includes the following steps: counting packet pulse signals when a low bit counter is in a count state, and sending a carry signal when the low bit counter is full; and acquiring data from an address of a Random Access Memory (RAM) corresponding to the low bit counter which sends the carry signal, adding 1 to the acquired data and then writing the added data into the address. The disclosure also provides a system for counting data packets. According to the technical scheme of the disclosure, the occupancy rate of logical resources is reduced while the counting of the data packets in a network is finished at a high speed.
-
Citations
19 Claims
-
1. A method for counting data packets, comprising:
-
counting packet pulse signals when a low bit counter is in a count state, sending a carry signal when the low bit counter is full; polling all channels and determining a channel in which the low bit counter sends the carry signal, calculating an address of a Random Access Memory (RAM) corresponding to the low bit counter according to a channel number of the channel and a type of the data packets in the channel, and forwarding the calculated RAM address to a state machine; acquiring, by the state machine, data from the address of the RAM corresponding to the low bit counter adding 1 to the acquired data and writing the added data into the address, a counting speed for the data packets is increased by combining the low bit counter and the RAM. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A system for counting data packets, comprising:
- a low bit counter, a state machine, a Random Access Memory (RAM), a polling algorithm circuitry, and an address arithmetic circuitry, wherein
the low bit counter is configured to count packet pulse signals when the low bit counter is in a count state and to send a carry signal when the low bit counter is full; the polling algorithm circuitry is configured to poll channels, trigger the address arithmetic circuitry when polling to a channel in which the low bit counter is sending the carry signal; wherein the address arithmetic circuitry is configured to calculate an address of the RAM corresponding to the low bit counter according to a channel number of the channel and a type of the data packets in the channel and to send the address of the RAM to the state machine; the state machine is configured to acquire data from the address of the RAM corresponding to the low bit counter which sends the carry signal, to add 1 to the acquired data and to write the added data into the address; and the RAM is configured to provide the data to the state machine and to store the data written by the state machine, a counting speed for the data packets is increased by combining the low bit counter and the RAM. - View Dependent Claims (18, 19)
- a low bit counter, a state machine, a Random Access Memory (RAM), a polling algorithm circuitry, and an address arithmetic circuitry, wherein
Specification