Search This Blog

Saturday, November 30, 2019

Uncertainty

Uncertainty:
Uncertainty is nothing but the combination of skew, jitters and PD margins is called as Uncertainty
At Placement stage 

Setup uncertainty:
Take uncertainty with the combination of skew (5 to 10% of clock period) + jitter (1% of clock period) + Pd extra margin (50ps) for setup

Hold Uncertainty:
Take uncertainty with the combination of skew (5 to 10% of clock period) + Pd extra margin (10 to 15ps) for hold jitter won't be there, in hold uncertainty because they hold does not depend up clock period

At Clock Tree Synthesis
Setup uncertainty:
Take uncertainty with the combination of jitter (1% of clock period) + Pd extra margin (50ps) for setup

Hold Uncertainty:
Take uncertainty value-based on Pd extra margin (10 to 15ps) for setup jitter won't be there in hold uncertainty because they hold does not depend up clock period

After propagating the clock skew will be Met so skew is 0
Routing
Remove entire uncertainty value from the SDC


foreach_in_collection  clk [all_clocks] {set_clock_uncertainty -setup 1.3 $clk}

foreach_in_collection  clk [all_clocks] {set_clock_uncertainty -hold 1.2 $clk}
get_property [all_clocks] set_uncertainty
get_property [all_clocks] hold_uncertainty

setAnlaysisMode -check_type setup
get_property [all_clocks] set_uncertainty

setAnlaysisMode -check_type hold
get_property [all_clocks] hold_uncertainty

clock transition and input transition

set_input_transition 0.5 [get_ports port_name]
set_clock_transition 0.5 clk

Duty cycle = Active pulse width / entire clock period
what is the duty cycle of a clock with the period of 10, and the waveform is {2 7}

Duty cycle = {falling edge -rising edge} / clock period

clock jitter:
from cycle to cycle clock period and duty cycle can change slightly due to clock generation circuitry
is called as jitter

skew: the difference in clock arrival time is called skew

Multiple clock domains:
worst-case data transfer:
  1. find the LCM of both the clock periods
  2. align the clock rising edge of both clocks
set_max_delay -from [all_registers -clock clk1 -clock_pins] -through U10/Y -to [all_registers -clock clk1 -clock_pins] 2 -combinational_from_to

report_timing --from [all_registers -clock clk1 -clock_pins] -through U10/Y -to [all_registers -clock clk1 -clock_pins] -path_type full_clock

Drive adjustment: The difference between the rise delay with load -rise delay with zero load

Script to report of the endpoints and startpoints slack of top 1000 failing paths
set rpt [report_timing -max_paths 1000 -max_slack 0 -collection]
foreach_in_collection r $rpt { puts "Endpoint: [get_property [get_property $r capturing_point] hierarchical_name] \t Startpoint: [get_property [get_property $r launching_point] hierarchical_name] \t Slack: [get_property $r slack]" }
Output:

Synopsis design constrains

Example SDC File:
create_clock  -name SYS_CLK -period 10 -waveform {0 0.5} [get_ports PORT_NAME]
create_generated_clock  -name GEN_SYS_CLK -source PORT_NAME  -divide_by 2 
create_clock -name V_SYS_CLK -period 10 -waveform {0 5}
set_input_delay -max 3 -clock SYS_CLK [get_ports port_name]
set_output_delay -max 7 -clock SYS_CLK [get_ports port_name]
set_max/min_delay -max 3 -clock SYS_CLK [get_pins Pin_name]
set_multicycle_path -setup 3 -from [get_clocks CLK1] -to [get_clocks CLK2]
set_multicycle_path -hold 2 -from [get_clocks CLK1] -to [get_clocks CLK2]
set_driving_cell -lib_cell BUFX2  [get_ports Port_name]
set_load 0.9 [get_ports out[10]]
set_case_analysis 1 [get_ports SE]
set_case_analysis 0 [get_port TM]
set_dont_use [get_lib_cells RAM2P_128x16_ss_1v08_125c_syn/RAM2P_128x16]
set_propagated_clocks [get_clocks*]
set_disable_timing [get_cells cell_name]
set_clock_uncertainty 0.250 -setup [get_clocks CLK]
set_clock_uncertainty 0.100 -hold [get_clocks CLK]
set_max_delay 5.0 [get_ports port_name]
set_load 2 [get_ports port_name]
set_input_transition 1.0 -clock clk [get_ports port_name]

Synthesis

Synthesis

