2.2. Collecting Metrics¶
Metrics are characteristics of design artifacts, processes, and inter-process communications during the an SoC design flow. The main idea behind pervasively collecting metrics is to measure the design process and quantify its Quality of Results (QoR). This has always been a prerequisite to optimizing it and continuously achieving maximum productivity.
EDAAC implements Metrics collection functionality in edaac.metrics
sub-package. Below, we document its functionality.
2.2.1. Synthsis Stats¶
We can extract useful statistics about a synthesized netlist that aid in the physical design process.
2.2.1.1. Supported Tools¶
Yosys
2.2.1.2. Usage¶
Generate a report from Yosys using the stat command.
Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_yosys_log metrics = parse_yosys_log('/path/to/report')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.1.3. Dictionary¶
Key |
Meaning |
---|---|
|
Version of yosys build used |
|
Total numner of standard cells |
|
Total area of standard cells |
|
Total number of wires |
|
Total number of wirebits |
|
Total number of memories |
|
Total number of memory bits |
|
Total number of warnings |
|
Total number of unique warnings |
|
CPU usage |
|
Memory usage |
2.2.1.4. Example¶
metrics = {
'run__synth__yosys_version': '0.9+1706 (git sha1 UNKNOWN, gcc 7.3.1 -fPIC -Os)',
'synth__inst__num__total': 272,
'synth__inst__stdcell__area__total': 407.512000,
'synth__wire__num__total': 297,
'synth__wirebits__num__total': 343,
'synth__memory__num__total': 0,
'synth__memorybits__num__total': 0,
'run__synth__warning__total': 90,
'run__synth__warning__unique__total': 26,
'run__synth__cpu__total': 1.21,
'run__synth__mem__total': 28.78
}
2.2.2. Design Rule Check¶
Design rules are geometric constraints imposed on an SoC to ensure that the design functions properly, reliably and can be manufactured by fabs.
A Design Rule Violation (DRV) is a record that represents a violation to the design rules defined by the technology library used.
2.2.2.1. Supported Tools¶
Cadence Innovus
2.2.2.2. Usage¶
Generate a report from Innovus using the instructions here.
Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_innovus_drc_report metrics = parse_innovus_drc_report('/path/to/report')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.2.3. Dictionary¶
Key |
Meaning |
---|---|
|
The total number of DRVs |
|
Total numner of short metal violations |
|
Total area of short metal violations |
|
Total number of cut spacing violations |
|
Total area of cut spacing violations |
|
Total number of components placed/routed out of die |
|
Total area of components placed/routed out of die |
|
Total number of spacing violations |
|
Total number of parallel run length violations |
|
Total number of end-of-line spacing violations |
|
Total number of cut spacing violations |
|
Total number of min-area violations |
2.2.2.4. Example¶
metrics = {
'drv_total': 101,
'drv_short_metal_total': 2,
'drv_short_metal_area': 0.02382500,
'drv_short_cut_total': 1,
'drv_short_cut_area': 0.0012500,
'drv_out_of_die_total': 0,
'drv_out_of_die_area': 0.0,
'drv_spacing_total': 41,
'drv_spacing_parallel_run_length_total': 7,
'drv_spacing_eol_total': 9,
'drv_spacing_cut_total': 25,
'drv_min_area_total': 57
}
2.2.3. Connectivity¶
This ensures that the circuit components are connected as in the schematic.
2.2.3.1. Supported Tools¶
Cadence Innovus
2.2.3.2. Usage¶
Generate a report from Innovus using the instructions here.
Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_innovus_conn_report metrics = parse_innovus_conn_report('/path/to/report')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.3.3. Dictionary¶
Key |
Meaning |
---|---|
|
Total number of open nets |
2.2.3.4. Example¶
metrics = {
'conn_open_nets': 22
}
2.2.4. Static Timing Analysis (STA)¶
Static Timing Analysis validates the timing performance of a design by checking all possible paths for timing violations under worst-case conditions.
The arrival time of a signal is the time elapsed for a signal to arrive at a certain point.
The required time is the latest time at which a signal can arrive without making the clock cycle longer than desired.
The slack associated with each connection is the difference between the required time and the arrival time. A positive slack s at some node implies that the arrival time at that node may be increased by s, without affecting the overall delay of the circuit. Conversely, negative slack implies that a path is too slow, and the path must be sped up (or the reference signal delayed) if the whole circuit is to work at the desired speed.
The critical path is defined as the path between an input and an output with the maximum delay. The critical path is sometimes referred to as the worst path. If this path has a negative slack, the circuit won’t work as expected at the desired speed.
2.2.4.1. Supported Tools¶
Cadence Innovus
OpenSTA
2.2.4.2. Usage¶
Generate a report from Innovus using the appropriate command. Or generate a report from OpenSTA using
report_tns
,report_wns
andreport_design_area
.Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_innovus_timing_report metrics = parse_innovus_timing_report('/path/to/report')
from edaac.metrics.parsers import parse_openroad_log metrics = parse_openroad_log('/path/to/report', 'OpenSTA')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.4.3. Dictionary from Innovus¶
Key |
Meaning |
---|---|
|
Worst negative slack |
|
Total negative slack |
|
Number of violating paths |
2.2.4.4. Example¶
metrics = {
'timing_tns': -27.496,
'timing_wns': -0.851,
'timing_violating_paths': 35
}
2.2.4.5. Dictionary from OpenSTA¶
Key |
Meaning |
---|---|
|
Total negative slack |
|
Worst negative slack |
|
Total standard cell area |
|
Core utilization |
2.2.4.6. Example¶
metrics = {
'slack__negative__total': 0.00,
'slack__negative__worst': 0.00,
'std__area__total': 491.0,
'util': 8.0
}
2.2.5. Power¶
This reports the power consumption of the circuit.
2.2.5.1. Supported Tools¶
Cadence Innovus
2.2.5.2. Usage¶
Generate a report from Innovus using the appropriate command.
Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_innovus_power_report metrics = parse_innovus_power_report('/path/to/report')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.5.3. Dictionary¶
Key |
Meaning |
---|---|
|
Total internal power |
|
Total switching power |
|
Total leakage power |
|
Total power (sumof the above) |
|
Internal power / Total * 100.0 |
|
Swithing power / Total * 100.0 |
|
Leakage power / Total * 100.0 |
2.2.5.4. Example¶
metrics = {
'power_internal_total': 26.31116662,
'power_switching_total': 21.61735782,
'power_leakage_total': 13.58182182,
'power_total': 61.51034631,
'power_internal_percentage': 42.7752,
'power_switching_percentage': 35.1443,
'power_leakage_percentage': 22.0805
}
2.2.6. Area¶
This reports the area of the standard cells in addition to the cell count.
2.2.6.1. Supported Tools¶
Cadence Innovus
2.2.6.2. Usage¶
Generate the area report from Innovus using the appropriate command.
Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_innovus_area metrics = parse_innovus_area_report('/path/to/report')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.6.3. Dictionary¶
Key |
Meaning |
---|---|
|
Total area of standard cells (um^2) |
|
Total number of standard cells |
2.2.6.4. Example¶
metrics = {
'area_stdcell': 48191.040,
'area_stdcell_count': 11306
}
2.2.7. Compute Resources¶
This reports the compute resources (cpu, memory) used by a flow process.
2.2.7.1. Supported Tools¶
Cadence Innovus
2.2.7.2. Usage¶
Dump Innovus logs (that are shown on stdout) to a file.
Use
edaac.metrics.parsers
to parse the report.from edaac.metrics.parsers import parse_innovus_log metrics = parse_innovus_log('/path/to/report')
metrics
is a Python dictionary ofkey: value
pairs.print(metrics)
2.2.7.3. Dictionary¶
Key |
Meaning |
---|---|
|
Total time from all CPU cores (seconds) |
|
Total wall clock time (seconds) |
|
Total memory usage (MB) |
2.2.7.4. Example¶
metrics = {
'compute_cpu_time_total': 540,
'compute_real_time_total':184,
'compute_mem_total': 2287.4
}