Ontological Layer: The Synchronization of State
Timing & Race Conditions
The Heartbeat and Rhythm of the Digital Machine
The Dimension of Time
A digital circuit is not just about logical correctness; it must be correct in time. The clock signal orchestrates the flow of data, dividing chaos into discrete, predictable events. But signals take time to propagate. If data arrives too late (Setup violation), leaves too early (Hold violation), or loops uncontrollably (Race condition), the machine’s memory shatters. Realm 13 explores how we tame these physical constraints using edge-triggering and Master-Slave architectures.
The 18 Timing Nodes
Ontological Mapping: From Delay to Synchronization
Time in Systems
- Continuous vs discrete time
- Signal transitions
- State-update intervals
- Physical constraints on speed
Clock Signals
- The oscillator heartbeat
- Square wave idealization
- Rising (Positive) Edge
- Falling (Negative) Edge
Frequency & Period
- Clock Period (T) in seconds
- Frequency (f = 1/T) in Hz
- Duty cycle representation
- Speed vs power trade-offs
Propagation Delay
- Time from input to output change
- Combinational logic delay (t_comb)
- Physical transistor limits
- Accumulation in deep circuits
Rise & Fall Time
- Non-ideal signal transitions
- Rise time (10% to 90%)
- Fall time (90% to 10%)
- Impact on edge-detection
Setup Time
- Data stability requirement
- Arrival BEFORE the clock edge
- t_su specifications
- Violations cause metastability
Hold Time
- Data stability requirement
- Holding AFTER the clock edge
- t_h specifications
- Preventing premature transitions
Clock-to-Q Delay
- Flip-flop internal response time
- Time from Clock edge to Q output
- t_cq specification
- Drives the next combinational stage
Timing Relationships
- The combined valid window
- Data transition vs Clock edge
- Interplay of delays and clocks
- Ensuring reliable sampling
Race Conditions
- Unintended sequential loops
- Timing-dependent logic errors
- Signals "racing" through gates
- Unpredictable final states
Race-Around Condition
- Specific to Level-Sensitive JK-FF
- Occurs when J=1, K=1 (Toggle)
- t_pulse > t_propagation
- Continuous toggling during High clock
Master-Slave Solution
- Two-stage isolation architecture
- Master active on High (Captures)
- Slave active on Low (Outputs)
- Breaks the continuous feedback loop
Edge Triggering
- Sampling only at exact transitions
- Positive (Rising) Edge
- Negative (Falling) Edge
- Eliminates level-sensitive transparency
Timing Diagrams
- Visualizing signals over time
- Multi-waveform synchronization
- Identifying edge triggers
- Analyzing sequential behavior
Clock Skew
- Spatial clock arrival differences
- Physical wire routing delays
- Reduces effective valid window
- Can cause hold-time violations
Synchronization
- Crossing clock domains
- Asynchronous inputs
- 2-FF Synchronizer chains
- Mitigating metastability
Timing Constraints
- Max frequency determination
- T_min ≥ t_cq + t_comb_max + t_su
- Hold constraint: t_comb_min ≥ t_h - t_cq
- Critical Path analysis
18 — Timing & Verification Laboratory
A circuit that works perfectly on paper will fail in reality if timing is ignored. By understanding setup, hold, propagation delays, and race conditions, we secure the foundation. We are now ready to string these perfectly timed memory elements together in Realm 14: Registers.