Intel
®
81341 and 81342 I/O Processors
December 2007
Developer’s Manual
Order Number: 315037-002US
951
PMON Unit—Intel
®
81341 and 81342
has been simplified by using 12 clocks as the sampling period. In a real
system the sampling would more likely be something like 1 ms. There is a certain
amount of overhead associated with writing and reading to any
PMON
registers. The
more frequent the interaction between the
PMON
counters and any software, the
larger the margin of error that is injected into the final results.
The sampling period can be controlled by a CPU counter or another
PMON
counter
periodically interrupting the system and allowing the software to read data registers or
do whatever else may be desired.
Example 17. Simple Counting
This example demonstrates how to measure the number of times event A occurs during
12 clocks.
An alternative way to represent the data in the preceding table is as follow:
Write Event Register 0 (Increment = Event A)
Start Counter 0 immediately
Repeat every 12 clocks
Sample & Restart Counter 0 (Threshold Condition Code is NA)
Read Data Register 0
End Repeat
Table 598. Simple Time Based Counting of Events Example
Opcode
Target Counter Increment Event Decrement Event Trigger Event
Write Event Register
0
Event A
None (000h)
Start
0
Immed (000h)
* Sample & Restart
0
Immed (000h)
Read Data Register
0
-- Wait 12 clocks before returning to * --
Figure 159. Block Diagram and Waveforms of Time Based Sampling Example
B6300-01