Access Denied

You do not have an active subscription for the CDC Masterclass.

View Courses
CDC Course / Module 9: CDC Verification & Simulation
Lesson 9.1

Naming Conventions & Design Partitioning

In modern silicon design, a typical System-on-Chip (SoC) might have dozens or even hundreds of asynchronous clock domains. The complexity of managing these boundaries is immense. However, experienced silicon architects manage this complexity through rigorous discipline in two areas: Design Partitioning and Naming Conventions.

1 The One-Clock-Per-Module Rule

The golden rule of professional CDC design methodology is simple but absolute:

The One-Clock Rule:
Every functional, synthesizable module should operate entirely within exactly one clock domain. If data must pass between domains, a dedicated synchronizer sub-module must be instantiated at the boundary.

Why is this so critical? When a single module mixes flip-flops driven by different clocks, it becomes exceedingly difficult for synthesis tools, formal verification engines (like SpyGlass CDC), and human reviewers to untangle the logic. By keeping logic purely synchronous within a module and localizing CDC to distinct boundary modules, we make the design predictable.

2 Hierarchical Partitioning Diagram

Observe how a cleanly partitioned SoC handles multi-clock boundaries. Notice that the core logic modules (`Core A`, `Core B`, `Core C`) never see clocks from other domains. Only the interface/synchronizer modules deal with multiple clocks.

SoC Top Level Domain A (clk_a) Core Logic A Domain B (clk_b) Core Logic B Domain C (clk_c) Core Logic C CDC Sync (A → B) FIFO / 2FF CDC Sync (A → C) Handshake

3 Mandatory Naming Conventions

Without strict naming conventions, tracing a signal across a multi-million gate design to verify its synchronicity is impossible. Signals, ports, and modules must self-document their clock domain affiliation.

A standard convention follows the format <clock_domain>_<signal_name>_[suffix].

Pattern Usage Example
clk_<domain> The clock signal itself for a given domain. clk_axi, clk_dsp
<domain>_* Any synchronous signal residing purely in that domain. axi_awvalid, dsp_result
*_meta The metastable output of the first flip-flop in a synchronizer. dsp_trigger_meta
*_sync The safely synchronized output of a synchronizer chain. dsp_trigger_sync
*_async An asynchronous input arriving from another domain before synchronization. axi_req_async
WARNING: The #1 Cause of Silicon Respins Mixing clock domains silently inside a single massive module without naming conventions means EDA tools might optimize away CDC structures, or timing constraints might be applied incorrectly. This is the leading cause of field failures and expensive silicon respins due to metastability.

4 Impact on Static Timing Analysis (STA)

Static Timing Analysis (STA) tools (like Synopsys PrimeTime or Vivado) attempt to analyze timing paths between all flip-flops in a design. If a path crosses from `clk_a` to `clk_b`, the tool will try to meet timing as if it were a synchronous path.

We must tell the STA tool to ignore these asynchronous paths using set_false_path, or to bound the delay using set_max_delay -datapath_only.

When you follow strict naming conventions, writing these Synthesis Design Constraints (SDC) becomes trivial and wildcard-friendly:

filename.v
# SDC/XDC Constraint Examples using Naming Conventions
# Safely ignore all paths crossing from domain A to domain B's async inputs
set_false_path -from [get_clocks clk_a] -to [get_pins *clk_b_*_meta_reg/D]

# Datapath-only constraint for a CDC FIFO gray pointer crossing
set_max_delay -datapath_only -from [get_cells *clk_a_wptr_reg*] \
                             -to   [get_cells *clk_b_wptr_meta_reg*] 5.0

If you don't use naming conventions, you are forced to write hundreds of individual cell constraints, which are prone to human error and break easily when the design is refactored.

5 Worked Example: Bad vs. Good Partitioning

Bad Partitioning (Spaghetti Design)

In this example, the module takes two clocks and blindly mixes them. It is very hard to visually inspect if flag_out is safe to use in the TX domain.

filename.v
module data_processor (
    input  wire rx_clk,
    input  wire tx_clk,
    input  wire rx_data_en,
    output reg  flag_out
);

    reg rx_active;
    
    always @(posedge rx_clk) begin
        rx_active <= rx_data_en;
    end

    // DANGER: Direct use of rx_active in tx_clk domain! (Metastability risk)
    always @(posedge tx_clk) begin
        flag_out <= rx_active; 
    end
endmodule

Good Partitioning (Methodological Design)

Here, the processing module only sees the RX clock. The CDC is explicitly handled by a dedicated synchronizer module at the top level, and naming conventions make the intent crystal clear.

filename.v
// 1. Synchronous Core Module (Single Clock Only)
module rx_processor (
    input  wire clk_rx,
    input  wire rx_data_en,
    output reg  rx_active
);
    always @(posedge clk_rx) begin
        rx_active <= rx_data_en;
    end
endmodule

// 2. Dedicated 2-Flop Synchronizer Module
module cdc_sync_2ff (
    input  wire clk_dest,
    input  wire async_in,
    output reg  sync_out
);
    // (* ASYNC_REG = "TRUE" *) for Vivado/Synthesis mapping
    reg meta;
    always @(posedge clk_dest) begin
        meta     <= async_in;
        sync_out <= meta;
    end
endmodule

// 3. Top Level Instantiation
wire rx_active;
wire tx_active_sync;

rx_processor u_rx_proc (
    .clk_rx(clk_rx),
    .rx_data_en(rx_data_en),
    .rx_active(rx_active)
);

cdc_sync_2ff u_sync_rx_to_tx (
    .clk_dest(clk_tx),
    .async_in(rx_active),
    .sync_out(tx_active_sync)
);

Key Takeaway

Disciplined design partitioning and naming conventions are not just aesthetic choices. They are essential architectural methodologies that enable EDA tools to accurately synthesize, analyze, and verify asynchronous boundaries. Adopt the One-Clock-Per-Module rule to ensure zero metastability failures in your production silicon.

← Previous: 1-Deep / 2-Register FIFO Synchronizer Next: Gate-Level X-Propagation Issues →
Advertisement