郭斯彥臺灣大學:電子工程學研究所沈哲永Shen, Che-YangChe-YangShen2007-11-272018-07-102007-11-272018-07-102006http://ntur.lib.ntu.edu.tw//handle/246246/57676隨著科技日新月異, 以及系統晶片(System-on-a-Chip) 的推廣, 現今的晶片設計複雜度, 由於規格多以系統的層次去規範; 因此, 在此層級下的晶片設計, 將比以往的設計更具挑戰性, 且更難以作完整性的功能性涵蓋率(Functional Coverage)驗證。 為了加速系統晶片的設計流程, 許多廠商紛紛推出新系統設計語言, 如: SystemC、SystemVerilog ...等。 雖然已包涵許多新的驗證工具在其中, 但效率仍然是相當地有限。 為了彌補系統設計以及系統驗證這兩者之間的差距, 本論文提出如何有效率地提升功能性涵蓋率的方法, 並以現今最熱門的儲存元件傳輸介面---Serial ATA Interface 為主題, 來實作並驗證 SATA/SATAII 模型。 此模型也就是所謂的功能性匯流排模型(Bus Functional Model)。 其採用 Verilog 行為語法與功能強大的驗證套件---TestWizard 所提供的 VLE 環境; 因此, 我們能夠 在系統晶片完成之前, 即能將功能性匯流排模型快速地實作出來。 此外, 也提供以 Transaction-based 為基準, 以 Assertion-based 為輔助的驗證環境。 藉由這兩種方式的結合, 以往晶片驗證的時間能被有效地縮短, 且以系統層次為概念的驗證方法得以實現, 更使得晶片驗證工程師(Verification Engineer)與晶片設計工程師(Hardware Engineer)的工作能夠即時地分工進行。 由於本論文提出的驗證環境以及功能性匯流排模型, 均是以現今業界最熱門的硬體描述語言---Verilog 為主要的設計語言;因此, 這將使得晶片整合(Chip Integration)更加容易、快速且達成 Time-to-Market 的最終目的。With the growth of CPU rate, the system performance depends on the speed of the system bus or the peripherals connected to it. Obviously, Parallel ATA is such a case and causes the loss of system performance. Thus, in order not to let such a situation exist, the best solution to storage interface is to replace the legacy Parallel ATA by the Serial ATA interface. Unfortunately, the traditional way to verify a design is time consuming since it's not applied from system point of view. As a result, system level verification and implementation become the main stream methodology and more and more significant nowadays. In this thesis, I'll introduce a quick implementation methodology (using bus functional model, or so-called transaction verification model) to construct a set of system models for SATA and SATAII. Those models are spec-oriented and can be viewed as virtual circuits since their behavior is just the same as the real circuits'. A SATA or SATAII interface is composed of four layers, which are physical layer, link layer, transport layer, and application layer respectively. With layered approach, throughput of SATA/SATAII interface can be further facilitated. As mentioned above, verification from system point of view plays an important role when design is getting large. Hence, I'll provide several system verification techniques, such as transaction-based verification, assertion-based verification, coverage-based verification and so on, applied to either our BFMs or user's DUTs (device under test) for better functional coverage.誌謝. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i 摘要. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Bus Functional Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.1 Formal Method-based Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.2 Simulation-based Verification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Challenges on Verification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Chapter 2 PATA/SATA/SATAII System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1 Parallel ATA Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Command and Protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.2 Limitations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2 Serial ATA Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.1 Physical Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.2 Link Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.3 Transport Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2.4 Application Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.2.5 Benefits of Serial ATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3 Serial ATAII Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.4 Compatibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Chapter 3 Implementation of SATA-Xactor BFM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1 TestWizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.1 Verification Language Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.1.2 Benefits of TestWizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2 BFM Implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2.1 BFM Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.2 Physical Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.3 Link Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.2.4 Transport Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.2.5 Application Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.2.6 BFM Advanced Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Chapter 4 SATA-Xactor Verification Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.1 Transaction-based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.2 Assertion-based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2.2 SATA-Xactor Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.2.3 Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.3 Coverage-based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.4 Link Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.5 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Chapter 5 Conclusion and Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.2 Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Appendix A Command Mapping Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 A.1 Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 A.2 Device Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 A.3 Device Diagnostic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 A.4 Power Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 A.5 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 A.6 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Appendix B Tasks & Functions of TestWizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 B.1 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 B.2 Semaphore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 B.3 List Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 B.4 Randomization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 B.5 Record Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 B.6 Transaction Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 B.7 Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 B.8 Signal Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 B.9 Record History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 B.10 Temporal Assertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751428644 bytesapplication/pdfen-US驗證系統驗證串流進階配接器配接器串流配接器VerificationSystem Level VerificationSerial ATASATASerial Advanced Technology Attachment Models以系統層次觀點驗證串流進階配接器模型System Level Verification for Serial Advanced Technology Attachment Modelsthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/57676/1/ntu-95-R93943124-1.pdf