Translate page

Thursday, November 7, 2019

STA Tool Command - report_timing -max_paths_count (OpenSTA -group_count) : Part 2


In the previous part (STA Tool Command - report_timing -max_paths_count (OpenSTA -group_count) : Part 1) we have discussed about the switch -group_count for 1 circuit. As per our initial understanding -group_count is correspond to "The number of paths to report in each path group". But when we have checked practically, we have noticed different behavior (Summarized in the below table).


Clock Group group_count Total No. Of Reports
1 1 1
1 2 2
1 3 3
1 4 3
1 5 3
1 ... 3
2 1 2
2 2 3
2 3 3
2 4 3
2 5 3
2 ... 3

I have asked all of you to guess the reason of that but I am not sure how many of you were able to do it. :) Maybe, some of you have created a relationship between Total no of Reports Vs Total Number of Flipflop present in the circuit. :) Let's see if it's true for another circuit also. :)



CASE1:
create_clock -name clk -period 10 {clk1 clk2 clk3 clk4}
set_input_delay -clock clk 0 {in1 in2 in3}


report_checks -format summary -path_group clk -group_count 1
Startpoint           Endpoint        Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1) r3/D (DFF_X1) 9.22
I have made only one clock group therefore when group_count is 1 only one path is reported. Lets increase group_count and see what will happen.

report_checks -format summary -path_group clk -group_count 2
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
Here group_count is 2 that’s why two paths are reported.

For group_count = 3
report_checks -format summary -path_group clk -group_count 3
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/ (DFF_X1)           9.24
in1 (input)                 r1/D (DFF_X1)           9.85
Here group_count is 3 that’s why three paths are reported.

report_checks -format summary -path_group clk -group_count 4
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85
Four reports since group_count is 4

report_checks -format summary -path_group clk -group_count 5
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
in1 (input)                r1/D (DFF_X1)           9.85
in2 (input)                r2/D (DFF_X1)           9.85
The question arises here, that group_count is 5 then why only four paths are reported?

Now, try to compare previous example (in the previous part of this article) and this example. In previous example, with 1 clock group, maximum paths were reported 3 even though we have increases group_count more then 3. In this example, maximum paths reported are 4 even if we increase group_count more then 4.

Hint is – check number of Flipflop in both circuit and now, I am sure that you can say that it's related to total number of Flipflop. :) But remember - this is just HINT - Answer is something else.

CASE2:
create_clock -name ck1 -period 10 {clk1 clk2}
create_clock -name ck2 -period 10 {clk3 clk4}
set_input_delay -clock ck1 0 {in1 in2}
set_input_delay -clock ck2 0 {in3}


report_checks -format summary -path_group {ck1 ck2} -group_count 1
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
in1 (input)                 r1/D (DFF_X1)           9.85
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
report_checks -format short -path_group {ck1 ck2} -group_count 1
Startpoint: in1 (input port clocked by ck1)
Endpoint: r1 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck1)
Endpoint: r3 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max
Here I have made two clock groups that’s why one path is reported from each clock group when group_count is 1

For group count = 2
report_checks -format summary -path_group {ck1 ck2} -group_count 2
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
report_checks -format short -path_group {ck1 ck2} -group_count 2
Startpoint: in1 (input port clocked by ck1)
Endpoint: r1 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: in2 (input port clocked by ck1)
Endpoint: r2 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck1)
Endpoint: r3 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck1)
Endpoint: r4 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max
group_count is 2 here, therefore two paths from each clock is reported.

When group_count = 3
report_checks -format summary -path_group {ck1 ck2} -group_count 3
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
Now again something happens😊. Here group_count is 3, but path reported are only four why?

Now, lets try to understand this with the help of grouping of clock in different way.
In the last case, clk1 - clk2 & clk3 - clk4 were grouped together but in below case clk1 – clk3 & clk2 - clk4 group together. And see the difference and I am sure you can solve this puzzle.

CASE3:
create_clock -name ck1 -period 10 {clk1 clk3}
create_clock -name ck2 -period 10 {clk2 clk4}
set_input_delay -clock ck1 0 {in1 in3}
set_input_delay -clock ck2 0 {in2}


report_checks -format summary -path_group {ck1 ck2} -group_count 1
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
report_checks -format short -path_group {ck1 ck2} -group_count 1
Startpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Endpoint: r3 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Endpoint: r4 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max
In case 3 also I have made two clock groups but the clocks grouped together are different. The results which you will observe here are same with respect to number of reports.

Now, lets see what will happen if we will increase group_count.

report_checks -format summary -path_group {ck1 ck2} -group_count 2
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)          r3/D (DFF_X1)           9.22
in1 (input)                 r1/D (DFF_X1)           9.85
r2/Q (DFF_X1)          r4/D (DFF_X1)           9.24
in2 (input)                 r2/D (DFF_X1)           9.85
report_checks -format short -path_group {ck1 ck2} -group_count 2
Startpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Endpoint: r3 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: in1 (input port clocked by ck1)
Endpoint: r1 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Endpoint: r4 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max