Tools used: Genus/RC compailer
What is Synthesis
  • Synthesis is a process of converting RTL code to Gate_level_netlist is called synthesis
Why Synthesis:
  • To manufacture the behavioral code ,so we are converting to Gate level netlist
Inputs to Synthesis 
  • Libraries
  • SDC
  • RTL code (synthesizable)
  • technology File
  • Lef file
Outputs of Synthesis
  • Synthesized SDC 
  • Synthesized Netlist (.v)
Goals of Synthesis
  • To get a gate level Netlist
  • Inserting clock gates
  • Logic optimization
  • Inserting DFT logic
  • Logic equivalence between RTL 
  • The area will decide (area got reduced by doing the optimization)
  • Gate count will decide (based on the logic and optimization process)
create a File with the name of flist we will include the all the Verilog netlists like top module sub-module netlists the below web address do point out the flist file

https://nagarajuphysicaldesign.blogspot.com/2019/11/flist.html

create one sdc file and you can define the clock in that file at clock port like
create_clock -name clk -period 10 -waveform {0 5}  [get_ports clock_port name}
the below path will address the sdc file

https://nagarajuphysicaldesign.blogspot.com/2019/11/synopsis-design-constrains.html

> genus -f scripts

after the synthesis it will provide the synthesized netlist, we will do the sanity checks in Genus for timing as well as design-related checks
  1. Check_timing
  2. Check_design 
  • In flist file keep top-level netlist first and run the synthesis 
  • genus provides the unresolved references for sub-modules which are defined in Top-level netlist
  • 100% genus will provide the unresolved reference for all submodules which are defined in top module 
  • If genus doesn't provide the unresolved references for specific submodule please check the netlist, if is there any ifdef statements are presented or not
  • If the top-level netlist has ifdef statement is defined before for that particular submodule genus won't provide the unresolved references for that submodule you can define the ifdef statement name in scripts file by the following command
  • read_hdl -f flist -define {"abcd" "efgh"}  
  • If you get the unresolved references in the design you can include that module netlist in the flist file and re_run the synthesis until to clear the unresolved references.
  • If your design has more flops you can create the block boxes 
  • first, check for a two-dimensional array (2D_register) are there  in Verilog netlists, in netlist path, if the register count is more than two hundred  you can create it as a block box
  • You can create an empty module for that and include in flist and rerun the synthesis, and it provides the empty module
  • this empty module consists of the only module, instance name input-output and inout information it does not has any information 
Process of Synthesis
  1. Translation
  2. Mapping
  3. Optimization
  • If your design has constants you can remove by placing the buffers without any optimization
llength [get_db ports -if {.direction==in}]
llength[ [get_db ports -if {.direction==out}]
report_timing -lint .... will give the unconstrained path details

1. Translation:
  • Process of converting behavioral code to generic Boolean algebra, It is a technology independent
  • For Gtech library we don't have timing inforamtion
2. Mapping
  • Selecting the suitable cell from the Technology library it is technology dependent based on input tool will pick the suitable cell from the lib
3. Optimization:
  • Optimize the logic ,it will remove the  redundancy logic will be deleted
  • Tool will optimize for the area power and performance.
4. Empty module:
  • It has only inputs and outputs information, it doesn't have any logic inside the module definition.
5.Unresolved references
  • Module definition is present but timing library is missing is called unresolved references 
6.Block_Box
  • Macros are block boxes ,there is no functional information but it has timing info 

7.Elaborate:

  • Translate the design into its GTECH representation
  • Allows changing the parameters values defined in the source code replace the HDL arithmetical operators in the code with the design ware component
  • It will check for the sub modules in the Top module ,if there are any gate-level netlists read in with the RTL files, Genus automatically links the cells to their references in the technology library during elaboration.
  • It links the design automatically

8).link:  It will link the Design

9). what happens during optimization techniques

  • Path adjustment
  • Path grouping
  • Re-timing
  • Tns optimization
  • Ungrouping

10). What are the different stages of Optimization in synthesis

  • Architectural optimization
    • Sharing the sub expressions
    • Sharing the resources
    • Selecting the design ware components
    • After completion of this optimization  design is represented GTECH format
  • Logical optimization 
    • Will do Boolean algebraic optimization
  • Gate level Optimization
    • During this stage the logic is converted to logical gate level netlist
  • Incremental optimization
    • redundancy logic will converted to equivalent gate

