Bidirectional counting of dual outcome events
AssigneeInternational Business Machines Corporation
InventorsGiles Roger Frazier, Venkat R. Indukuru
Life of this patent
Estimating the term…
Abstract
A dual outcome event monitoring unit comprises a plurality of inputs, and a first counter. Each input is associated with an event and the first counter is a bidirectional counter. The dual outcome event monitoring unit is configured to increment the first counter in response to receiving an indication of the occurrence of a first event of a plurality of events. The first event is designated as an increment event. The dual outcome event monitoring unit is also configured to decrement the first counter responsive to receiving an indication of the occurrence of a second event of a plurality of events. The second event is designated as a decrement event.
Claims16
An apparatus comprising a dual outcome event monitoring unit, the dual outcome event monitoring unit comprising:
- a first counter, wherein the first counter is a bidirectional counter;
- a register designated to host an event identifier;
- and
- a first multiplexor comprising a first plurality of inputs,
- wherein each input of the first plurality of inputs is associated with an event, wherein a signal on an input of the first plurality of inputs indicates an occurrence of the event associated with the input of the first plurality of inputs,
- wherein the first multiplexor is coupled with the first counter and an output of the register,
- wherein the first multiplexor is configured to select at least one input of the first plurality of inputs based on the event identifier hosted by the register;
- wherein the apparatus is configured to:
- increment the first counter in response to reception of an indication of an occurrence of a first event of a plurality of events, the first event being identified by a first event identifier hosted in the register;
- decrement the first counter in response to reception of an indication of an occurrence of a second event of the plurality of events, the second event being identified by the first event identifier hosted in the register;
- receive a second event identifier;
- in response to reception of the second event identifier,
- store the second event identifier in the register, and
- reset the first counter;
- increment the first counter in response to reception of an indication of an occurrence of a third event of the plurality of events, the third event being identified by the second event identifier hosted in the register;
- and
- decrement the first counter in response to reception of an indication of an occurrence of a fourth event of the plurality of events, the fourth event being identified by the second event identifier hosted in the register.
A computer program product comprising:
- a computer readable storage medium having program instructions embodied therewith, the program instructions comprising program instructions to,
- receive, at a dual outcome event monitoring unit, an event indication from a processor;
- determine whether the event indication indicates an increment event or a decrement event;
- if the event indication indicates the increment event, increment a first counter, wherein the dual outcome event monitoring unit includes the first counter;
- if the event indication indicates the decrement event, increment a second counter;
- determine whether the second counter is equal to a bias value;
- and
- in response to a determination that the second counter is equal to the bias value, decrement the first counter.
An apparatus comprising a dual outcome event monitoring unit, the dual outcome event monitoring unit comprising:
- a bidirectional counter, wherein the bidirectional counter includes an increment input and a decrement input;
- a register designated to host a plurality of event identifiers;
- a first multiplexor comprising a first plurality of inputs, wherein each input of the first plurality of inputs is associated with an event, wherein the first multiplexor is configured to select at least one input of the first plurality of inputs based on a first of the plurality of event identifiers hosted by the register;
- and
- a second multiplexor comprising a second plurality of inputs, wherein each input of the second plurality of inputs is associated with an event, wherein the second multiplexor is configured to select at least one input of the first plurality of inputs based on a second of the plurality of event identifiers hosted by the register;
- wherein the apparatus is configured to:
- increment the bidirectional counter in response to reception of an indication of an occurrence of a first event of a plurality of events, the first event being identified by the first of the plurality of event identifiers hosted in the register;
- decrement the bidirectional counter in response to reception of an indication of an occurrence of a second event of the plurality of events, the second event being identified by the second of the plurality of event identifiers hosted in the register;
- receive a third event identifier;
- in response to reception of the third event identifier,
- store the third event identifier in the register;
- and
- reset the bidirectional counter;
- and
- increment the bidirectional counter in response to reception of an indication of an occurrence of a third event of the plurality of events, the third event being identified by the third event identifier hosted in the register.
Dependencies are inferred from the claim text.