Startpoint: in2 (input port clocked by ck2)
Endpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max

For group_count = 3

report_checks -format summary -path_group {ck1 ck2} -group_count 3
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)          r3/D (DFF_X1)          9.22
in1 (input)                 r1/D (DFF_X1)           9.85
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
in2 (input)                 r2/D (DFF_X1)           9.85

Path reported is four, why? Here, I want to give you one more hint – Check number of flops associated per clock group. 😊

Below scenario, can help you to understand more clearly. Here I have created 4 clock groups

CASE4:
create_clock -name ck1 -period 10 {clk1}
create_clock -name ck2 -period 10 {clk2}
create_clock -name ck3 -period 10 {clk3}
create_clock -name ck4 -period 10 {clk4}
set_input_delay -clock ck1 0 {in1}
set_input_delay -clock ck2 0 {in2}
set_input_delay -clock ck3 0 {in3}


report_checks -format summary -path_group {ck1 ck2 ck3 ck4} -group_count 1
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24
report_checks -format short -path_group {ck1 ck2 ck3 ck4} -group_count 1
Startpoint: in1 (input port clocked by ck1)
Endpoint: r1 (rising edge-triggered flip-flop clocked by ck1)
Path Group: ck1
Path Type: max

Startpoint: in2 (input port clocked by ck2)
Endpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Path Group: ck2
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Endpoint: r3 (rising edge-triggered flip-flop clocked by ck3)
Path Group: ck3
Path Type: max

Startpoint: r2 (rising edge-triggered flip-flop clocked by ck2)
Endpoint: r4 (rising edge-triggered flip-flop clocked by ck4)
Path Group: ck4
Path Type: max
Here 4 paths are reported since we have 4 clock groups so one path from each clock group is reported when group_count is 1.

For group_count = 2
report_checks -format summary -path_group {ck1 ck2 ck3 ck4} -group_count 2
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.22
r2/Q (DFF_X1)           r4/D (DFF_X1)           9.24

You are expecting here 2 paths from each clock group that is total 8 paths, but only 4 paths are present in the reporting. WHY? I am sure by now, it’s easy for you to understand the reason of that. Like I gave hint last time – Flops per clock group. 😊
Now, do you think Flops per clock group is the answer or there is something else behind this. Or may be any other technical term or terminology. That you can find out in our next article, where we are going to discuss one more option and that’s going to help you to understand this very well.


-By Surabhi Singh
(Btech-EC:- 2019 Passout)
(ABES Engineering College)


-Supervised By Puneet Mittal
(Founder & Director)
(VLSI Expert Private Limited)


Monday, November 4, 2019

STA Tool Command - report_timing -max_paths_count (OpenSTA -group_count) : Part 1


As, I have shared last time that in this series of articles, we are going to discuss about the different command of STA Tools along with the concepts. We have used OpenSTA which is an open source tool and can be downloaded from OpenSTA. It’s commands are similar to Primetime (Industry standard tool). By using OpenSTA you can understand the working of tool properly. Here, I have made some of the comparison between the commands of Primetime & OpenSTA (which I am going to use in another few articles). The command which I have selected is report_timing (in Primetime) & report_checks (in OpenSTA). The report_checks / report_timing command reports paths in the design

Primetime OpenSTA
report_timing [-group group_name][-max_paths count][-nworst paths_per_endpoint] report_checks [-path_group group_names][-group_count path_count][-endpoint_count endpoint_path_count]
group group_name:Specifies the path groups from which timing paths are selected for reporting based on other specified options for reports. path_group: List of path group names to report. All path groups are reported if this option is not specified
max_paths count:Specifies the number of paths to be reported per path group group_count: The number of paths to report in each path group
nworst paths_per_endpoint: Specifies the number of paths to be reported per endpoint per path group endpoint_count: The number of paths to report for each endpoint

In the previous Article, we have discussed in great detail about the report_timing -group (report_checks -path_group). How to create clock group and how tool by default reports only 1 report per path group. But now you can ask a question – what if you need all the possible reports with respect to 1 path group. We are going to discuss the same in this Article.

Below is an example to understand the reporting of the command (Same example which we have used last time).


In this circuit, depending upon the way we create path_group, we can get timing reports. But in general, there are several Timing path in any circuit. As a STA engineer, we need to analyse all of them.
Below commands and reporting structure can remind you by default options.

Case(1):

create_clock -name clk -period 10 {clk1 clk2 clk3}
set_input_delay -clock clk 0 {in1 in2}


report_checks -format summary -path_group clk
Startpoint           Endpoint        Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)        r3/D (DFF_X1)       9.43

report_checks -format short -path_group clk
Startpoint: r2 (rising edge-triggered flip-flop clocked by clk)
Endpoint: r3 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max


Same reporting, I can achieve by adding one more switch with value 1 (i.e. -group_count 1)

Case(1):

create_clock -name clk -period 10 {clk1 clk2 clk3}
set_input_delay -clock clk 0 {in1 in2}


