实例介绍
VCS is a compiled code simulator. It enables you to analyze, compile, and simulate Verilog, SystemVerilog, OpenVera and SystemC design descriptions. It also provides you with a set of simulation and debugging features to validate your design. These features provide capabilities for source-level debugging and simulation result viewing.
[Content]
Contents 1. Getting Started Simulator Support with Technologies . . . . . . . . . . . . . . . . . . . . . 1-2 Setting Up the Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Verifying Your System Configuration . . . . . . . . . . . . . . . . . . . 1-4 Obtaining a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 Setting Up Your Environment. . . . . . . . . . . . . . . . . . . . . . . . . 1-6 Setting Up Your C Compiler. . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Using the Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 Basic Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Default Time Unit and Time Precision . . . . . . . . . . . . . . . . . . . . . 1-9 Searching Identifiers in the Design Using UNIX Commands . . . 1-9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 2. VCS Flow Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Using vcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Commonly Used Options . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 iv Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Interactive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Batch Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Commonly Used Runtime Options. . . . . . . . . . . . . . . . . . . . . 2-10 3. Modeling Your Design Avoiding Race Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Using and Setting a Value at the Same Time . . . . . . . . . . . . 3-2 Setting a Value Twice at the Same Time . . . . . . . . . . . . . . . . 3-3 Flip-Flop Race Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Continuous Assignment Evaluation . . . . . . . . . . . . . . . . . . . . 3-5 Counting Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 Time Zero Race Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 Race Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 The Dynamic Race Detection Tool. . . . . . . . . . . . . . . . . . . . . 3-8 Introduction to the Dynamic Race Detection Tool . . . . . . 3-8 Enabling Race Detection . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 The Race Detection Report . . . . . . . . . . . . . . . . . . . . . . . 3-12 Post Processing the Report . . . . . . . . . . . . . . . . . . . . . . . 3-15 Debugging Simulation Mismatches . . . . . . . . . . . . . . . . . 3-17 The Static Race Detection Tool . . . . . . . . . . . . . . . . . . . . . . . 3-20 Optimizing Testbenches for Debugging. . . . . . . . . . . . . . . . . . . . 3-22 Conditional Compilation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23 Enabling Debugging Features At Runtime. . . . . . . . . . . . . . . 3-24 Combining the Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27 Creating Models That Simulate Faster . . . . . . . . . . . . . . . . . . . . 3-28 v Unaccelerated Data Types, Primitives, and Statements . . . . 3-29 Inferring Faster Simulating Sequential Devices. . . . . . . . . . . 3-31 Modeling Faster always Blocks . . . . . . . . . . . . . . . . . . . . . . . 3-35 Using Verilog 2001 Constructs. . . . . . . . . . . . . . . . . . . . . . . . 3-36 Case Statement Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38 Precedence in Text Macro Definitions . . . . . . . . . . . . . . . . . . . . . 3-38 Memory Size Limits in the Simulator . . . . . . . . . . . . . . . . . . . . . . 3-39 Using Sparse Memory Models . . . . . . . . . . . . . . . . . . . . . . . . . . 3-40 Obtaining Scope Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42 Scope Format Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 3-42 Returning Information About the Scope. . . . . . . . . . . . . . . . . 3-45 Avoiding Circular Dependency . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48 Designing With $lsi_dumpports for Simulation and Test . . . . . . . 3-49 Dealing With Unassigned Nets . . . . . . . . . . . . . . . . . . . . . . . 3-50 Code Values at Time 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-51 Cross Module Forces and No Instance Instantiation . . . . . . . 3-51 Signal Value/Strength Codes . . . . . . . . . . . . . . . . . . . . . . . . . 3-53 4. Compiling the Design Compiling or Elaborating the Design in Debug Mode . . . . . . . . . 4-1 Compiling or Elaborating the Design in Optimized Mode . . . . . . 4-2 Dynamic Loading of DPI Libraries at Runtime . . . . . . . . . . . . . . 4-3 The Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Dynamic Loading of PLI Libraries at Runtime . . . . . . . . . . . . . . . 4-5 vi Key Compilation or Elaboration Features. . . . . . . . . . . . . . . . . . 4-5 Initializing Verilog Variables, Registers and Memories . . . . . 4-6 Initializing Verilog Variables, Registers and Memories in an entire Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6 Initializing Verilog Variables, Registers and Memories in Selective Parts of a Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Selections for Initialization of Registers or Memories. . . . 4-12 Reporting the Initialized Values of Variables, Registers and Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 Overriding Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Checking for X and Z Values In Conditional Expressions . . . 4-14 Enabling the Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Filtering Out False Negatives. . . . . . . . . . . . . . . . . . . . . . 4-16 VCS V2K Configurations and Libmaps. . . . . . . . . . . . . . . . . 4-18 Library Mapping Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20 Hierarchical Configurations . . . . . . . . . . . . . . . . . . . . . . . 4-24 The -top Compile-time Option . . . . . . . . . . . . . . . . . . . . . 4-25 Limitations of Configurations . . . . . . . . . . . . . . . . . . . . . . 4-25 Lint Warning Message for Missing ‘endcelldefine . . . . . . . . . 4-26 Error/Warning/Lint Message Control . . . . . . . . . . . . . . . . . . . 4-30 Controlling Error/Warning/Lint Messages Using Compile-Time Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30 Obsolete Compile-Time Options for Controlling Messages 4-47 Controlling Error/Warning/Lint Messages Using a Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-47 Extracting the Files Used in Compilation . . . . . . . . . . . . . . . . 4-56 XML File Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-57 vii 5. Simulating the Design Using DVE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Using UCLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 ucli2Proc Command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 Options for Debugging Using DVE and UCLI . . . . . . . . . . . . . . . 5-6 Reporting Forces/Injections in a Simulation . . . . . . . . . . . . . . . . 5-8 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 Reporting Force/Deposit/Release Information. . . . . . . . . . . . 5-10 Handling Forces on Bit/Part Select and MDA Word. . . . . 5-11 Handling Forces on Concatenated Codes . . . . . . . . . . . . 5-12 Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Usage Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18 Key Runtime Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20 Passing Values from the Runtime Command Line . . . . . . . . 5-21 Save and Restart The Simulation . . . . . . . . . . . . . . . . . . . . . 5-22 Save and Restart Example. . . . . . . . . . . . . . . . . . . . . . . . 5-23 Save and Restart File I/O . . . . . . . . . . . . . . . . . . . . . . . . . 5-24 Save and Restart With Runtime Options . . . . . . . . . . . . . 5-25 Specifying a Long Time Before Stopping The Simulation . . . 5-26 How VCS Prevents Time 0 Race Conditions. . . . . . . . . . . . . 5-28 6. The Unified Simulation Profiler The Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Omitting Profiling at Runtime . . . . . . . . . . . . . . . . . . . . . . . . . 6-4 Omitting the -simprofile Runtime Option . . . . . . . . . . . . . . . . 6-5 viii Omitting Profile Report Writing after Runtime . . . . . . . . . . . . 6-6 Specifying a Directory for the Profile Database . . . . . . . . . . . 6-6 Post Simulation Profile Information . . . . . . . . . . . . . . . . . . . . . . . 6-7 Specifying the Name of the Profile Report. . . . . . . . . . . . . . . 6-7 Running the profrpt Profile Report Generator . . . . . . . . . . . . . . . 6-8 Specifying Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 The Snapshot Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13 Specifying Timeline Reports . . . . . . . . . . . . . . . . . . . . . . . . . 6-14 Recording and Viewing Memory Stack Traces . . . . . . . . . . . 6-15 Reporting PLI, DPI, and DirectC Function Call Information. . 6-15 Compiling and Running the Profiler Example. . . . . . . . . . 6-16 Profiling Time Used by Various Parts of the Design. . . . . 6-18 Profiling Memory Used by Various Parts of the Design . . 6-19 The Output Directories and Files . . . . . . . . . . . . . . . . . . . . . . 6-20 The Enhanced Accumulative Views. . . . . . . . . . . . . . . . . . . . 6-21 The Comparative View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-28 The Caller-Callee Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30 HTML Profiler Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-36 Hypertext Links to the Source Files . . . . . . . . . . . . . . . . . . . . 6-62 Single Text Format Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-66 Stack Trace Report Example . . . . . . . . . . . . . . . . . . . . . . . . . 6-66 SystemC Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-69 Constraint Profiling Integrated in the Unified Profiler . . . . . . . . . 6-77 Changes to the Use Model for Constraint Profiling . . . . . . . . 6-77 The Time Constraint Solver View. . . . . . . . . . . . . . . . . . . . . . 6-79 ix The Memory Constraint Solver View . . . . . . . . . . . . . . . . . . . 6-87 Performance/Memory Profiling for Coverage Covergroups. . . . . 6-91 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-92 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-92 HTML Profiler Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-93 Default Summary View. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-93 Time/Memory Summary View . . . . . . . . . . . . . . . . . . . . . 6-94 Time/Memory Module View . . . . . . . . . . . . . . . . . . . . . . . 6-94 Time/Memory Construct View . . . . . . . . . . . . . . . . . . . . . 6-95 Time/Memory Covergroup View. . . . . . . . . . . . . . . . . . . . 6-97 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-97 7. Diagnostics Using Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Using –diag Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Using Smartlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Compile-time Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Libconfig Diagnostics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5 Timescale Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6 Runtime Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10 Diagnostics for VPI PLI Applications . . . . . . . . . . . . . . . . . . . 7-10 Keeping the UCLI/DVE Prompt Active After a Runtime Error 7-14 UCLI Use Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14 DVE Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16 UCLI Usage Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18 x Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20 Diagnosing Quickthread Issues in SystemC . . . . . . . . . . . . . 7-20 Quickthread Overruns Its Allocated Stack . . . . . . . . . . . . 7-21 Simulation Runs Out of Memory Due to Quickthread Stacks 7-22 Reducing or Turning Off Redzones . . . . . . . . . . . . . . . . . 7-23 Post-processing Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24 Using the vpdutil Utility to Generate Statistics . . . . . . . . . . . . 7-24 The vpdutil Utility Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 7-24 Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25 8. VCS Multicore Technology Application Level Parallelism Enabling Multicore Technology Application Level Parallelism. . . 8-2 Multicore SAIF File Dumping . . . . . . . . . . . . . . . . . . . . . . . . . 8-5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5 9. VPD, VCD, and EVCD Utilities Advantages of VPD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 Dumping a VPD File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Using System Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Enable and Disable Dumping. . . . . . . . . . . . . . . . . . . . . . 9-4 Override the VPD Filename . . . . . . . . . . . . . . . . . . . . . . . 9-7 Dump Multi-dimensional Arrays and Memories . . . . . . . . 9-8 Using $vcdplusmemorydump. . . . . . . . . . . . . . . . . . . . . . 9-17 Capture Delta Cycle Information . . . . . . . . . . . . . . . . . . . 9-18 Dumping an EVCD File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21 xi Post-processing Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23 The vcdpost Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24 Scalarizing the Vector Signals . . . . . . . . . . . . . . . . . . . . . 9-24 Uniquifying the Identifier Codes . . . . . . . . . . . . . . . . . . . . 9-25 The vcdpost Utility Syntax . . . . . . . . . . . . . . . . . . . . . . . . 9-26 The vcdiff Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-27 The vcdiff Utility Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 9-27 The vcdiff Utility Output Example . . . . . . . . . . . . . . . . . . . 9-35 The vcat Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-36 The vcat Utility Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-37 Generating Source Files From VCD Files . . . . . . . . . . . . 9-41 Writing the Configuration File . . . . . . . . . . . . . . . . . . . . . . 9-42 The vcsplit Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-46 The vcsplit Utility Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 9-47 The vcd2vpd Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-50 Options for specifying EVCD options . . . . . . . . . . . . . . . . 9-51 The vpd2vcd Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-52 The Command File Syntax. . . . . . . . . . . . . . . . . . . . . . . . 9-58 The vpdmerge Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-62 The vpdutil Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-65 10.Performance Tuning Compile-time Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Incremental Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Compile Once and Run Many Times . . . . . . . . . . . . . . . . . . . 10-4 Parallel Compilation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4 Runtime Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5 xii Using Radiant Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5 Compiling With Radiant Technology. . . . . . . . . . . . . . . . . 10-5 Applying Radiant Technology to Parts of the Design . . . . 10-6 Improving Performance When Using PLIs. . . . . . . . . . . . . . . 10-15 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16 Impact on Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17 Obtaining VCS Consumption of CPU Resources . . . . . . . . . . . . 10-18 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18 Compile time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18 Simulation Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-19 11. Using X-Propagation Introduction to X-Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1 Guidelines for Running X-Propagation Simulations. . . . . . . . 11-3 Using the X-Propagation Simulator . . . . . . . . . . . . . . . . . . . . . . . 11-6 Specifying X-propagation Merge Mode . . . . . . . . . . . . . . 11-8 X-Propagation Configuration File. . . . . . . . . . . . . . . . . . . . . . 11-16 X-Propagation Configuration File Syntax . . . . . . . . . . . . . 11-17 Xprop Instrumentation Control. . . . . . . . . . . . . . . . . . . . . . . . 11-20 Process Based X-Propagation Exclusion . . . . . . . . . . . . . . . 11-21 Bounds Checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22 Changing $uniq_prior_checkoff/on Usage Model . . . . . . . . . 11-23 Time Zero Initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-23 Handling Non-pure Functions Due to Static Lifetime . . . . . . . 11-24 X-Propagation Code Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25 If Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-26 xiii Case Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27 Edge Sensitive Expression . . . . . . . . . . . . . . . . . . . . . . . . . . 11-28 Latch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31 12. Gate-level Simulation SDF Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2 Using Unified SDF Feature . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2 Using $sdf_annotate System Task. . . . . . . . . . . . . . . . . . . . . 12-3 Using -xlrm Option for SDF Retain, Gate Pulse Propagation, and Gate Pulse Detection Warning . . . . . . . . . . . . . . . . . . . . . . . . . 12-5 Using Optimistic Mode in SDF . . . . . . . . . . . . . . . . . . . . . 12-5 Using Gate Pulse Propagation . . . . . . . . . . . . . . . . . . . . . 12-6 Generating Warnings During Gate Pulses . . . . . . . . . . . . 12-7 Precompiling an SDF File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8 Creating the Precompiled Version of the SDF file . . . . . . 12-8 SDF Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10 Delay Objects and Constructs . . . . . . . . . . . . . . . . . . . . . 12-11 SDF Configuration File Commands . . . . . . . . . . . . . . . . . 12-12 approx_command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-12 mtm_command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13 scale_command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14 SDF Example with Configuration File. . . . . . . . . . . . . . . . 12-15 Delays and Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18 Transport and Inertial Delays. . . . . . . . . . . . . . . . . . . . . . . . . 12-18 The Inertial Delay Implementation . . . . . . . . . . . . . . . . . . 12-20 Enabling Transport Delays . . . . . . . . . . . . . . . . . . . . . . . . 12-21 xiv Pulse Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-22 Pulse Control with Transport Delays . . . . . . . . . . . . . . . . . . . 12-24 Pulse Control with Inertial Delays. . . . . . . . . . . . . . . . . . . 12-26 Specifying Pulse on Event or Detect Behavior. . . . . . . . . 12-30 Specifying the Delay Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 12-35 Using the Configuration File to Disable Timing . . . . . . . . . . . . . . 12-37 Using the timopt Timing Optimizer . . . . . . . . . . . . . . . . . . . . . . . 12-37 Editing the timopt.cfg File . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-40 Editing Potential Sequential Device Entries . . . . . . . . . . . 12-40 Editing Clock Signal Entries . . . . . . . . . . . . . . . . . . . . . . . 12-41 Using Scan Simulation Optimizer . . . . . . . . . . . . . . . . . . . . . . . 12-42 ScanOpt Config File Format . . . . . . . . . . . . . . . . . . . . . . . . . 12-43 ScanOpt Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-44 Negative Timing Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-45 The Need for Negative Value Timing Checks . . . . . . . . . . . . 12-46 The $setuphold Timing Check Extended Syntax . . . . . . . 12-51 Negative Timing Checks for Asynchronous Controls . . . . 12-54 The $recrem Timing Check Syntax . . . . . . . . . . . . . . . . . 12-55 Enabling Negative Timing Checks . . . . . . . . . . . . . . . . . . . . . 12-57 Other Timing Checks Using the Delayed Signals . . . . . . . . . 12-58 Checking Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-62 Toggling the Notifier Register. . . . . . . . . . . . . . . . . . . . . . . . . 12-63 SDF Back-annotation to Negative Timing Checks. . . . . . . . . 12-64 How VCS Calculates Delays . . . . . . . . . . . . . . . . . . . . . . . . . 12-65 xv 13. Coverage Code Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1 Functional Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2 Options For Coverage Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3 14. Using OpenVera Native Testbench Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-5 Using Template Generator . . . . . . . . . . . . . . . . . . . . . . . . 14-5 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6 Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-18 Multiple Program Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-18 Configuration File Model . . . . . . . . . . . . . . . . . . . . . . . . . 14-18 Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-19 Usage Model for Multiple Programs. . . . . . . . . . . . . . . . . 14-20 NTB Options and the Configuration File. . . . . . . . . . . . . . 14-21 Class Dependency Source File Reordering. . . . . . . . . . . . . . 14-22 Circular Dependencies. . . . . . . . . . . . . . . . . . . . . . . . . . . 14-24 Dependency-based Ordering in Encrypted Files . . . . . . . 14-25 Using Encrypted Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-25 Functional Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-26 Using Reference Verification Methodology . . . . . . . . . . . . . . 14-26 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-27 xvi 15. Using SystemVerilog Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2 Using UVM With VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-3 Update on UVM-1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-4 Update on UVM-EA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-4 Natively Compiling and Elaborating UVM-1.0 . . . . . . . . . . . . 15-5 Natively Compiling and Elaborating UVM-1.1d . . . . . . . . . . . 15-5 Compiling the External UVM Library . . . . . . . . . . . . . . . . . . . 15-5 Using the -ntb_opts uvm Option. . . . . . . . . . . . . . . . . . . . 15-6 Explicitly Specifying UVM Files and Arguments. . . . . . . . 15-6 Accessing HDL Registers Through UVM Backdoor. . . . . . . . 15-7 Generating UVM Register Abstraction Layer Code . . . . . . . . 15-7 Recording UVM Transactions . . . . . . . . . . . . . . . . . . . . . . . . 15-8 Debugging UVM Testbench Designs Using DVE. . . . . . . . . . 15-9 Recording UVM Phases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-11 UVM Template Generator (uvmgen) . . . . . . . . . . . . . . . . . . . 15-11 Using Mixed VMM/UVM Libraries . . . . . . . . . . . . . . . . . . . . . 15-12 Migrating from OVM to UVM . . . . . . . . . . . . . . . . . . . . . . . . . 15-14 Where to Find UVM Examples. . . . . . . . . . . . . . . . . . . . . . . . 15-14 Where to Find UVM Documentation . . . . . . . . . . . . . . . . . . . 15-15 UVM-1.1d Documentation . . . . . . . . . . . . . . . . . . . . . . . . 15-15 UVM-1.0 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . 15-15 UVM-VMM Interop Documentation . . . . . . . . . . . . . . . . . 15-15 Using VMM with VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-16 Using OVM with VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-16 Native Compilation and Elaboration of OVM 2.1.2 . . . . . . . . 15-16 xvii Compiling the External OVM Library . . . . . . . . . . . . . . . . . . . 15-17 Using the -ntb_opts ovm Option. . . . . . . . . . . . . . . . . . . . 15-17 Explicitly Specifying OVM Files and Arguments. . . . . . . . 15-18 Recording OVM Transactions . . . . . . . . . . . . . . . . . . . . . . . . 15-18 Debugging SystemVerilog Designs . . . . . . . . . . . . . . . . . . . . . . . 15-19 Functional Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-20 Newly implemented SystemVerilog Constructs. . . . . . . . . . . . . . 15-21 Modport Expressions in an Interface . . . . . . . . . . . . . . . . . . . 15-21 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-23 Interface Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-23 Difference Between Extends and Implements . . . . . . . . . 15-26 Cast and Interface Class . . . . . . . . . . . . . . . . . . . . . . . . . 15-29 Name Conflicts and Resolution . . . . . . . . . . . . . . . . . . . . 15-30 Interface Class and Randomization . . . . . . . . . . . . . . . . . 15-33 Package Exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-35 Severity System Tasks as Procedural Statements. . . . . . . . . 15-36 Width Casting Using Parameters. . . . . . . . . . . . . . . . . . . . . . 15-38 Recently Implemented SystemVerilog Constructs. . . . . . . . . . . . 15-41 The std::randomize() Function. . . . . . . . . . . . . . . . . . . . . . . . 15-42 SystemVerilog Bounded Queues. . . . . . . . . . . . . . . . . . . . . . 15-44 wait() Statement with a Static Class Member Variable. . . . . . 15-46 Parameters and Localparams in Classes . . . . . . . . . . . . . . . 15-46 SystemVerilog Math Functions . . . . . . . . . . . . . . . . . . . . . . . 15-47 Streaming Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-48 Packing (Used on RHS) . . . . . . . . . . . . . . . . . . . . . . . . . . 15-48 Unpacking (Used on LHS) . . . . . . . . . . . . . . . . . . . . . . . . 15-49 xviii Packing and Unpacking . . . . . . . . . . . . . . . . . . . . . . . . . . 15-49 Propagation and force Statement. . . . . . . . . . . . . . . . . . . 15-49 Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-49 Structures with Streaming Operators . . . . . . . . . . . . . . . . 15-50 Constant Functions in Generate Blocks. . . . . . . . . . . . . . . . . 15-50 Support for Aggregate Methods in Constraints Using the “with” Construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-51 Debugging During Initialization SystemVerilog Static Functions and Tasks in Module Definitions . . . . . . . . . . . . . . . . . . . . . . . 15-52 Explicit External Constraint Blocks . . . . . . . . . . . . . . . . . . . . 15-56 Generate Constructs in Program Blocks . . . . . . . . . . . . . . . . 15-59 Error Condition for Using a Genvar Outside of its Generate Block 15-61 Randomizing Unpacked Structs. . . . . . . . . . . . . . . . . . . . . . . 15-62 Using the Scope Randomize Method std::randomize() . . 15-63 Using the Class Randomize Method randomize() . 15-67 Disabling and Re-enabling Randomization . . . . . . . . . . . 15-70 Using In-line Random Variable Control . . . . . . . . . . . . . . 15-74 Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-78 Making wait fork Statements Compliant with the SV LRM . . . 15-78 Making disable fork Statements Compliant with the SV LRM 15-81 Extensions to SystemVerilog. . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-82 Unique/Priority Case/IF Final Semantic Enhancements . . . . 15-83 Using Unique/Priority Case/If with Always Block or Continuous Assign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-84 Using Unique/Priority Inside a Function . . . . . . . . . . . . . . 15-87 System Tasks to Control Warning Messages. . . . . . . . . . 15-90 Single-Sized Packed Dimension Extension. . . . . . . . . . . . . . 15-91 xix Covariant Virtual Function Return Types . . . . . . . . . . . . . . . . 15-94 Self Instance of a Virtual Interface . . . . . . . . . . . . . . . . . . . . . 15-95 UVM Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-97 Error Condition for Using a Genvar Outside of its Generate Block 15-98 Using a Package in a SystemVerilog Module, Program, and Interface Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-99 16.Aspect Oriented Extensions Aspect-Oriented Extensions in SV. . . . . . . . . . . . . . . . . . . . . 16-3 Processing of AOE as a Precompilation Expansion . . . . . . . 16-5 Weaving advice into the target method . . . . . . . . . . . . . . 16-10 Pre-compilation Expansion details. . . . . . . . . . . . . . . . . . . . . 16-15 Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-16 17. Using Constraints Inconsistent Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-2 Constraint Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-4 Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-4 Randomize Serial Number. . . . . . . . . . . . . . . . . . . . . . . . . . . 17-6 Solver Trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-7 Constraint Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12 Test Case Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-13 Using multiple ntb_solver_debug arguments . . . . . . . . . . . 17-15 Summary for ntb_solver_debug. . . . . . . . . . . . . . . . . . . . . . 17-15 ntb_solver_debug=serial . . . . . . . . . . . . . . . . . . . . . . . . 17-16 ntb_solver_debug=trace. . . . . . . . . . . . . . . . . . . . . . . . . 17-16 xx ntb_solver_debug=profile. . . . . . . . . . . . . . . . . . . . . . . . 17-16 ntb_solver_debug=extract . . . . . . . . . . . . . . . . . . . . . . . 17-16 Constraint Debug Using DVE . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-17 Constraint Guard Error Suppression . . . . . . . . . . . . . . . . . . . . . . 17-19 Error Message Suppression Limitations . . . . . . . . . . . . . . . . 17-20 Flattening Nested Guard Expressions . . . . . . . . . . . . . . . 17-21 Pushing Guard Expressions into Foreach Loops . . . . . . . 17-21 Array and XMR Support in std::randomize() . . . . . . . . . . . . . . . . 17-22 Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-24 XMR Support in Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-25 XMR Function Calls in Constraints . . . . . . . . . . . . . . . . . . . . 17-27 State Variable Index in Constraints . . . . . . . . . . . . . . . . . . . . . . . 17-27 Runtime Check for State Versus Random Variables . . . . . . . 17-28 Array Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-28 Using DPI Function Calls in Constraints . . . . . . . . . . . . . . . . . . . 17-29 Invoking Non-pure DPI Functions from Constraints. . . . . . . . 17-30 Using Foreach Loops Over Packed Dimensions in Constraints . 17-34 Memories with Packed Dimensions. . . . . . . . . . . . . . . . . . . . 17-34 Single Packed Dimension . . . . . . . . . . . . . . . . . . . . . . . . 17-34 Multiple Packed Dimensions . . . . . . . . . . . . . . . . . . . . . . 17-35 MDAs with Packed Dimensions. . . . . . . . . . . . . . . . . . . . . . . 17-35 Single Packed Dimension . . . . . . . . . . . . . . . . . . . . . . . . 17-35 Multiple Packed Dimensions . . . . . . . . . . . . . . . . . . . . . . 17-35 Just Packed Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . 17-36 The foreach Iterative Constraint for Packed Arrays. . . . . . . . 17-36 xxi Randomized Objects in a Structure. . . . . . . . . . . . . . . . . . . . . . . 17-38 Support for Typecast in Constraints . . . . . . . . . . . . . . . . . . . . . . 17-40 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-40 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-40 Strings in Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-43 SystemVerilog LRM P1800-2012 Update . . . . . . . . . . . . . . . . . . 17-44 Using Soft Constraints in SystemVerilog . . . . . . . . . . . . . . . . 17-44 Using Soft Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-45 Soft Constraint Prioritization. . . . . . . . . . . . . . . . . . . . . . . 17-46 Soft Constraints Defined in Classes Instantiated as rand Members in Another Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-47 Soft Constraints Inheritance Between Classes . . . . . . . . 17-49 Soft Constraints in AOP Extensions to a Class . . . . . . . . 17-50 Soft Constraints in View Constraints Blocks. . . . . . . . . . . 17-52 Discarding Lower-Priority Soft Constraints. . . . . . . . . . . . 17-52 Unique Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-54 18.Extensions for SystemVerilog Coverage Support for Reference Arguments in get_coverage() . . . . . . . . . 18-1 get_inst_coverage() method . . . . . . . . . . . . . . . . . . . . . . . . . 18-2 get_coverage() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-2 Functional Coverage Methodology Using the SystemVerilog C/C Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-3 SystemVerilog Functional Coverage Flow . . . . . . . . . . . . . . . 18-4 Covergroup Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-6 SystemVerilog (Covergroup for C/C ): covg.sv . . . . . . . 18-7 C Testbench: test.c. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-7 xxii Approach #1: Passing Arguments by Reference . . . . . . . 18-8 Approach #2: Passing Arguments by Value . . . . . . . . . . . 18-8 Compile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-8 Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18-9 C/C Functional Coverage API Specification . . . . . . . . . . . 18-9 19. OpenVera-SystemVerilog Testbench Interoperability Scope of Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-2 Importing OpenVera types into SystemVerilog . . . . . . . . . . . . . . 19-3 Data Type Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-6 Mailboxes and Semaphores . . . . . . . . . . . . . . . . . . . . . . . . . 19-7 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-9 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-9 Enumerated Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-10 Integers and Bit-Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-12 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-13 Structs and Unions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-15 Connecting to the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-15 Mapping Modports to Virtual Ports. . . . . . . . . . . . . . . . . . . . . 19-15 Virtual Modports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-15 Importing Clocking Block Members into a Modport . . . . . 19-16 Semantic Issues with Samples, Drives, and Expects . . . . . . 19-21 Notes to Remember . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-22 Blocking Functions in OpenVera . . . . . . . . . . . . . . . . . . . 19-22 Constraints and Randomization . . . . . . . . . . . . . . . . . . . 19-22 Functional Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-23 xxiii Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-24 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19-25 20. Using SystemVerilog Assertions Using SVAs in the HDL Design . . . . . . . . . . . . . . . . . . . . . . . . . . 20-2 Using Standard Checker Library . . . . . . . . . . . . . . . . . . . . . . 20-3 Instantiating SVA Checkers in Verilog . . . . . . . . . . . . . . . 20-3 Binding SVA to a Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-4 Inlining SVAs in the Verilog Design . . . . . . . . . . . . . . . . . . . . 20-5 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-6 Controlling SystemVerilog Assertions . . . . . . . . . . . . . . . . . . . . . 20-6 Compilation and Runtime Options . . . . . . . . . . . . . . . . . . . . . 20-7 Concatenating Assertion Options . . . . . . . . . . . . . . . . . . . . . 20-9 Assertion Monitoring System Tasks. . . . . . . . . . . . . . . . . . . . 20-10 Using Assertion Categories . . . . . . . . . . . . . . . . . . . . . . . . . . 20-13 Using System Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-14 Using Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-15 Stopping and Restarting Assertions By Category . . . . . . 20-16 Viewing Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-21 Using a Report File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-22 Enhanced Reporting for SystemVerilog Assertions in Functions 20-22 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-23 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-24 Name Conflict Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-25 Checker and Generate Blocks. . . . . . . . . . . . . . . . . . . . . . . . 20-25 xxiv Controlling Assertion Failure Messages . . . . . . . . . . . . . . . . . . . 20-25 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-26 Options for Controlling Default Assertion Failure Messages . 20-26 Options to Control Termination of Simulation. . . . . . . . . . . . . 20-28 Option to Enable Compilation of OVA Case Pragmas. . . . . . 20-30 Reporting Values of Variables in the Assertion Failure Messages 20-32 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-33 Using SystemVerilog Constructs Inside vunits . . . . . . . . . . . . . . 20-34 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-35 List of supported IEEE Std. 1800-2009 Compliant SVA Features 20-35 Enabling IEEE Std. 1800-2009 Compliant Features . . . . . . . . . . 20-38 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20-39 SystemVerilog Assertions Limitations . . . . . . . . . . . . . . . . . . . . . 20-39 Debug Support for New Constructs . . . . . . . . . . . . . . . . . 20-40 Note on Cross Features . . . . . . . . . . . . . . . . . . . . . . . . . . 20-40 21. Using Property Specification Language Including PSL in the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-2 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-3 Using SVA Options, SVA System Tasks, and OV Classes . . . . . 21-4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21-5 xxv 22. Using SystemC Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-6 The syscan Utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-6 VCSSYSTEMC Macro for Compiling VCS-Specific Code . . . 22-12 Verilog Design Containing Verilog Modules and SystemC Leaf Modules 22-12 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-13 Input Files Required. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-14 Generating Verilog Wrappers for SystemC Modules . . . . 22-15 Supported Port Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . 22-19 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-20 Compiling Interface Models with acc_user.h and vhpi_user.h 22-22 Controlling Time Scale and Resolution in a SystemC . . . . . . 22-24 Automatic Adjustment of the Time Resolution . . . . . . . . . 22-24 Setting Time Scale/Resolution of Verilog Kernel. . . . . . . 22-25 Setting Time Scale/Resolution of SystemC Kernel . . . . . 22-26 Adding a Main Routine for Verilog-On-Top Designs . . . . . . . 22-27 SNPS_REGISTER_SC_MAIN . . . . . . . . . . . . . . . . . . . . . 22-28 SystemC Designs Containing Verilog Modules . . . . . . . . . . . . . . 22-29 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-29 Input Files Required. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-30 Generating a SystemC Wrapper for Verilog Modules . . . 22-31 Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-33 Compilation Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-35 SNPS_REGISTER_SC_MODULE . . . . . . . . . . 22-38 SystemC Only Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-38 xxvi Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-39 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-40 Accessing Cross Module Hierarchy . . . . . . . . . . . . . . . . . . . . . . 22-40 Controlling TimeScale Resolution . . . . . . . . . . . . . . . . . . . . . . . . 22-41 Setting Timescale of SystemC Kernel . . . . . . . . . . . . . . . . . . 22-42 Automatic Adjustment of Time Resolution . . . . . . . . . . . . 22-43 Considerations for Export DPI Tasks. . . . . . . . . . . . . . . . . . . . . . 22-43 Use syscan -export_DPI [function-name]. . . . . . . . . . . . . 22-43 Use syscan -export_DPI [Verilog-file]. . . . . . . . . . . . . . . . 22-45 Use a Stubs File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-46 Using options -Mlib and -Mdir . . . . . . . . . . . . . . . . . . . . . . . . 22-46 Specifying Runtime Options to the SystemC Simulation. . . . . . . 22-47 Using a Port Mapping File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-48 Automatic Creation of Portmap File. . . . . . . . . . . . . . . . . . . . 22-49 Using a Data Type Mapping File . . . . . . . . . . . . . . . . . . . . . . . . . 22-50 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-52 Parameters in Verilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-53 Parameters in SystemC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-53 Verilog-on-Top, SystemC-Down. . . . . . . . . . . . . . . . . . . . . . . 22-54 SystemC-on-Top, Verilog . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-55 Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-56 Parameter Specification as VCS Elaboration Arguments . . . 22-56 Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-57 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-57 Debugging Mixed Simulations Using DVE or UCLI. . . . . . . . . . . 22-57 xxvii Transaction Level Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-59 Interface Definition File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-60 Generation of the TLI Adapters . . . . . . . . . . . . . . . . . . . . . . . 22-64 Transaction Debug Output. . . . . . . . . . . . . . . . . . . . . . . . . . . 22-65 Instantiation and Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-66 Supported Data Types of Formal Arguments. . . . . . . . . . . . . 22-69 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-70 Delta-Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-71 Using a Customized SystemC Installation. . . . . . . . . . . . . . . . . . 22-72 Compatibility with OSCI SystemC . . . . . . . . . . . . . . . . . . . . . 22-74 Compiling Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-74 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-75 Using Posix Threads or Quickthreads. . . . . . . . . . . . . . . . . . . . . 22-75 VCS Extensions to SystemC Library. . . . . . . . . . . . . . . . . . . . . . 22-76 Installing VG GNU Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-81 Support for SystemC 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-81 Static and Dynamic Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-82 Static Linking in VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-82 Dynamic Linking in VCS (For C/C Files) . . . . . . . . . . . 22-83 Dynamic Linking in VCS (For SystemC Files) . . . . . . . . . 22-84 LD_LIBRARY_PATH Environment Variable . . . . . . . . . . 22-85 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-85 Incremental Compile of SystemC Source Files. . . . . . . . . . . . . . 22-87 Full Build from Scratch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-87 xxviii Full Incremental Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-88 Partial Build with Object Files . . . . . . . . . . . . . . . . . . . . . . . . 22-89 Partial Build with Shared Libraries. . . . . . . . . . . . . . . . . . . . . 22-91 Updating the Shared Library . . . . . . . . . . . . . . . . . . . . . . 22-91 Using Different Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . 22-92 Partial Build Invoked with VCS. . . . . . . . . . . . . . . . . . . . . 22-92 Partial Build if Just One Shared Library is Updated . . . . . 22-92 Adding or Deleting SC Source Files in Shared Library . . 22-93 Changing From a Shared Library Back to Object Files . . 22-93 Dependency Checking of SystemC Source Files . . . . . . . . . 22-93 TLI Direct Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-97 Accessing SystemC Members from SystemVerilog. . . . . . . . 22-98 TLI Adaptor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-98 Instantiating the TLI adaptor in SV . . . . . . . . . . . . . . . . . . 22-98 Direct Variable Access . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-99 Calling SystemC Member Function . . . . . . . . . . . . . . . . . 22-99 Arguments of Type char* Used in Blocking Member Functions 22-101 Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-101 SC_FIFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-104 Non-SystemC Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-105 Sub-classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-106 Name Clashes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-107 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-109 Compile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-109 Syntax of TLI File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-110 Debug Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-113 Accessing Struct or Class Members of a SystemC Module from SystemVerilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-114 xxix Enhancements to TLI for Providing Access to SystemC/C Class Members from SystemVerilog. . . . . . . . . . . . . . . . . . . 22-115 Accessing Struct or Class Members of a SystemC Module Object from SystemVerilog. . . . . . . . . . . . . . . . . . . . . . . . . . . 22-115 Accessing Generic C Struct or Class . . . . . . . . . . . . . . 22-119 Extensions of TLI Input File . . . . . . . . . . . . . . . . . . . . . . . 22-123 Invoking Pack or Unpack Adaptor Code Generation . . . . 22-124 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-125 Accessing Verilog Variables from SystemC. . . . . . . . . . . . . . 22-125 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-126 Access Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-126 Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-127 Usage Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-128 Type Conversion Mechanism. . . . . . . . . . . . . . . . . . . . . . 22-129 Accessing SystemVerilog Functions and Tasks from SystemC22-132 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-132 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-133 Function Declaration Hierarchy . . . . . . . . . . . . . . . . . . . . 22-134 Passing Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-135 Supported Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-136 Usage Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-136 Compile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-138 Usage Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-139 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-140 Accessing SystemC Members from SystemVerilog Using the tli_get_<type> or tli_set_<type> Functions. . . . . . . . . . . . 22-141 Using the tli_get_<type> and tli_set_<type> Functions . . 22-141 Prototypes of tli_get_<type> and tli_set_<type> Functions 22-142 Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-143 xxx Member Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-146 Type Conversion Mechanism. . . . . . . . . . . . . . . . . . . . . . 22-148 Compile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-150 Generating C Struct Definition from SystemVerilog Class Definition 22-152 Use Model for Generating C Struct from SystemVerilog Class 22-152 Data Type Conversion from SystemVerilog to C . . . . . 22-154 Example for Generating C Struct from SystemVerilog Class 22-155 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-156 Exchanging Data Between SystemVerilog and SystemC Using Byte Pack/Unpack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-157 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-158 Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-159 Unsupported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . 22-159 Mapping of SystemC/C and SystemVerilog/VMM Data Types 22-160 Usage Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-165 Using the Pack Operator . . . . . . . . . . . . . . . . . . . . . . . . . 22-165 Using Unpack Operator . . . . . . . . . . . . . . . . . . . . . . . . . . 22-166 Using Pack and Unpack Functions . . . . . . . . . . . . . . . . . . . . 22-166 Using Code Generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-169 Naming Convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-170 Input Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-170 Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-172 Supported Data types for Automatic Code Generation . . 22-173 Correcting the Generated Files . . . . . . . . . . . . . . . . . . . . 22-174 Compile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-175 xxxi Usage Example for Code Generator . . . . . . . . . . . . . . . . 22-176 Using Direct Program Interface Based Communication . . . . . . . 22-185 Limitations of Using DPI-based Communication Between Verilog and SystemC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-186 Using OPT Interface-Based Communication . . . . . . . . . . . . . . . 22-186 OPT Interface-Based Communication Limitations. . . . . . . . . 22-187 Improving VCS-SystemC Compilation Speed Using Precompiled C Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-187 Introduction to Precompiled Header Files . . . . . . . . . . . . . . . 22-188 Using Precompiled Header Files . . . . . . . . . . . . . . . . . . . . . . 22-188 Example to Use the Precompiled Header Files . . . . . . . . . . . 22-190 Invoking the Creation of Precompiled Header Files. . . . . . . . 22-191 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-192 Limitations of GNU Precompiled Header Files. . . . . . . . . 22-192 Limitations of syscan -prec . . . . . . . . . 22-192 Limitations of using -prec with path . . . . . . . . . . . . . . . . 22-194 Limitations of Sharing Precompiled Header Files . . . . . . 22-194 Increasing Stack and Stack Guard Size . . . . . . . . . . . . . . . . . . . 22-195 Increasing the Stack Size. . . . . . . . . . . . . . . . . . . . . . . . . 22-196 Increasing the Stack Guard Size . . . . . . . . . . . . . . . . . . . 22-196 Guidelines to Diagnose Stack Overrun . . . . . . . . . . . . . . 22-197 Debugging SystemC Runtime Errors . . . . . . . . . . . . . . . . . . . . . 22-198 Debugging SystemC Kernel Errors . . . . . . . . . . . . . . . . . . . . 22-198 Troubleshooting Your Elaboration Errors . . . . . . . . . . . . . 22-199 Troubleshooting Your Runtime Errors . . . . . . . . . . . . . . . 22-201 Function cbug_stop_here() . . . . . . . . . . . . . . . . . . . . . . . 22-203 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-206 xxxii Diagnosing Quickthread Issues . . . . . . . . . . . . . . . . . . . . . . . 22-206 Using HDL and SystemC Sync Loops. . . . . . . . . . . . . . . . . . . . . 22-206 The Coarse-Grained Sync Loop (blocksync). . . . . . . . . . . . . 22-207 The Fine-Grained Sync Loop (deltasync) . . . . . . . . . . . . . . . 22-207 Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-207 Alignment of Delta Cycles . . . . . . . . . . . . . . . . . . . . . . . . 22-208 Example Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-209 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-209 Restrictions That No Longer Apply. . . . . . . . . . . . . . . . . . 22-209 Newsync is Now Default . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-210 Advantages of deltasync Loop . . . . . . . . . . . . . . . . . . . . . 22-211 Simulation Differences Between blocksync and deltasync Loop 22-211 Controlling Simulation Run From sc_main . . . . . . . . . . . . . . . . . 22-216 Effect on end_of_simulation Callbacks . . . . . . . . . . . . . . . . . 22-220 Enabling E115 Check in VCS Co-Simulation Interface . . . . . . . . 22-221 UCLI Save Restore Support for SystemC-on-top and Pure-SystemC 22-223 SystemC with UCLI Save and Restore Use Model . . . . . . . . 22-224 SystemC with UCLI Save and Restore Coding Guidelines . . 22-224 Saving and Restoring Files During Save and Restore. . . . . . 22-225 Restoring the Saved Files from the Previous Saved Session 22-226 Limitations of UCLI Save Restore Support . . . . . . . . . . . . . . 22-227 Enabling Unified Hierarchy for VCS and SystemC . . . . . . . . . . . 22-227 Using Unified Hierarchy Elaboration . . . . . . . . . . . . . . . . . . . 22-227 Value Added by Option –sysc=unihier . . . . . . . . . . . . . . . 22-230 xxxiii Using the –sysc=show_sc_main Switch . . . . . . . . . . . . . . . . 22-231 SystemC Unified Hierarchy Flow Limitations. . . . . . . . . . . . . 22-232 Aligning VMM and SystemC Messages . . . . . . . . . . . . . . . . . . . 22-233 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-233 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-234 Changing Message Alignment Settings. . . . . . . . . . . . . . . . . 22-235 Mapping SystemC to VMM Severities . . . . . . . . . . . . . . . . . . 22-236 Filtering Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-237 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-240 UVM Message Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-240 Enabling UVM Message Alignment . . . . . . . . . . . . . . . . . . . . 22-240 Accessing UVM Report Object of SystemC Instance . . . . . . 22-245 Introducing TLI Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-247 TLI Adapter Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-248 SystemC Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-249 Global Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-249 User Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-251 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-255 VMM Channel Interface (vmm_tlm_generic_payload) . . . 22-255 VMM TLM Interface (vmm_tlm_generic_payload) . . . . . . 22-258 VMM Channel/TLM Interface (Other data type) . . . . . . . . 22-261 SV Interface Other Than vmm_channel/vmm_tlm . . . . . . 22-261 VMM Channel Interface Details. . . . . . . . . . . . . . . . . . . . 22-262 VMM TLM Interface Details . . . . . . . . . . . . . . . . . . . . . . . 22-265 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-269 Example-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-270 Example-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-274 xxxiv Example-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-277 Example-4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-279 Example-5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-281 Example-6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-285 Example-7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-288 Example-8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-290 Example-9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-292 Example-10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-295 Using VCS UVM TLI Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . 22-299 Using the UVM TLI Adapters . . . . . . . . . . . . . . . . . . . . . . . . . 22-299 UVM TLM Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-300 UVM Analysis Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 22-302 Handling Multiple Subscribers . . . . . . . . . . . . . . . . . . . . . 22-303 UVM TLM Communication Examples . . . . . . . . . . . . . . . . . . 22-303 uvm_tlm_blocking Example . . . . . . . . . . . . . . . . . . . . . . . 22-303 uvm_tlm_nonblocking Example . . . . . . . . . . . . . . . . . . . . 22-305 uvm_tlm_analysis Example . . . . . . . . . . . . . . . . . . . . . . . 22-307 Modeling SystemC Designs with SCV . . . . . . . . . . . . . . . . . . . . 22-310 SCV Library in VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-310 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-311 msglog Extensions for Transaction Recording with SCV in VCS 22-312 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-312 Viewing SystemC sc_report_handler Messages from Log File 22-313 Generating Profile Reports for SystemC Designs . . . . . . . . . . . . 22-313 Time Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-314 xxxv Enabling Time Profiling at Compile-time . . . . . . . . . . . . . 22-314 Using Time Profiling at Runtime. . . . . . . . . . . . . . . . . . . . 22-314 Memory Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-316 Enabling Memory Profiling at Compile-time . . . . . . . . . . . 22-316 Using Memory Profiling at Runtime . . . . . . . . . . . . . . . . . 22-316 Profiler Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-317 Profile Report Limitations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22-322 23. C Language Interface Using PLI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-2 Writing a PLI Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-2 Functions in a PLI Application . . . . . . . . . . . . . . . . . . . . . . . . 23-4 Header Files for PLI Applications. . . . . . . . . . . . . . . . . . . . . . 23-5 PLI Table File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-6 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-6 Using the PLI Table File . . . . . . . . . . . . . . . . . . . . . . . . . . 23-18 Enabling ACC Capabilities. . . . . . . . . . . . . . . . . . . . . . . . . . . 23-19 Globally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-19 Using the Configuration File. . . . . . . . . . . . . . . . . . . . . . . 23-20 Selected ACC Capabilities . . . . . . . . . . . . . . . . . . . . . . . . 23-23 PLI Access to Ports of Celldefine and Library Modules . . . . . 23-28 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-28 Visualization in DVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-30 Using VPI Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-31 Support for VPI Callbacks for Reasons cbForce and cbRelease 23-31 Support for the vpi_register_systf Routine. . . . . . . . . . . . . . . 23-32 xxxvi Integrating a VPI Application With VCS. . . . . . . . . . . . . . . . . 23-33 PLI Table File for VPI Routines . . . . . . . . . . . . . . . . . . . . . . . 23-35 Virtual Interface Debug Support. . . . . . . . . . . . . . . . . . . . . . . 23-35 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-36 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-39 Unimplemented VPI Routines . . . . . . . . . . . . . . . . . . . . . . . . 23-39 Modified VPI Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-41 Backwards Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . 23-44 Diagnostics for VPI PLI Applications . . . . . . . . . . . . . . . . . . . . . . 23-44 Using DirectC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-45 Using Direct C/C Function Calls . . . . . . . . . . . . . . . . . . . . 23-46 How C/C Functions Work in a Verilog Environment. . . 23-49 Declaring the C/C Function . . . . . . . . . . . . . . . . . . . . . 23-50 Calling the C/C Function . . . . . . . . . . . . . . . . . . . . . . . 23-56 Storing Vector Values in Machine Memory. . . . . . . . . . . . 23-58 Converting Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-60 Avoiding a Naming Problem. . . . . . . . . . . . . . . . . . . . . . . 23-63 Using Pass by Reference. . . . . . . . . . . . . . . . . . . . . . . . . 23-64 Using Direct Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-65 Using the vc_hdrs.h File. . . . . . . . . . . . . . . . . . . . . . . . . . 23-72 Access Routines for Multi-Dimensional Arrays . . . . . . . . 23-73 Using Abstract Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-74 Using vc_handle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23-75 Using Access Routines . . . . . . . . . . . . . . . . . . . . . . . . . . 23-76 Summary of Access Routines . . . . . . . . . . . . . . . . . . . . . 23-120 Enabling C/C Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . 23-125 Mixing Direct And Abstract Access . . . . . . . . . . . . . . . . . 23-127 Specifying the DirectC.h File . . . . . . . . . . . . . . . . . . . . . . 23-127 xxxvii Extended BNF for External Function Declarations . . . . . . . . 23-128 24.SAIF Support Using SAIF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2 SAIF System Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-2 The Flows to Generate a Backward SAIF File . . . . . . . . . . . . . . 24-5 Generating an SDPD Backward SAIF File. . . . . . . . . . . . . . . 24-5 Generating a Non-SPDP Backward SAIF File. . . . . . . . . . . . 24-6 SAIF Support for Two-Dimensional Memories in v2k Designs . . 24-7 UCLI SAIF Dumping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-7 Criteria for Choosing Signals for SAIF Dumping . . . . . . . . . . . . . 24-8 25.Encrypting Source Files IEEE Verilog Standard 1364-2005 Encryption. . . . . . . . . . . . . . . 25-1 The Protection Header File . . . . . . . . . . . . . . . . . . . . . . . . . . 25-3 Unsupported Protection Pragma Expressions . . . . . . . . . 25-6 Other Options for IEEE Std 1364-2005 Encryption Mode . . . 25-6 How Protection Envelopes Work . . . . . . . . . . . . . . . . . . . . . . 25-8 The VCS Public Encryption Key . . . . . . . . . . . . . . . . . . . . . . 25-9 Creating Interoperable Digital Envelopes Using VCS - Example 25-10 Discontinued -ipkey Option . . . . . . . . . . . . . . . . . . . . . . . . . . 25-14 128-bit Advanced Encryption Standard . . . . . . . . . . . . . . . . . . . . 25-15 Compiler Directives for Source Protection. . . . . . . . . . . . . . . 25-15 Using Compiler Directives or Pragmas . . . . . . . . . . . . . . . . . 25-16 xxxviii Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25-17 Automatic Protection Options . . . . . . . . . . . . . . . . . . . . . . . . 25-20 Using Automatic Protection Options . . . . . . . . . . . . . . . . . . . 25-23 Debugging Partially Encrypted Source Code. . . . . . . . . . 25-30 26. Integrating VCS with Vera Setting Up Vera and VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-2 Using Vera with VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-3 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26-4 27. Integrating VCS with Specman Type Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-2 Usage Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-3 Setting Up The Environment . . . . . . . . . . . . . . . . . . . . . . . . . 27-3 Specman e Code Accessing Verilog . . . . . . . . . . . . . . . . . . . 27-3 Using specrun and specview. . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-5 Adding Specman Objects To DVE. . . . . . . . . . . . . . . . . . . . . . . . 27-8 Version Checker for Specman. . . . . . . . . . . . . . . . . . . . . . . . . . . 27-10 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27-10 28. Integrating VCS with Denali Setting Up Denali Environment for VCS . . . . . . . . . . . . . . . . . . . 28-1 Integrating Denali with VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-2 Usage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28-2 Usage Model for Verilog Memory Models . . . . . . . . . . . . . . . 28-2 xxxix Execute Denali Commands at UCLI Prompt . . . . . . . . . . . . . 28-3 29. Integrating VCS with Debussy Using the Current Version of VCS with Novas 2010.07 Version . 29-1 Setting Up Debussy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29-2 Usage Model to Dump fsdb File. . . . . . . . . . . . . . . . . . . . . . . 29-2 Using Verilog System Tasks. . . . . . . . . . . . . . . . . . . . . . . 29-3 Using UCLI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29-3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29-4 30. VCS and CustomSim Cosimulation Integrating VCS with CustomSim . . . . . . . . . . . . . . . . . . . . . . . . 30-1 Setting up the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 30-2 Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-3 Required UNIX Paths and Variable Settings . . . . . . . . . . 30-3 Use Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30-4 31. Integrating VCS with MVSIM Native Mode Introduction to MVSIM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31-1 MVSIM Native Mode in VCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31-2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31-3 Appendix A. VCS Environment Variables Simulation Environment Variables. . . . . . . . . . . . . . . . . . . . . . . . A-1 .Optional Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . A-3 xl Appendix B. Compile-time Options Options for Accessing Verilog Libraries . . . . . . . . . . . . . . . . . B-4 Options for Incremental Compilation . . . . . . . . B-7 Options for Help and Documentation. . . . . . . . . . . . . . . . . . . B-8 Option for SystemVerilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-8 Options for SystemVerilog Assertions . . . . . . . . . . . . . . . . . . B-9 Options to Enable Compilation of OVA Case Pragmas . . . . . B-18 Options for Native Testbench. . . . . . . . . . . . . . . . . . . . . . . . . B-18 Options for Different Versions of Verilog . . . . . . . . . . . . . . . . B-23 Option for Initializing Verilog Variables, Registers and Memories with Random Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-25 Option for Initializing Verilog Variables, Registers and Memories in Selective Parts of a Design . . . . . . . . . . . . . . . . . . . . . . . B-28 Options for Selecting Register or Memory Initialization . . . . . B-32 Options for Using Radiant Technology. . . . . . . . . . . . . . . . . . B-33 Options for Starting Simulation Right After Compilation . . . . B-33 Options for Specifying Delays and SDF Files . . . . . . . . . . . . B-33 Options for Compiling an SDF File . . . . . . . . . . . . . . . . . . . . B-40 Options for Specify Blocks and Timing Checks . . . . . . . . . . . B-41 Options for Pulse Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . B-42 Options for Negative Timing Checks . . . . . . . . . . . . . . . . . . . B-43 Options for Profiling Your Design. . . . . . . . . . . . . . . . . . . . . . B-45 Options to Specify Source Files and Compile-time Options in a File B-45 Options for Compiling Runtime Options into the Executable. B-46 Options for PLI Applications . . . . . . . . . . . . . . . . . . . . . . . . . B-46 xli Options to Enable the VCS DirectC Interface . . . . . . . . . . . . B-50 Options for Flushing Certain Output Text File Buffers . . . . . . B-50 Options for Simulating SWIFT VMC Models and SmartModels B-52 Options for Controlling Messages . . . . . . . . . . . . . . . . . . . . . B-52 Options for Cell Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . B-57 Options for Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-58 Options for Controlling the Linker . . . . . . . . . . . . . . . . . . . . . B-59 Options for Controlling the C Compiler . . . . . . . . . . . . . . . . . B-62 Options for Source Protection . . . . . . . . . . . . . . . . . . . . . . . . B-64 Options for Mixed Analog/Digital Simulation . . . . . . . . . . . . . B-64 Options for Changing Parameter Values . . . . . . . . . . . . . . . . B-66 Checking for X and Z Values in Conditional Expressions . . . B-67 Options for Detecting Race Conditions . . . . . . . . . . . . . . . . . B-67 Options to Specify the Time Scale . . . . . . . . . . . . . . . . . . . . . B-68 Options for Overriding Parameters . . . . . . . . . . . . . . . . . . . . B-69 General Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-72 Specifying Directories for ‘include Searches . . . . . . . . . . B-72 Enable the VCS/SystemC Cosimulation Interface . . . . . . B-73 TetraMAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-74 Suppressing Port Coersion to inout . . . . . . . . . . . . . . . . . B-74 Allow Inout Port Connection Width Mismatches. . . . . . . . B-74 Allow Zero or Negative Multiconcat Multiplier . . . . . . . . . B-74 Specifying a VCD File. . . . . . . . . . . . . . . . . . . . . . . . . . . . B-75 Enabling Dumping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-75 Enabling Identifier Search . . . . . . . . . . . . . . . . . . . . . . . . B-75 Memories and Multi-Dimensional Arrays (MDAs) . . . . . . B-76 Specifying a Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-77 xlii Changing Source File Identifiers to Upper Case . . . . . . . B-77 Defining a Text Macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . B-78 Specifying the Name of the Executable File. . . . . . . . . . . B-78 Returning The Platform Directory Name . . . . . . . . . . . . . B-78 Enabling Loop Detect. . . . . . . . . . . . . . . . . . . . . . . . . . . . B-79 Changing the Time Slot of Sequential UDP Output Evaluation B-80 Gate-Level Performance . . . . . . . . . . . . . . . . . . . . . . . . . B-80 Option to Omit Compilation of Code Between Pragmas . B-81 Generating a List of Source Files . . . . . . . . . . . . . . . . . . . B-82 Appendix C. Simulation Options Options for Simulating Native Testbenches . . . . . . . . . . . . . . C-2 Options for SystemVerilog Assertions . . . . . . . . . . . . . . . . . . C-10 Options to Control Termination of Simulation. . . . . . . . . . . . . C-20 Options for Enabling and Disabling Specify Blocks . . . . . . . . C-20 Options for Specifying When Simulation Stops . . . . . . . . . . . C-21 Options for Recording Output . . . . . . . . . . . . . . . . . . . . . . . . C-22 Options for Controlling Messages . . . . . . . . . . . . . . . . . . . . . C-22 Options for VPD Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-24 Options for VCD Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-26 Options for Specifying Delays . . . . . . . . . . . . . . . . . . . . . . . . C-27 Options for Flushing Certain Output Text File Buffers . . . . . . C-29 Options for Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-30 Option to Specify User-Defined Runtime Options in a File . . C-30 Option for Initializing Verilog Variables, Registers and Memories at Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-31 xliii Option for Initializing Verilog Variables, Registers and Memories in Selective Parts of a Design at Runtime . . . . . . . . . . . . . . C-32 General Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-34 Viewing the Compile-Time Options . . . . . . . . . . . . . . . . . C-34 Recording Where ACC Capabilities are Used . . . . . . . . . C-34 Suppressing the $stop System Task . . . . . . . . . . . . . . . . C-35 Enabling User-defined Plusarg Options . . . . . . . . . . . . . . C-35 Enabling Overriding the Timing of a SWIFT SmartModel. C-35 Enabling Loop Detect. . . . . . . . . . . . . . . . . . . . . . . . . . . . C-35 Specifying acc_handle_simulated_net PLI Routine . . . . . C-36 Loading DPI Libraries Dynamically at Rutime . . . . . . . . . C-37 Loading PLI Libraries Dynamically at Runtime. . . . . . . . . C-38 Appendix D. Compiler Directives and System Tasks Compiler Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1 Compiler Directives for Cell Definition . . . . . . . . . . . . . . . . . . D-2 Compiler Directives for Setting Defaults . . . . . . . . . . . . . . . . D-2 Compiler Directives for Macros . . . . . . . . . . . . . . . . . . . . . . . D-3 Compiler Directives for Delays. . . . . . . . . . . . . . . . . . . . . . . . D-5 Compiler Directives for Backannotating SDF Delay Values. . D-6 Compiler Directives for Source Protection. . . . . . . . . . . . . . . D-7 General Compiler Directives . . . . . . . . . . . . . . . . . . . . . . . . . D-7 Compiler Directive for Including a Source File . . . . . . . . . D-7 Compiler Directive for Setting the Time Scale . . . . . . . . . D-8 Compiler Directive for Specifying a Library . . . . . . . . . . . D-8 Compiler Directive for File Names and Line Numbers . . . D-9 Unimplemented Compiler Directives . . . . . . . . . . . . . . . . . . . D-9 System Tasks and Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . D-10 xliv System Tasks for SystemVerilog Assertions Severity . . . . . . D-10 System Tasks for SystemVerilog Assertions Control . . . . . . . D-10 System Tasks for SystemVerilog Assertions . . . . . . . . . . . . . D-11 System Tasks for VCD Files . . . . . . . . . . . . . . . . . . . . . . . . . D-12 System Tasks for LSI Certification VCD and EVCD Files . . . D-14 System Tasks for VPD Files. . . . . . . . . . . . . . . . . . . . . . . . . . D-18 System Tasks for SystemVerilog Assertions . . . . . . . . . . . . . D-26 System Tasks for Executing Operating System Commands . D-27 System Tasks for Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . D-27 System Tasks for Data Type Conversions . . . . . . . . . . . . . . . D-28 System Tasks for Displaying Information. . . . . . . . . . . . . . . . D-29 System Tasks for File I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . D-29 System Tasks for Loading Memories. . . . . . . . . . . . . . . . . . . D-32 System Tasks for Time Scale. . . . . . . . . . . . . . . . . . . . . . . . . D-33 System Tasks for Simulation Control . . . . . . . . . . . . . . . . . . . D-33 System Tasks for Timing Checks. . . . . . . . . . . . . . . . . . . . . . D-33 Timing Checks for Clock and Control Signals . . . . . . . . . . . . D-34 System Tasks for PLA Modeling . . . . . . . . . . . . . . . . . . . . . . D-37 System Tasks for Stochastic Analysis . . . . . . . . . . . . . . . . . . D-37 System Tasks for Simulation Time. . . . . . . . . . . . . . . . . . . . . D-37 System Tasks for Probabilistic Distribution . . . . . . . . . . . . . . D-38 System Tasks for Resetting VCS. . . . . . . . . . . . . . . . . . . . . . D-39 General System Tasks and Functions . . . . . . . . . . . . . . . . . . D-40 Checks for a Plusarg . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-40 SDF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-40 Counting the Drivers on a Net . . . . . . . . . . . . . . . . . . . . . D-40 xlv Depositing Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-40 Fast Processing Stimulus Patterns. . . . . . . . . . . . . . . . . . D-41 Saving and Restarting The Simulation State . . . . . . . . . . D-41 Checking for X and Z Values in Conditional Expressions D-41 Calculating Bus Widths . . . . . . . . . . . . . . . . . . . . . . . . . . D-42 Displaying the Method Stack . . . . . . . . . . . . . . . . . . . . . . D-43 IEEE Standard System Tasks Not Yet Implemented . . . . . . . D-47 Appendix E. PLI Access Routines Access Routines for Reading and Writing to Memories . . . . . . . E-2 acc_setmem_int. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-4 acc_getmem_int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-5 acc_clearmem_int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-6 acc_setmem_hexstr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-11 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-12 acc_getmem_hexstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-15 acc_setmem_bitstr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-16 acc_getmem_bitstr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-17 acc_handle_mem_by_fullname . . . . . . . . . . . . . . . . . . . . . . . E-18 acc_readmem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-18 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-19 acc_getmem_range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-21 acc_getmem_size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-22 acc_getmem_word_int. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-23 acc_getmem_word_range . . . . . . . . . . . . . . . . . . . . . . . . . . . E-24 Access Routines for Multidimensional Arrays . . . . . . . . . . . . . . . E-24 xlvi tf_mdanodeinfo and tf_imdanodeinfo. . . . . . . . . . . . . . . . . . . E-26 acc_get_mda_range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-27 acc_get_mda_word_range() . . . . . . . . . . . . . . . . . . . . . . . . . E-29 acc_getmda_bitstr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-30 acc_setmda_bitstr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-31 Access Routines for Probabilistic Distribution . . . . . . . . . . . . . . . E-32 vcs_random . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-33 vcs_random_const_seed. . . . . . . . . . . . . . . . . . . . . . . . . . . . E-34 vcs_random_seed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-34 vcs_dist_uniform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-35 vcs_dist_normal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-35 vcs_dist_exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-36 vcs_dist_poisson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-37 Access Routines for Returning a Pointer to a Parameter Value . E-37 acc_fetch_paramval_str. . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-38 Access Routines for Extended VCD Files . . . . . . . . . . . . . . . . . . E-38 acc_lsi_dumpports_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-40 acc_lsi_dumpports_call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-41 acc_lsi_dumpports_close. . . . . . . . . . . . . . . . . . . . . . . . . . . . E-43 acc_lsi_dumpports_flush . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-44 acc_lsi_dumpports_limit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-45 acc_lsi_dumpports_misc . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-46 acc_lsi_dumpports_off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-47 acc_lsi_dumpports_on. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-48 acc_lsi_dumpports_setformat . . . . . . . . . . . . . . . . . . . . . . . . E-50 xlvii acc_lsi_dumpports_vhdl_enable . . . . . . . . . . . . . . . . . . . . . . E-51 Access Routines for Line Callbacks . . . . . . . . . . . . . . . . . . . . . . E-52 acc_mod_lcb_add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-53 acc_mod_lcb_del. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-55 acc_mod_lcb_enabled. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-57 acc_mod_lcb_fetch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-57 acc_mod_lcb_fetch2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-59 acc_mod_sfi_fetch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-61 Access Routines for Source Protection. . . . . . . . . . . . . . . . . . . . E-62 vcsSpClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-66 vcsSpEncodeOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-67 vcsSpEncodeOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-68 vcsSpEncoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-70 vcsSpGetFilePtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-71 vcsSpInitialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-72 vcsSpOvaDecodeLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-73 vcsSpOvaDisable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-74 vcsSpOvaEnable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-75 vcsSpSetDisplayMsgFlag . . . . . . . . . . . . . . . . . . . . . . . . . . . E-77 vcsSpSetFilePtr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-77 vcsSpSetLibLicenseCode . . . . . . . . . . . . . . . . . . . . . . . . . . . E-78 vcsSpSetPliProtectionFlag. . . . . . . . . . . . . . . . . . . . . . . . . . . E-79 vcsSpWriteChar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-80 vcsSpWriteString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-81 Access Routine for Signal in a Generate Block. . . . . . . . . . . . . . E-83 xlviii acc_object_of_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-83 VCS API Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-83 Vcsinit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-84 VcsSimUntil() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-84
标签: User Guide GUIDE User GUID IDE
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论