11). What is retiming
  • Retiming is an advanced optimization technique where registers are re-positioned to reduce cycle time or area without changing the input-output latency of the design. 
  • This technique is best fitted for a design that can be pipe lined. 
  • The drawback of this technique is, possible problem in formal verification.
  • Retiming can be enabled at the top level or selective modules using the ‘retime’ attribute.
  • Retiming can recover sequential area from a design with both easy to meet timing goals and a positive slack from the initial synthesis.
  • Retiming a design that does not meet timing goals after the initial synthesis could impact total negative slack: the paths with the better slack can be “slowed down” to the range of worst negative slack
12).Path Adjust
  • Tightening the constraint on a selective path will make the path become more critical and force Genus to work harder on it. 
  • This trick can help closing timing for a small number of violating paths. 
  • The following constraint needs to be set before mapping
  • path_adjust -delay <> -from -to 
6).Boundary Optimization:
  • Propagation of constant across the boundary
  • Propagation of equal and opposite information across the hierarchy
  • propagation of unconnected Port information across hierarchy
  • Pushing of inverters across the hierarchy
13).Ungrouping :
  • ungrouping merges the sub design of a given hierarchy into the parent cell or design ,it removers the hierarchical boundaries and allows design compiler to improve the timing by reducing the levels of logic and to improve the area and sharing logic
Few commands :
  • check_timing_intent
  • checkDesign -all
https://www.blogger.com/blog/post/edit/7948084828664881049/3698505313912971628#

Flist

/root/users/username/design/synthesis/rtl/verilog/submodulename.v
/root/users/username/design/synthesis/rtl/verilog/sub_modulename.v
/root/users/username/design/synthesis/rtl/verilog/design_name_Top.v

Representation of the Parasitic

Parasitic representation

DSPF: Detailed standard parasitics Format
RSPF: Reduced standard parasitics Format
SPEF: Standard parasitic extraction Format
  • Standard parasitics Extraction Format interconnect parasitics depend on process. SPEF supports the specification of best-case, typical, and worst-case values. 
  • These triplets are allowed for R, L and C values, port slews and loads. By providing a name map consisting of a map of net names and instance names to indices, the SPEF file size is made effectively smaller, and more importantly, all long names appear in only one place.
DSPF: Detailed standard parasitics Format:
  • Detailed parasitics are represented in SPICE format, SPICE Comment statements are used to indicate the cell type, pin capacitance
  • The resistance and capacitance values are in standard SPICE syntax and the cell instantiations are also included in this representation. 
  • Merits:
    • DSPF file can be used as an input to a SPICE simulator itself. 
  • Drawback
    • The DSPF syntax is too detailed and verbose with the result that the total file size for a typical block is very large.
RSPF: Reduced standard parasitics Format
  • These parasitics are represented in reduced format and it involves in voltage-controlled current sources.
  • Detailed parasitics are reduced and mapped into Reduced format it can be read into SPICE Simulators
  • Drawbacks:
    • Not represented for bidirectional signal flow














Monday, November 11, 2019

Assign statements

Netlist
If your Netlist has assign statements tool doesn't understand these statements, so you have to remove the assign statements by setting the below command/ replace the constants with buffers /add tie_cells
  • set init_remove_assigns 1
The tool will replace the assigns with buffer
  1. The default behavior of Verilog writer in innovus is to skip unconnected pins when writing out a Verilog netlist
  2. setExportMode -fullPinout true
  3. saveNetlist
How to remove assign statements that involve inout ports
The assign statement, in this case, can be removed using the insert_io_buffers utility
command:


  • insert_io_buffers -isolate_top outs
  • Removes assigns that involve only internal "wires".
    For example, in the code below, assign n2 = n1 is removed.
    module top();
      wire n1, n2;
      assign n2 = n1;
      BUFX2 u1(.Y(n1));
      BUFX2 u2(.A(n2));
      endmodule
    becomes
    module top();
      wire n1;
      BUFX2 u1(.Y(n1));
      BUFX2 u2(.A(n1));
      endmodule
  • Removes assigns that involve only one port.
    For example, in the code below,  assign p1 = n1  is removed.
      module hier(p1);
      output p1;
      wire n1;
      assign p1 = n1;
       BUFX2 u1(.Y(n1));
      endmodule
    becomes
      module hier(p1);
      output p1;
       BUFX2 u1(.Y(p1));
      endmodule

  • Rewires nets with feedthrough assigns that involve at least two ports, at some higher level:
    module hier2 (
              i,
              o);
         input i;
         output o;
         assign o = i ;
         BUFX2 u1 (.A(i));
      endmodule
      module hier (
              i,
              o);
         input i;
         output o;

         hier2 u1 (.i(i),
              .o(o));
      endmodule
      module top ();
         // Internal wires
         wire i;
         wire o;
         BUFX2 u1 (.Y(i));
         hier u2 (.i(i),
              .o(o));
         BUFX2 u3 (.A(o));
      endmodule

    becomes

    module hier2 (
              i,
              o);
         input i;
         output o;

         BUFX2 u1 (.A(i));
      endmodule
      module hier (
              i,
              o);
         input i;
         output o;
         hier2 u1 (.i(i));
      endmodule
      module top ();
         // Internal wires
         wire i;

         BUFX2 u1 (.Y(i));
         hier u2 (.i(i));
         BUFX2 u3 (.A(i));
      endmodule

