common is a self-contained SystemVerilog component layer for SoC IP. It
provides clock/reset, CDC, stream, storage, address, register, and technology
model primitives without requiring a parent SoC repository.
The preferred public directories are rtl/base, rtl/stream, rtl/bus,
rtl/clock, rtl/cdc, and rtl/memory. Existing interfaces remain at their
legacy paths for current users in the IP workspace.
make doctor
make license-check
make format-check
make docs-check
make test-iverilog
make test-verilator
make synth
make formal
flist/rtl.f is the ordered synthesis/simulation source list. Unit tests are
self-checking and write only below build/. format-check validates all
tracked SystemVerilog sources with Verible and tracked Makefile sources with
mbake using .bake.toml. docs-check verifies that every declared RTL unit
has a maintained reference page. See docs/reference/ for the full catalog,
docs/design.md for contracts, and AGENTS.md for contribution rules.
license-check requires every tracked SystemVerilog source to carry an SPDX
identifier or an upstream license notice in its first 40 lines.
rtl/utils/register.sv keeps the existing module names as a compatibility
surface. Select the primitive by clock edge, reset style, reset value, and
enable requirement:
| Primitive family |
Clock edge |
Reset |
Enable |
dff |
rising |
none |
no |
dffl |
rising |
none |
yes |
dffr, dffer |
rising |
asynchronous active-low, zero |
no / yes |
dffrh, dfferh |
rising |
asynchronous active-low, all ones |
no / yes |
dffrc, dfferc |
rising |
asynchronous active-low, configurable |
no / yes |
dffsr, dffesr |
rising |
synchronous active-low, zero |
no / yes |
dffsrc, dffesrc |
rising |
synchronous active-low, configurable |
no / yes |
ndffr, ndffer |
falling |
asynchronous active-low, zero |
no / yes |
dfferm |
rising |
asynchronous active-low, per-array policy |
per element |
Reset has priority over enable. A low enable holds the previous value. The
dffercn type-parameterized asynchronous-reset variant remains for existing
users; new fixed-width code should prefer dfferc. Register enable expresses
data retention semantics. It does not guarantee clock-gate insertion; use the
Common clk_icg/technology ICG wrapper at module level when clock gating is
required and verify the mapped gate-level netlist.
The repository is licensed under Mulan PSL v2 unless an individual source file
states another compatible upstream license. Third-party attributions and license
notices are recorded in NOTICE and licenses/.
The repository-level Mulan PSL v2 license applies unless an
individual source file declares a compatible upstream license. Per-file
copyright and SPDX notices take precedence. The following table is a concise
attribution guide; NOTICE,
licenses/README.md, and source headers are the
authoritative records.
Each declared RTL unit has a detailed integration page. The catalog is generated from rtl/; use the linked page for parameters, complete interfaces, reset/CDC constraints, and an instantiation example.
| Component |
Type |
Function summary |
address_map |
module |
Masked address-map decoder with deterministic lowest-index priority. |
address_range_decoder |
module |
Inclusive address-range decoder. |
address_region |
module |
Masked address-region matcher. |
address_set_decoder |
module |
Decoder for a set of independently configured address regions. |
axi4_regslice |
module |
Elastic register slice for all five AXI4 channels. |
| Component |
Type |
Function summary |
clock_divider |
module |
Runtime-programmable divider that changes only at an output-low boundary. |
clock_or_tree |
module |
OR tree for clocks already proven safe to combine. |
safe_clock_mux |
module |
Glitch-safe handover mux for two continuously running clocks. |
| Component |
Type |
Function summary |
ahbl_if |
interface |
Typed AHB-Lite interface with master and slave modports. |
apb4_if |
interface |
Clocked APB4 interface with master and slave modports. |
apb4_pure_if |
interface |
Clockless APB4 signal interface with master and slave modports. |
axi4_addr_gen |
module |
AXI4 next-address generator for FIXED, INCR, and legal WRAP bursts. |
axi4_if |
interface |
Typed AXI4 interface with master and slave modports. |
axi4_stream_if |
interface |
Typed AXI4-Stream interface with source, sink, and monitor modports. |
ram_if |
interface |
Simple RAM request/response interface with master and slave modports. |
ready_valid_if |
interface |
Typed ready/valid interface with source, sink, and monitor modports. |
ribp_if |
interface |
RIBP request/response interface with response-error signaling. |
| Component |
Type |
Function summary |
circular_store |
module |
Sequential circular store with bounded random reads. |
memory_bank_adapter |
module |
Public banked-memory request and response adapter. |
memory_bank_adapter_detail |
module |
Banked-memory request splitter and response gatherer. |
sync_memory |
module |
Portable synchronous memory model with positive-logic controls. |
tag_order_queue |
module |
Shared-pool queue preserving FIFO order within each tag. |
| Component |
Type |
Function summary |
apb4_master_model |
module |
Simulation APB4 master model. |
| Component |
Type |
Function summary |
clk_an2 |
module |
Behavioral two-input clock AND model. |
clk_buf |
module |
Behavioral clock buffer model. |
clk_icg |
module |
Behavioral integrated clock-gate model. |
clk_icg2 |
module |
Behavioral two-input integrated clock-gate model. |
clk_mux2 |
module |
Behavioral two-input clock mux model. |
clk_n |
module |
Behavioral clock inverter model. |
clk_nd2 |
module |
Behavioral two-input clock NAND model. |
clk_xor2 |
module |
Behavioral two-input clock XOR model. |
osc_pad_h |
module |
Horizontal oscillator pad abstraction. |
osc_pad_v |
module |
Vertical oscillator pad abstraction. |
tech_pll |
module |
Technology PLL abstraction. |
tech_ram |
module |
Behavioral single-port technology RAM model. |
tech_ram_bm |
module |
Behavioral byte-masked technology RAM model. |
tech_regfile |
module |
Behavioral technology register-file model. |
tech_regfile_bm |
module |
Behavioral byte-masked technology register-file model. |
tri_pd_pad_h |
module |
Horizontal pull-down pad abstraction. |
tri_pd_pad_v |
module |
Vertical pull-down pad abstraction. |
tri_pdu_pad_h |
module |
Horizontal pull-down-up pad abstraction. |
tri_pdu_pad_v |
module |
Vertical pull-down-up pad abstraction. |
tri_pu_pad_h |
module |
Horizontal pull-up pad abstraction. |
tri_pu_pad_v |
module |
Vertical pull-up pad abstraction. |
| Component |
Type |
Function summary |
bin2gray |
module |
Combinational binary-to-Gray code converter. |
dff |
module |
Plain D flip-flop primitive. |
dffer |
module |
Enabled D flip-flop with asynchronous reset. |
dfferc |
module |
Enabled D flip-flop with configurable reset value. |
dffercn |
module |
Enabled D flip-flop with active-low configurable reset value. |
dfferh |
module |
Enabled D flip-flop with all-one reset value. |
dfferm |
module |
Masked-update D flip-flop with reset. |
dffesr |
module |
Enabled D flip-flop with synchronous reset. |
dffesrc |
module |
Enabled D flip-flop with synchronous reset and configurable reset value. |
dffl |
module |
Level-sensitive latch primitive. |
dffr |
module |
D flip-flop with asynchronous active-low reset. |
dffrc |
module |
D flip-flop with configurable reset value. |
dffrh |
module |
D flip-flop with all-one reset value. |
dffsr |
module |
D flip-flop with synchronous reset. |
dffsrc |
module |
D flip-flop with synchronous reset and configurable reset value. |
edge_det |
module |
Single-bit rising and falling edge detector. |
edge_det_fe |
module |
Single-bit falling-edge detector. |
edge_det_re |
module |
Single-bit rising-edge detector. |
edge_det_sync |
module |
Synchronized single-bit rising and falling edge detector. |
edge_det_sync_fe |
module |
Synchronized single-bit falling-edge detector. |
edge_det_sync_re |
module |
Synchronized single-bit rising-edge detector. |
fifo |
module |
Power-of-two synchronous FIFO with combinational head read. |
gray2bin |
module |
Combinational Gray-to-binary code converter. |
lfsr_fibonacci |
module |
Fibonacci-form pseudo-random linear-feedback shift register. |
lfsr_galois |
module |
Galois-form pseudo-random linear-feedback shift register. |
ndffer |
module |
Enabled D flip-flop with falling-edge clock and asynchronous reset. |
ndffr |
module |
Resettable multi-stage synchronizer register chain. |
regfield |
module |
Masked register-field update primitive. |
shift_reg |
module |
Parameterized sequential shift register. |
spill_register |
module |
Two-register spill stage for breaking ready timing paths. |
stream_fifo |
module |
Legacy valid/ready wrapper around the synchronous FIFO. |
valid_delay_line |
module |
Valid-only parameterized sequential delay line. |
xchecker |
module |
Simulation unknown-value checker. |