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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# Timer

The class [Timer](../../ot/timer/timer.hpp) 
defines a set of core methods for timing analysis under the namespace `ot`.
Each method belongs to either a builder, an action, or an accessor operation.

| Command | Form | Description |
| :------ | :--- | :---------- |
| [read_celllib](#read_celllib) | builder | reads a liberty format library file |
| [read_verilog](#read_verilog) | builder | reads a gate-level verilog netlist  |
| [read_spef](#read_spef)       | builder | reads a file of net parasitics in SPEF format |
| [read_sdc](#read_sdc)         | builder | reads a Synopsys Design Constraint (sdc) file of version 2.1 |
| [read_timing](#read_timing)   | builder | reads a TAU15 Contest assertion file of timing constraints |
| [set_at](#set_at)             | builder | specifies the arrival time of an input port |
| [set_rat](#set_rat)           | builder | specifies the required arrival time of an output port |
| [set_slew](#set_slew)         | builder | specifies the transition time of an input port |
| [set_load](#set_load)         | builder | specifies the load capacitance of an output port |
| [insert_gate](#insert_gate)   | builder | inserts a gate (instance) to the design |
| [remove_gate](#remove_gate)   | builder | removes a gate (instance) from the design |
| [repower_gate](#repower_gate) | builder | repowers a gate (instance) with a new cell |
| [insert_net](#insert_net)     | builder | inserts an empty net to the design |
| [remove_net](#remove_net)     | builder | removes a net from the design |
| [connect_pin](#connect_pin)   | builder | connects a pin to a net |
| [disconnect_pin](#disconnect_pin) | builder | disconnect a pin from the net it connects to |
| [enable_cppr](#enable_cppr)   | builder | enables common path pessimism removal analysis |
| [disable_cppr](#disable_cppr) | builder | disables common path pessimism removal analysis |
| [update_timing](#update_timing) | action | updates the timer to keep all timing values up-to-date |
| [report_timing](#report_timing) | action | report the critical paths of the design |
| [report_at](#report_at)       | action | reports the arrival time at a pin |
| [report_slew](#report_slew)   | action | reports the transition time at a pin |
| [report_rat](#report_rat)     | action | reports the required arrival time at a pin |
| [report_slack](#report_slack) | action | reports the slack at a pin |
| [report_tns](#report_tns)     | action | reports the total negative slack of the design |
| [report_wns](#report_wns)     | action | reports the worst negative slack of the design |
| [report_fep](#report_fep)     | action | reports the total failing endpoints in the design |
| [dump_graph](#dump_graph)     | accessor | dumps the timing graph to an output stream |
| [dump_taskflow](#dump_taskflow) | accessor | dumps the lineage graph to an output stream |
| [dump_timer](#dump_timer)     | accessor | dumps the statistics of the design |
| [num_primary_inputs](#num_primary_inputs)| accessor | queries the number of primary inputs in the design |
| [num_primary_outputs](#num_primary_outputs)| accessor | queries the number of primary outputs in the design |
| [num_pins](#num_pins)| accessor | queries the number of pins in the design |
| [num_nets](#num_nets)| accessor | queries the number of nets in the design |
| [num_arcs](#num_arcs)| accessor | queries the number of arcs in the timing graph |
| [num_gates](#num_gates)| accessor | queries the number of gates in the design |
| [num_tests](#num_tests)| accessor | queries the number of timing tests (checks) in the design |
| [primary_inputs](#primary_inputs)| accessor | acquires a const reference to the data structure of primary inputs |
| [primary_outputs](#primary_outputs)| accessor | acquires a const reference to the data structure of primary outputs |
| [pins](#pins) | accessor | acquires a const reference to the data structure of pins |
| [nets](#nets) | accessor | acquires a const reference to the data structure of nets |
| [gates](#gates) | accessor | acquires a const reference to the data structure of gates |
| [clocks](#clocks)| accessor | acquires a const reference to the data structure of clocks |
| [tests](#tests) | accessor | acquires a const reference to the data structure of tests |
| [arcs](#arcs)| accessor | acquires a const reference to the data structure of arcs |

The above list of methods is consider stable.
Other methods found in [timer.hpp](../../ot/timer/timer.hpp) but not listed in the table
may change in the future release.

---

## read_celllib

Reads a Liberty format library file. 
In most cases, this is the first method to initialize a timing analysis framework.

```cpp
Timer& read_celllib(std::filesystem::path path, std::optional<Split> split = {});
```

#### Parameters

+ path: the file path of the liberty file to read
+ split: use this library for either min  or max delay calculation

#### Return Value

`*this`

#### Notes

The method adds two tasks to the lineage graph;
one parses the library and the other attaches the library to the timer.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## read_verilog

Reads a gate-level verilog netlist and initializes the circuit graph from the library.

```cpp
Timer& read_verilog(std::filesystem::path path);
```

#### Parameters

+ path: the file path of the verilog netlist to read

#### Return Value

`*this`

#### Notes

The method adds two tasks to the lineage graph;
one parses the verilog file and the other initializes the circuit graph from it.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## read_spef

Reads a parasitics file in SPEF.

```cpp
Timer& read_spef(std::filesystem::path path);
```

#### Parameters

+ path: the path of the SPEF file to read

#### Return Value

`*this`

#### Notes

The method adds two tasks to the lineage graph;
one parses the SPEF file and the other digests the net parasitics.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## read_sdc

Reads a Synopsys Design Constraint (SDC) file.

```cpp
Timer& read_sdc(std::filesystem::path path);
```

#### Parameters

+ path: the path of the sdc file to read

#### Return Value

`*this`

#### Notes

The method adds two tasks to the lineage graph;
one parses the sdc file and the other digests the timing constraints.

The supporting status of SDC commands is described [here](../io/sdc.md).


<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## read_timing

Reads a [TAU15 Contest Format][TAU15] timing assertion file.

```cpp
Timer& read_timing(std::filesystem::path path);
```

#### Parameters

+ path: the path of the timing assertion file to read

#### Return Value

`*this`

#### Notes

The method adds two tasks to the lineage graph;
one parses the timing file and the other digests the timing constraints.


<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## set_at

Specifies the arrival time of an input port at a given 
min/max split and rise/fall transition.

```cpp
Timer& set_at(std::string port, Split split, Tran tran, std::optional<float> value);
```

#### Parameters

+ port: the name of the input port
+ split: the minimum  or maximum arrival time
+ tran: the rising or falling edge
+ value: the arrival time value; use `std::nullopt` to unset the arrival time of the port

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## set_rat

Specifies the required arrival time of an output port at a given 
min/max split and rise/fall transition.

```cpp
Timer& set_rat(std::string port, Split split, Tran tran, std::optional<float> value);
```

#### Parameters

+ port: the name of the output port
+ split: the required arrival time at min  or max split
+ tran: the rising or falling edge
+ value: the arrival time value; use `std::nullopt` to unset the arrival time of the port

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## set_slew

Specifies the transition time of an input port at a given 
min/max split and rise/fall transition.

```cpp
Timer& set_at(std::string port, Split split, Tran tran, std::optional<float> value);
```

#### Parameters

+ port: the name of the input port
+ split: the minimum  or maximum transition time
+ tran: the rising or falling edge
+ value: the transition time value; use `std::nullopt` to unset the transition time of the port

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## set_load

Specifies the load capacitance of an output port at a given 
min/max split and rise/fall transition.

```cpp
Timer& set_load(std::string port, Split split, Tran tran, std::optional<float> value);
```

#### Parameters

+ port: the name of the output port
+ split: the load capacitance at min  or max split
+ tran: the load capacitance at rising or falling edge
+ value: the load capacitance value; use `std::nullopt` to unset the load capacitance of the port

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## insert_gate

Inserts a gate into the design. 
The newly inserted gate is not connected to any other gates or wires.

```cpp    
Timer& insert_gate(std::string gate, std::string cell);
```

#### Parameters

+ gate: the name of the gate to insert to the design
+ cell: the name of the cell to associate with the gate

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## remove_gate

Removes a gate from the design. 
The gate will be disconnected from the design before removal.

```cpp
Timer& remove_gate(std::string gate);
```

#### Parameters

+ gate: the name of the gate to remove from the design

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## repower_gate

Changes the size or the level of an existing gate, or insert a new gate if it does not exist.

```cpp
Timer& repower_gate(std::string gate, std::string cell);
```

#### Parameters

+ gate: the name of the gate to repower
+ cell: the name of the cell to associate with the gate

#### Return Value

`*this`

#### Notes

The topology of the new cell must be the same as the old cell, or it can result in undefined behavior.
However the pin capacitance, for example, of the new cell can be different.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## insert_net

Inserts an empty net object to the design.

```cpp
Timer& insert_net(std::string net);
```

#### Parameters

+ net: the name of the net to insert to the design

#### Return Value

`*this`

#### Notes

The net will be connected to existing pins in the design by the method `connect_pin`.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## remove_net

Removes a net from the design. 

```cpp
Timer& remove_net(std::string net);
```

#### Parameters

+ net: the name of the net to remove from the design

#### Return Value

`*this`

#### Note

If a net is connected to pins, the pins will be automatically disconnected from the net.
The corresponding parasitics will also be removed.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## connect_pin

Connects a pin to a net.

```cpp
Timer& connect_pin(std::string pin, std::string net);
```

#### Parameters

+ pin: the name of the pin
+ net: the name of the net

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## disconnect_pin

Disconnects a pin from the net it connects to.

```cpp
Timer& disconnect_pin(std::string pin);
```

#### Parameters

+ pin: the name of the pin

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## enable_cppr

Enables the common path pessimism removal (CPPR) analysis.

```cpp
Timer& enable_cppr();
```

#### Parameters

none

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## disable_cppr

Disables the common path pessimism removal (CPPR) analysis.

```cpp
Timer& disable_cppr();
```

#### Parameters

none

#### Return Value

`*this`

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## update_timing

Triggers the timing update to keep all timing information 
(arrival time, slew, required arrival time, etc)
up-to-date.

```cpp
void update_timing();
```

#### Paramters

none

#### Return Value

none

#### Notes

This is the bottom-most call of all action methods.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_timing

Reports the critical paths of the design.

```cpp
1. std::vector<Path> report_timing(size_t k);
2. std::vector<Path> report_timing(size_t k, Split split, Tran tran)
3. std::vector<Path> report_timing(size_t k, Split split)
4. std::vector<Path> report_timing(size_t k, Tran tran)
```

#### Paramters

1. reports the top-k critical paths across all endpoints
  + K: the number of paths to report
2. reports the top-k critical min/max paths for rising/falling endpoints
  + K: the number of paths to report
  + split: minimum or maximum path
  + tran: rising or falling endpoints
3. report the top-k critical min/max paths across both rising and falling endpoints
  + K: the number of paths to report
  + split: minimum or maximum path
4. report the top-k critical paths for rising/falling endpoints
  + K: the number of paths to report
  + tran: rising or falling endpoints

#### Return Value

A vector of paths of type `Path`, defined in [path.hpp][ot::Path].


<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>


---

## report_at

Reports the arrival time of a pin at a given 
min/max split and rise/fall edge.

```cpp
std::optional<float> report_at(const std::string& pin, Split split, Tran tran);
```

#### Parameters

+ pin: the name of the pin to report
+ split: the minimum  or maximum arrival time
+ tran: the rising or falling edge

#### Return Value

Returns the arrival time if found, or `std::nullopt`.

#### Notes

The arrival time may not be found, for example, 
the pin doesn't exist or the timing propagation doesn't go through the pin.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_rat

Reports the required arrival time of a pin at a given 
min/max split and rise/fall edge.

```cpp
std::optional<float> report_rat(const std::string& pin, Split split, Tran tran);
```

#### Parameters

+ pin: the name of the pin to report
+ split: the minimum  or maximum required arrival time
+ tran: the rising or falling edge

#### Return Value

Returns the required arrival time if found, or `std::nullopt`.

#### Notes

The required arrival time may not be found, for example, 
the pin doesn't exist or the timing propagation doesn't go through the pin.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_slew

Reports the transition time of a pin at a given 
min/max split and rise/fall edge.

```cpp
std::optional<float> report_slew(const std::string& pin, Split split, Tran tran);
```

#### Parameters

+ pin: the name of the pin to report
+ split: the minimum  or maximum transition time
+ tran: the rising or falling edge

#### Return Value

Returns the transition time if found, or `std::nullopt`.

#### Notes

The transition time may not be found, for example, 
the pin doesn't exist or the timing propagation doesn't go through the pin.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_load

Reports the load capacitance of a net at a given 
min/max split and rise/fall edge.

```cpp
std::optional<float> report_load(const std::string& pin, Split split, Tran tran);
```

#### Parameters

+ pin: the name of the pin to report
+ split: the minimum  or maximum load capacitance
+ tran: the rising or falling edge

#### Return Value

Returns the load capacitance if found, or `std::nullopt`.

#### Notes

The load capacitance may not be found, for example, 
the net doesn't exist or the timing propagation doesn't go through the net.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_tns

Reports the total negative slack (TNS) across all endpoints.

```cpp
std::optional<float> report_tns();
```

#### Parameters

none

#### Return Value

Returns the total negative slack if found, or `std::nullopt`.

#### Notes

The total negative slack may not be found, for example, 
the timing propagation doesn't go through any endpoints.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_wns

Reports the worst negative slack (WNS) across all endpoints.

```cpp
std::optional<float> report_wns();
```

#### Parameters

none

#### Return Value

Returns the worst negative slack if found, or `std::nullopt`.

#### Notes

The worst negative slack may not be found, for example, 
the timing propagation doesn't go through any endpoints.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## report_fep

Reports the total number of failing endpoints (FEP) across all endpoints.

```cpp
std::optional<size_t> report_fep();
```

#### Parameters

none

#### Return Value

Returns the total number of failing endpoints if found, or `std::nullopt`.

#### Notes

The total number of failing endpoints may be be found, for example, 
the timing propagation doesn't go through any endpoints.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## dump_graph

Dumps the timing graph to a DOT format.

```cpp
void dump_graph(std::ostream& ostream) const;
```

#### Parameters

+ ostream: the target output stream to dump

#### Return Value

none

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## dump_taskflow

Dumps the lineage graph to a DOT format.

```cpp
void dump_taskflow(std::ostream& ostream) const;
```

#### Parameters

+ ostream: the target output stream to dump

#### Return Value

none

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## dump_timer

Dumps the statistics of the design.

```cpp
void dump_timer(std::ostream& ostream) const;
```

#### Parameters

+ ostream: the target output stream to dump

#### Return Value

none

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_primary_inputs

Queries the number of primary inputs in the design.

```cpp
size_t num_primary_inputs() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of primary inputs in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_primary_outputs

Queries the number of primary outputs in the design.

```cpp
size_t num_primary_outputs() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of primary outputs in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_pins

Queries the number of pins in the design.

```cpp
size_t num_pins() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of pins in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_nets

Queries the number of nets in the design.

```cpp
size_t num_nets() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of nets in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_arcs

Queries the number of arcs in the design.

```cpp
size_t num_arcs() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of arcs in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_gates

Queries the number of gates in the design.

```cpp
size_t num_gates() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of gates in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## num_tests

Queries the number of tests (checks) in the design.

```cpp
size_t num_tests() const;
```

#### Parameters

none

#### Return Value

An unsigned integer for the number of tests in the design.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## primary_inputs

Acquires a const reference to the data structure of primary inputs.

```cpp
const std::unordered_map<std::string, Pin>& primary_inputs() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of primary inputs.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## primary_outputs

Acquires a const reference to the data structure of primary outputs.

```cpp
const std::unordered_map<std::string, Pin>& primary_outputs() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of primary outputs.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## pins

Acquires a const reference to the data structure of pins.

```cpp
const std::unordered_map<std::string, Pin>& pins() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of pins.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## nets

Acquires a const reference to the data structure of nets.

```cpp
const std::unordered_map<std::string, Net>& nets() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of nets.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## gates

Acquires a const reference to the data structure of gates.

```cpp
const std::unordered_map<std::string, Gate>& gates() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of gates.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## clocks

Acquires a const reference to the data structure of clocks.

```cpp
const std::unordered_map<std::string, Clock>& clocks() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of clocks.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## tests

Acquires a const reference to the data structure of tests (timing checks).

```cpp
const std::list<Test>& tests() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of tests.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>

---

## arcs

Acquires a const reference to the data structure of arcs.

```cpp
const std::list<Arc>& arcs() const;
```

#### Parameters

none

#### Return Value

A constant reference to the data structure of arcs.

<div align="right"><b><a href="#Timer">↥ back to top</a></b></div>


* * *

[TAU15]:                 https://sites.google.com/site/taucontest2015/
[ot::Path]:              ../../ot/timer/path.hpp