Wire Load Models

NLDM: (Non-Linear Delay Model)

These NLDM models have been utilized when the effect of interconnect resistance is small. In the presence of resistive interconnect, the delay calculation methodologies retrofit the NLDM models by obtaining an equivalent effective capacitance at the output of the cell.

CCS Wire load Model
The given input transition time and output load, the output current waveform as a function of time is available.

Friday, November 1, 2019

Macro Placement Guide lines

Macro Placement Guidelines

  • Fly-line Analysis (For Connectivity information)
  • Macro keep-out (For Uniform Standard Cell Region)
  • Channel Calculation (Critical for Congestion and Timing)
  • Avoid the odd-shaped area for Standard Cells
  • Funnel-shaped Macro Placements are preferred
  • Fix the Macro locations, so that tool won't alter during Optimization
  • Place macros around the chip periphery, so that core area will be clustered
  • Consider connections to fixed cells when placing Macros
  • In Advanced Technology Nodes Macro Orientation is fixed since the Poly Orientation can’t vary, so there will be restrictions in Macro Orientation
  • Reserve enough room around Macros for IO Routing
  • Reduce open fields as much as possible
  • Provide necessary Blockages around the Macro

Congestion and It's reduction Techniques

Congestion

Congestion: If the number of routing tracks available for for routing in one particular area is less than the required routing tracks then the area said to be congested.
Congestion : Required Tracks/Available Tracks

10/5 in a 2D congestion map : There are 10 routes that are passing through a particular edge of a Global Route Cell (GRC), but there are only 5 routing tracks available. There is an overflow of 5.

Two major categories: Global Congestion and Local Congestion

Global Congestion: This occurs when there are a lot of chip-level or inter-block wires that need to cross an area.
Local Congestion: This occurs when the floorplan has macros and other routing blockages that are too close together to get enough routes through to connect to the macros

Causes for Routing Congestion:
  1. Missing Placement Blockages
  2. Inefficient floor plan
  3. Improper macro placement and macro channels (Placing macros in the middle of floor plan etc.)
  4. Floorplan the macros without giving routing space for interconnection between macros
  5. High Cell Density (High local utilization)
  6. If your design had more number of AOI/OAI cells you will see this congestion issue
  7. Placement of standard cells near macros
  8. High pin density on one edge of block
  9. Too many buffers added for optimization
  10. No proper logic optimization
  11. Very Robust Power network
  12. High via density due to dense power mesh
  13. Crisscross IO pin alignment is also a problem
  14. Module splitting
Congestion Reduction Techniques:
  1. Add placement Blockages in channels and around macro corners
  2. Avoid fly line Crisscrosses
  3. Review the macro placement
  4. Apply the cell padding (If congestion due to pin density)
  5. Apply the Partial blockage (If congestion due to cell density ) 
  6. Reduce local cell density using density screens 
  7. Reordering scan chain to reduce congestion 
  8. Congestion driven placement with high effort 
  9. Continue the iterations until good congestion results 
  10. Density screen is applied to limit the density of standard cells in an area to reduce congestion due high pin density

Floor Plan Flow

Floor Plan Flow

Floor plan Steps:
  1. Aspect Ratio
  2. Utilisation
  3. IO clearance
  4. Channel Spacing
  5. Offset Value
  6. Macro Placement
  7. Channel Spacing 
  8. Alignment of Macros
  9. Use Proper Blockages
  10. IO Pin Assignment
  11. Add End caps
  12. Add Well Taps
Floor plan Reports
  1. checkFPlan -reportUtil
  2. checkPlace
  3. Check_timing -verbose
  4. CheckNetlist
  5. CheckUnique
  6. Report_qor
  7. Report_timing
  8. checkPinAssignment
  9. checkDesign -all
  10. report_constraints
  11. all_analysis_views
  12. report_analysis_summary

