IP Library Granted Patent US 10,291,232
Granted Patent B2
US 10,291,232 · App. 15/519,678 · Granted May 14, 2019

Counter and counting method

Inventor: Junjie Yin (Shenzhen, CN)
Assignee: Sanechips Technology Co., Ltd.
H03K21/12G06F13/22H03K21/00H04L12/08H04L49/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,291,232
App. No.
15/519,678
Granted
May 14, 2019
Kind
B2
Abstract

A counter includes: a computing module ( 100 ) and N counting modules ( 101 ). Each counting module includes a plurality of counting spaces corresponding to different counting entries, and counting spaces of the same counting entry in different counting modules have the same address, wherein the counting module is arranged to provide a value for computing to the computing module in response to a counting application of a counting application source. The computing module is arranged to read values of the same counting entry in different counting modules and accumulate the read values to obtain a total count value of the counting entry, N being an integer not less than 1. Also disclosed is a counting method.

Claims (59)

1. A counter, comprising: a computing module and N counting modules, wherein each counting module corresponds to a counting application source and comprises a plurality of counting spaces corresponding to different counting entries, and counting spaces of the same counting entry in different counting modules having the same address, wherein

the counting module is arranged to conduct counting in response to a counting application of a counting application source corresponding to the counting module and provide a value for computing to the computing module;

the computing module is arranged to read values of the same counting entry in different counting modules and accumulatively compute the read values to obtain a total count value of the counting entry;

N is an integer greater than 1;

the counting module further comprises: L poll counting sub-modules, L being an integer not less than 2; and

each poll counting sub-module is arranged to conduct counting in response to the counting application of the counting application source within a counting period of the poll counting sub-module, and respond to a read-write operation of a non-counting application source within a non-counting period of the poll counting sub-module.

2. The counter according to claim 1 , further comprising: an accumulating module, comprising a plurality of accumulating spaces corresponding to different counting entries, and arranged to acquire and store an accumulatively processing result for more than one counting module, and allow the computing module to read the accumulatively processing result, wherein

accordingly, the counting module is arranged to provide an accumulatively processing count value for the accumulating module; and

the computing module is arranged to read accumulatively processing results for the counting entries in the accumulating module, and accumulate the accumulatively processing results into a total count value of the corresponding counting entry.

3. The counter according to claim 1 , wherein the counting module comprises: a counting unit and a backup unit, wherein

the counting unit is arranged to conduct counting in response to a counting application of a counting application source, and share a write bus with the backup unit; and

the backup unit is arranged to keep data synchronization with the counting unit, and allow an computing module or the accumulating module to read data.

4. The counter according to claim 1 , wherein the poll counting sub-module comprises:

a poll counting unit, arranged to respond to the counting application of the counting application source within the counting period of the poll counting sub-module, respond to the read-write operation of the non-counting application source within the non-counting period of the poll counting sub-module, and share a write bus with a poll backup unit; and

the poll backup unit, arranged to keep data synchronization with the poll counting unit, and allow an computing module or the accumulating module to read data.

5. A counting method, comprising: allocating a counting module for each counting application source, and allocating respective counting spaces for different counting entries in each counting module, counting spaces of the same counting entry in different counting modules having the same address, the method further comprising:

conducting, by each counting module, counting in response to a counting application of a counting application source corresponding to the counting module; and

reading values of the same counting entry in different counting modules, and accumulatively computing the read values to obtain a total count value of the counting entry;

wherein the method further comprises:

allocating L poll counting sub-modules for each counting module; and

allowing each poll counting sub-module to conduct counting in response to the counting application of the counting application source within a counting period of the poll counting sub-module, and respond to a read-write operation of a non-counting application source within a non-counting period of the poll counting sub-module,

wherein L is an integer not less than 2.

6. The counting method according to claim 5 , further comprising:

reading count values of more than one counting module for the same counting entry, and accumulatively processing the count values;

storing an accumulatively processing result in an accumulating space corresponding to the counting entry in an accumulating module, so as to allow a computing module to read the accumulatively processing result; and

zero-clearing the counting module having been accumulatively processed,

