Spaces:
Sleeping

File size: 974 Bytes
39e01c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  "relatedBlocks": [
    "Modulo_Count",
    "CLOCK_c",
    "SampleCLK"
  ],
  "criticalRules": [
    "Control port is input event (not clock)",
    "dState must be kept for counter persistence",
    "Width=60 must be preserved",
    "C_OR_FORTRAN simulation function type"
  ],
  "description": "Event counter block - counts events and outputs the accumulated count",
  "anomalies": [
    "Width=60 (non-standard, standard is 40)",
    "dState exists but state is empty - uses discrete state",
    "Control port for event counting (signals incremental)",
    "3-parameter exprs: initial value, max count, increment direction",
    "Multiple integer parameters [1, 2, 0] for internal counter configuration"
  ],
  "name": "Counter",
  "commonUses": [
    "Counting events in simulations",
    "Sequencing operations",
    "State machine implementation",
    "Loop iteration counting",
    "Event frequency counting"
  ],
  "sourceFile": "data/macros/Sources/Counter.sci"
}