Miscellaneous IP blocks
The ip/misc/ directory contains reusable support blocks that are shared across the design.
These blocks are generally not end-user features by themselves, but they are important for maintenance, integration, and understanding the overall system.
Several of them are specifically about clock-domain crossing, reset hygiene, observability, and small glue-logic transformations.
Common utility blocks
sync.sv- synchronization helpers for clock-domain crossingcdc_mailbox.sv- mailbox-style CDC supportreset.sv- reset handling helperssig_mux.sv- simple signal-selection helper logicdelay.sv- delay-line style helper block
More detail:
sync.svprovides two-stage and three-stage single-bit synchronizers with Quartus/Altera synchronization attributes so CDC intent remains visible to toolscdc_mailbox.svtransfers a multi-bit word between clock domains using a toggle-based notification path plus a hold/request handshake from the output sidereset.svprovidesreset_sync2_hold, a reset combiner/synchronizer with asynchronous assertion, synchronous release, and programmable hold time after releasesig_mux.svis a small parameterized bit selector that safely handles non-power-of-two input countsdelay.svcurrently containsdelay_or4, a simple two-stage register/OR helper for combining delayed trigger-like signals
Observability and diagnostics
activity_monitor.sv- activity indication / observation supportheartbeat.sv- periodic heartbeat generationcrc32.sv- CRC32 calculation logic used for integrity checks and diagnostics
More detail:
activity_monitor.svblinks an output when the observed signal has changed recently; the same file also containspresence_detector_async_posedge, which latches asynchronous positive edges and holds anactiveindication for a programmable time windowheartbeat.svgenerates a repeated double-pulse heartbeat pattern from a single input clockcrc32.svimplements a streaming reflected CRC-32 over 32-bit words with one word consumed per clock and a valid pulse aligned to the registered result
Signal-generation helpers
pulse_gen_timebase.sv- generated pulse timing helperrand_signal_gen.sv- random-signal generation helpertik.sv- small timing utility block
More detail:
pulse_gen_timebase.svderives one-clock-wide pulses at1 ms,10 ms,100 ms, and1 sintervals from a single base clockrand_signal_gen.svgenerates pseudo-random test activity including baseline flips, short glitches, and multi-segment bursts, with output-enable based pausingtik.svis a compact periodic pulse generator that asserts once every configured number of cycleslevel_to_pulse.vcontains several level-to-pulse converters, including variants with extra delay and built-in synchronizer stagesendianness.svcurrently contains a 96-bit byte-order swapper used where fixed-layout word packing needs explicit reordering
Notes for developers
When modifying these blocks, pay particular attention to:
- clock-domain assumptions
- reset polarity and reset domain
- whether a helper is intended for synthesis, simulation support, or both
For the CDC-oriented blocks in particular, preserving the synchronizer structure is usually more important than micro-optimizing the RTL.
The ip/misc/ directory also contains dedicated test benches for several of these blocks.
Related pages
development.mdbuild.md