TO Be coming

Showing posts with label lint. Show all posts
Showing posts with label lint. Show all posts

Sep 29, 2017

Synchronizers list dump using SpyGlass Tool

How to Dump the Synchronizer Cell List in SpyGlass CDC

In complex multi-clock SoC designs, identifying, auditing, and validating all Clock Domain Crossing (CDC) synchronizer cells is a critical sign-off step. Relying on manual inspection is error-prone. Fortunately, Synopsys SpyGlass provides highly automated mechanisms to discover and dump a comprehensive list of all identified synchronizers into a structured report file.

However, since every ASIC or FPGA design handles clock domains differently, out-of-the-box settings may miss structural synchronizers or produce overly pessimistic violations. Fine-tuning your SpyGlass project setup is usually required to generate a clean, reliable structural report.

Custom Goals vs. Standard CDC Goals

To dump your synchronizer list, you have two primary implementation paths in your SpyGlass project file (.prj):

  • Modify a standard goal: Append specific report and dump options directly to an existing CDC goal (like cdc/cdc_verify_struct).
  • Define a custom goal: Create a dedicated, lightweight evaluation goal that runs only the rules required for tracking synchronizers. This saves significant compilation time during iterative debug cycles.

SpyGlass Project File Setup (Design1.prj)

# =========================================================================
# Custom Goal Definition for Synchronizer Discovery and Reporting
# =========================================================================
define_goal custom_sync_dump -policy {clock-reset} {

    ## Enable only the essential structural rules to discover data crossings
    set_goal_option rules { Ac_unsync01 Ac_unsync02 Ac_sync01 Ac_sync02 }

    ## Configure output reports: SynchInfo captures the structural dump file
    set_goal_option report { SynchInfo moresimple }

    ## Specify wildcards for the tool to recognize hardcoded or custom cells
    set_parameter synchronize_cells "*sync1*, *sync2*"
    set_parameter reset_synchronize_cells "*rst_sync*" 

    ## Core control parameter to force detailed dump generation
    set_parameter dump_sync_info detailed

    ## Optional Handling for Complex Topologies
    set_parameter allow_combo_logic yes 
    set_parameter allow_merged_qualifier yes

    ## Pessimism Reduction & Advanced Analysis Controls
    set_parameter enable_and_sync yes 
    set_parameter cdc_reduce_pessimism all
    set_parameter strict_sync_check yes
    set_parameter enable_debug_data yes
}

Key Parameter Breakdown Explained

To get the most out of your report, it helps to understand what these parameters instruct the underlying SpyGlass engine to do:

  • dump_sync_info detailed: The most crucial configuration line. This commands SpyGlass to populate the SynchInfo report with exact cell names, hierarchies, source domains, and destination domains.
  • synchronize_cells & reset_synchronize_cells: Tells the structural engine which custom library cells or module design patterns represent valid synchronizers. Wildcards (*) are allowed.
  • allow_combo_logic yes: Useful if your design features static multiplexers, clock-gating or configuration masking logic sitting right before the synchronizer flop. It prevents the tool from invalidating the crossing due to combinational logic.
  • allow_merged_qualifier yes: Required when a control/data signal originates from different source elements before converging on a single synchronizer cell. It evaluates the crossing assuming the source components are quasi-static.
  • cdc_reduce_pessimism all: Forces the tool to actively filter out redundant or false violations, ensuring only genuine clock domain crossings are analyzed and logged.

A Practical Example: Verilog Code vs. SpyGlass Parameters

Consider the following simple design snippet handling an asynchronous data bus bit crossing alongside an asynchronous reset tree:

// Data Path Synchronizer
module data_sync1 (
    input  wire clk_b,
    input  wire data_in_clka,
    output reg  data_out_clkb
);
    reg sync_ff1;
    always @(posedge clk_b) begin
        sync_ff1      <= data_in_clka;
        data_out_clkb <= sync_ff1;
    end
endmodule

// Reset Path Synchronizer
module rst_sync_macro (
    input  wire clk_b,
    input  wire async_rst_n,
    output reg  sync_rst_clkb_n
);
    reg rst_ff1;
    always @(posedge clk_b or negedge async_rst_n) begin
        if (!async_rst_n) begin
            rst_ff1         <= 1'b0;
            sync_rst_clkb_n <= 1'b0;
        end else begin
            rst_ff1         <= 1'b1;
            sync_rst_clkb_n <= rst_ff1;
        end
    end
endmodule

How the parameters match this code:

  1. The instance of data_sync1 matches the *sync1* pattern inside the synchronize_cells parameter.
  2. The instance of rst_sync_macro matches the *rst_sync* pattern inside the reset_synchronize_cells parameter.
  3. When you run the custom_sync_dump goal, SpyGlass will capture these matched instances along with their source clock metadata and dump them safely into the generated SynchInfo file inside your workspace directory.

Using this structured method guarantees your design review team has a verifiable, single source of truth for all cross-domain paths in the SoC.

Hope this information is useful to you! Comment or email me if you need any support on setting up custom goals or handling tricky CDC patterns in SpyGlass.

Sep 22, 2017

SpyGlass Custom Goal setup


This page will give you info to set the custom goal for the spyglass.

In the PRJ file, you can set the goal.


<Test.prj>


define_goal <GOAL_NAME>  -policy (clock-reset} {
  set_goal_option rules { Ac_unsync01 Ac_sync01 }
  set_goal_option report { SynchInfo }
  set_parameter dump_sync_info detailed
  set_parameter allow_combo_logic yes  
  set_parameter allow_merged_qualifier yes
  set_parameter enable_and_sync yes
  set_parameter cdc_reduce_pessimism +ignore_multi_domain
}

In the custom goal , you can define the parameters/option specific to goal only.

How to run the custom goal :

You can run the custom goal by giving below command.

spyglass -project <Test.prj> -goal <GOAL_NAME> -batch

TCL scripting WorkFlow

# Specify the base GuideWare or custom methodology path
set met_path "/path/to/your/GuideWare/block/rtl_handoff"
set goal_name "my_custom_lint_goal"

# Bind and configure the goal
configure_lint_methodology -path $met_path -goal $goal_name
configure_lint_setup -goal $goal_name

# Add rules/parameters dynamically
set_parameter top your_top_level_module
read_file -top your_top_level_module -format verilog filelist.f

# Execute and report
check_lint
report_lint -file custom_report.txt -verbose

#VCSpyglass Lint 
# RTLLinting 
#SpyGlassStaticAnalysis

Recommended Resource

RTL Digital Design Resource Map

Explore a complete sitemap covering 150+ articles across 22 comprehensive sections. Find everything on VLSI, Verilog, Digital Design, protocols, and interview preparation in one place.

Explore the Resource Map

SiteMap