the accumulatively processing referring to: accumulatively computing a count value of a counting entry in the counting module and an accumulating value corresponding to the counting entry in the accumulating module to obtain the accumulatively processing result.

7. The counting method according to claim 5 , wherein the read-write operation of the non-counting application source comprises: zero-clearing operation.

8. The counting method according to claim 5 , further comprising:

allocating a counting unit and a backup unit for each counting module or poll counting sub-module;

allowing the counting unit to conduct counting in response to a counting application of a counting application source, and to share a write bus with the backup unit; and

allowing the backup unit to keep data synchronization with the counting unit, and allowing a computing module or an accumulating module to read data.

9. The counter according to claim 2 , wherein the counting module comprises: a counting unit and a backup unit, wherein

the counting unit is arranged to conduct counting in response to a counting application of a counting application source, and share a write bus with the backup unit; and

the backup unit is arranged to keep data synchronization with the counting unit, and allow the computing module or the accumulating module to read data.

10. The counting method according to claim 6 , further comprising:

allocating a counting unit and a backup unit for each counting module or poll counting sub-module;

allowing the counting unit to conduct counting in response to a counting application of a counting application source, and to share a write bus with the backup unit; and

allowing the backup unit to keep data synchronization with the counting unit, and allowing the computing module or the accumulating module to read data.

11. The counting method according to claim 7 , further comprising:

allocating a counting unit and a backup unit for each counting module or poll counting sub-module;

allowing the counting unit to conduct counting in response to a counting application of a counting application source, and to share a write bus with the backup unit; and

allowing the backup unit to keep data synchronization with the counting unit, and allowing a computing module or an accumulating module to read data.

12. A counter, comprising: a processor; and

a plurality of memories for storing instructions executed by the processor;

each memory corresponding to a counting application source and comprising a plurality of counting spaces corresponding to different counting entries, and counting spaces of the same counting entry in different memories having the same address, wherein the processor is arranged to:

conduct counting in response to a counting application of a counting application source corresponding to the memory and provide a value for computing; and

read values of the same counting entry in different memories and accumulatively compute the read values to obtain a total count value of the counting entry;

wherein the processor is further arranged to:

allocate a plurality of poll counting sub-modules for each counting module; and

allow each poll counting sub-module to conduct counting in response to the counting application of the counting application source within a counting period of the poll counting sub-module, and respond to a read-write operation of a non-counting application source within a non-counting period of the poll counting sub-module.

13. The counter according to claim 1 , wherein the counting module comprises: a first poll counting sub-module and a second poll counting sub-module;

if the computing module needs to zero-clear the counting module, and the first poll counting sub-module is within a counting period of the first poll counting sub-module and counting application rate has fully occupied write bandwidth of the first poll counting sub-module, the computing module first zero-clears the second poll counting sub-module within a non-counting period of the second poll counting sub-module; and

if the counting period of the first poll counting sub-module is ended and the first poll counting sub-module enters a non-counting period of the first poll counting sub-module, the first poll counting sub-module does not respond to the counting application any more, but the second poll counting sub-module continues to respond to a subsequent counting application of the same counting application source instead.

14. The counter according to claim 1 , the counter is a statistical counter, the statistical counter comprising a entering counting module, an exiting counting module and a computing module, wherein

the entering counting module is arranged to count data packets entering a buffer space in response to a counting application of a data packet entering signal, and accumulate values of the exiting counting module into a count value of the entering counting module when the exiting counting module is zero-cleared;

the exiting counting module is arranged to count data packets exiting from the buffer space in response to a counting application of a data packet exiting signal; and

the computing module is arranged to compute actual data packets in the buffer space,

wherein the counting module further comprises: two poll counting sub-modules, wherein each poll counting sub-module is arranged to respond to the counting application of the data packet exiting signal within a counting period of the poll counting sub-module, and respond to a read-write operation of a zero-clearing signal within a non-counting period of the poll counting sub-module.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 10, 2017
From: YIN, JUNJIE
To: SANECHIPS TECHNOLOGY CO.,LTD.
Reel/Frame 042956/0680 →
Priority Claims (1)
CN 2014 1 0591463 · Oct 28, 2014 · national
Continuity (1)
Related Publication 20170264300A1 · Sep 14, 2017