How To fix the Hold time violations

Hold time violations fixing Techniques

The following techniques are used to fix the Hold time violations
  1. Down-size the cell
  2. LVT to HVT conversion
  3. Add Delay cell on Data path
1).Down-size the buffer
  • get_cells
  • get_lib_cells -of_object cell_name  (which cell you want to down-size NOR4X0_HVT)
  • get_alternative_lib_cells cell_name
  • size_cell cell_name saed32hvt_ff1p16vn40c/NOR2X0_HVT (corresponding cell name along with Library )
2).LVT to HVT conversion
  • get_cells
  • get_lib_cells -of_objects U453 (cell name NOR4X0_LVT)
  • size_cell U453 NOR4X0_HVT  (U453 instance name of the cell)
3).Add Delay cell on Data path
  • insert_buffer net_name DELX4
Note: Here cell name means Instance name

SETUP TIME Violations fixing Techniques

SETUP TIME Violations fixing Techniques

The following techniques are used to fix the Setup time violations
  1. Up-size the cell
  2. HVT to LVT conversion
  3. Add buffer on Data path
1).Up-size the buffer
  • get_cells
  • get_lib_cells -of_object cell_name  (which cell you want to up-size NOR2X0_HVT)
  • get_alternative_lib_cells cell_name
  • size_cell cell_name saed32hvt_ff1p16vn40c/NOR4X0_HVT (corresponding cell library with cell name )
2).HVT to LVT conversion
  • get_cells
  • get_lib_cells -of_objects U453 (cell name NOR4X0_LVT)
  • size_cell U453 NOR4X0_LVT  (U453 Instance name)
3).Add buffer
  • insert_buffer net_name BUFX4
Note: Here cell name means Instance name

How to convert All LVT Cells to HVT cells wise versa


How to convert All LVT Cells to HVT cells wise versa


proc lvttohvt {lvt cell}   {
          set a [get_flat_cells -filter "ref_name=~*LVT*]
          foreach_in_collection bb $a {
                    set cell [get_attribute $$bb ref_name]
                     regsub "LVT" $cell "HVT" hvtname
                     size_cell $bb $hvtname
                }
   }

Script to find the Next cell and Previous cell

How to find the Next cell
proc name {
set n [get_cells -of_objects [get_pins -of_objects [get_nets -of_objects [get_pins -of_objects $name -filter "direction==out"]] -filter "direction==in"]]
}

How to find the Previous cell
proc name {
set n [get_cells -of_objects [get_pins -of_objects [get_nets -of_objects [get_pins -of_objects $name -filter "direction==in"]] -filter "direction==out"]]
}

CTS Spec

setCTSMode -routeTopPreferredLayer 5 -routeBottomPreferredLayer 4 -routeShielding VSS -routeNonDefaultRule ndr
setDontUse BUFX2 false
setDontUse INVX1 false
setDontUse BUFX2 false
setDontUse INVX1 false
set_dont_touch [get_lib_cells BUFX2] false
set_dont_touch [get_lib_cells INVX1] false
setDontUse CLKBUF* true
setDontUse CLKINV* true
setDontUse DLY* true
## cts targets##
set_ccopt_property target_max_trans 1 (10% clock period)
set_ccopt_property routing_top_min_fanout 35
set_ccopt_property target_skew 1 (10% of clk)
set_ccopt_property -net_type trunk target_max_trans 0.500
set_ccopt_property -net_type leaf target_max_trans 0.400
set_ccopt_mode -cts_opt_type full
#### latency and uncertainty targets#####
set_clock_latency 4 [get_clocks wb_clk]  (40% of clk)
set_clock_uncertainty 1.3 -setup [get_clocks clk] (including 10% skew+1%jitter+200ps margin)
set_clock_uncertainty 1.2 -hold [get_clocks clk] (including 10% skew+100ps margin)
add_ndr ndr -width {Metal4 0.16 Metal5 0.16} -spacing {Metal4 0.14 Metal5 0.14}
create_route_type -name CTS_2w1s -non_default_rule cts2w1s
set_ccopt_property route_type -net_type trunk CTS_2w1s
set_ccopt_property max_fanout 30


What is the sanity checks you have done for STA?

 Sanity checks for STA: Linking Checks: We need to check., is there any missing modules or missing pins in a library. this is done by link c...