report_checks -format summary -path_group clk -group_count 1
Startpoint           Endpoint        Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)        r3/D (DFF_X1)       9.43

report_checks -format short -path_group clk -group_count 1
Startpoint: r2 (rising edge-triggered flip-flop clocked by clk)
Endpoint: r3 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

If you have noticed the difference, we have used one more argument / switch group_count.

group_count The number of paths to report in each path group

But it’s not that simple. Let’s understand this command more in detail using different test cases and different scenerios.
In above example, only 1 path is reported with respect to clock group clk? Why ONE, because I have given group_count == 1. What if I give group_count = 2? let’s check

Case(1):

create_clock -name clk -period 10 {clk1 clk2 clk3}
set_input_delay -clock clk 0 {in1 in2}


report_checks -format summary -path_group clk -group_count 2
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                r1/D (DFF_X1)           9.85

we obtain 2 worst reports from path group clk

Similarly, we can check for group_count = 3

report_checks -format summary -path_group clk -group_count 3
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                r1/D (DFF_X1)           9.85
in2 (input)                r2/D (DFF_X1)           9.85

What if, I give group_count = 4? I am sure, you will say 4 paths should be reported. Let’s check

report_checks -format summary -path_group clk -group_count 4
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85

Here we see only 3 paths.... Why??

Let’s check for group_count = 5

report_checks -format summary -path_group clk -group_count 5
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------

r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)          9.85

Here also only three paths. Why is this thing happening.

Let’s check for group_count = 6

report_checks -format summary -path_group clk -group_count 6
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85
Here also the same,

I have summarized the result in the table

group_count No. Of Reports
1 1
2 2
3 3
4 3
5 3
6 3
7 3
8 3
9 3
10 3

Now the question is although we have increased group_count but number of paths reported is three only? As per the definition, it should also increase. I am leaving his question to you right now and let’s see if you can think/guess something about this. Else we obviously discuss it later.

Let’s try to understand it by creating 2 different clock group and play with value of group_count.


Consider case(2) to understand group_count clearly

Command:
create_clock -name clk -period 10 {clk1 clk3}
create_clock -name clkc -period 10 {clk2}
set_input_delay -clock clk 0 {in1}
set_input_delay -clock clkc 0 {in2}


report_checks -format summary -path_group {clk clkc} -group_count 1
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in2 (input)                r2/D (DFF_X1)           9.85

report_checks -format short -path_group {clk clkc} -group_count 1
Startpoint: r2 (rising edge-triggered flip-flop clocked by clkc)
Endpoint: r3 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

Startpoint: in2 (input port clocked by clk)
Endpoint: r2 (rising edge-triggered flip-flop clocked by clkc)
Path Group: clkc
Path Type: max

Since group count is one therefore one path from each path group is reported i.e. one path from clock group clk and other from clock group clkc.

Let’s make group_count 2 and observe the changes in report

report_checks -format summary -path_group {clk clkc} -group_count 2
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85

report_checks -format short -path_group {clk clkc} -group_count 2
Startpoint: r2 (rising edge-triggered flip-flop clocked by clkc)
Endpoint: r3 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

Startpoint: in1 (input port clocked by clk)
Endpoint: r1 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

Startpoint: in2 (input port clocked by clk)
Endpoint: r2 (rising edge-triggered flip-flop clocked by clkc)
Path Group: clkc
Path Type: max

In this case we observe thee paths, two from the clock group clk and one from the clock group clkc
You must be thinking why only one path is reported from clock group clkc. Just think over it

Now, I’m increasing the group_count

report_checks -format summary -path_group {clk clkc} -group_count 3
Startpoint              Endpoint           Slack
--------------------------------------------------------------------------------
r2/Q (DFF_X1)           r3/D (DFF_X1)           9.43
in1 (input)                 r1/D (DFF_X1)           9.85
in2 (input)                 r2/D (DFF_X1)           9.85

report_checks -format short -path_group {clk clkc} -group_count 3
Startpoint: r2 (rising edge-triggered flip-flop clocked by clkc)
Endpoint: r3 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

Startpoint: in1 (input port clocked by clk)
Endpoint: r1 (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

Startpoint: in2 (input port clocked by clk)
Endpoint: r2 (rising edge-triggered flip-flop clocked by clkc)
Path Group: clkc
Path Type: max

We should get here 3 paths from clock group clk and three path from clock group clkc but overall we are getting only three paths
why?? Still not able to get / guess answer? 😊

Again, I am trying summarize my analysis

I have summarized the result in the table

Clock Group group_count Total No. Of Reports
2 1 2
2 2 3
2 3 3
2 4 3
2 5 3
2 ... 3


Let’s discuss another circuit and see if you can figure out but that we will discuss in part 2 of this article. :)


-By Surabhi Singh
(Btech-EC:- 2019 Passout)
(ABES Engineering College)


-Supervised By Puneet Mittal
(Founder & Director)
(VLSI Expert Private Limited)

Must Read Article

Related Posts Plugin for WordPress, Blogger...

Follow by Email