Herding Cats CDNLive 2013
Table of contents
1 Introduction - It's all just sdc, right? ......................................................................................... 3
2 Portable procs ........................................................................................................................... 4
2.1 Other reasons to use procs ................................................................................................................................... 4
2.1.1 Manage hierarchy using procs ................................................................................................................. 4
2.1.2 Keep related code together, even when not executed sequentially........................................................... 5
2.1.3 Simplifies debug ...................................................................................................................................... 5
2.1.4 Structured code is just plain better ........................................................................................................... 5
2.2 Why people don't use procs ................................................................................................................................. 5
2.3 Tool-independent option parsing - &define_proc_attributes and &parse_proc_arguments ................................ 6
2.3.1 What they do ............................................................................................................................................ 6
2.3.2 An illustrative example ............................................................................................................................ 7
2.3.3 A peek under the hood ........................................................................................................................... 11
3 Handling missing commands ................................................................................................. 13
3.1 RC commands that are missing in PT ................................................................................................................ 13
3.2 PT commands that are missing in RC ................................................................................................................ 13
4 Managing Hierarchy ............................................................................................................... 15
4.1 Shared code and unshared code ......................................................................................................................... 15
4.2 A feline example ................................................................................................................................................ 15
5 Some very special procs - &create_clock and &create_generated_clock .............................. 21
5.1 There's more to creating clocks than just creating the clocks ............................................................................ 21
5.2 A related problem - we often need master, period, waveform, uncertainty, etc of clocks but the tools supply
this information differently (or don't supply it at all) ............................................................................................... 21
5.3 The solution - wrap your clock creation commands and squirrel away the information in global arrays .......... 21
5.4 &create_clocks .................................................................................................................................................. 21
5.5 &create_generated_clocks ................................................................................................................................. 25
6 Conclusion .............................................................................................................................. 29
7 Acknowledgements ................................................................................................................ 30
8 References .............................................................................................................................. 31
9 Appendix ................................................................................................................................ 32
9.1 &eval ................................................................................................................................................................. 32
9.2 &define_proc_attributes / &parse_proc_arguments .......................................................................................... 34
9.3 &create_clock .................................................................................................................................................... 41
9.4 &create_generated_clock................................................................................................................................... 42
9.5 vname/dc:: namespace, etc ................................................................................................................................. 44