The Agnisys PSS Extension in VS Code: Enhancing Portable Stimulus Development with Validation, Hinting, and Fast Development
The Agnisys PSS (Portable Stimulus Standard) Extension in Visual Studio Code (VS Code) is an essential tool for hardware verification engineers working =with the Portable Stimulus Standard (PSS). PSS, defined by Accellera, enables efficient, reusable, and scalable verification across different levels of abstraction in system-on-chip (SoC) designs. The PSS extension in VS Code helps developers write PSS models faster by offering real-time feedback, code validation, error detection, and context-wise suggestions, making the verification process more robust and streamlined.
This article explores how the PSS Extension for VS Code supports verification engineers with essential features such as validation, hinting, error highlighting, and faster development workflows.
What is the PSS?
PSS is a powerful and flexible language used to describe verification intent and scenarios across different platforms and abstraction levels. It allows engineers to specify complex stimulus, coverage, and checks in a way that is portable across different simulation, emulation, and FPGA prototyping environments.
PSS enables:
- Portable verification scenarios that can be reused across different tools and abstraction layers
- Efficient generation of tests based on complex verification scenarios and constraints Flexibility in expressing intent, including data flow, control flow, and stimulus generation
While PSS offers a lot of benefits, writing and managing complex PSS models manually can be error-prone, especially when dealing with large-scale SoC verification. This is where the PSS Extension in VS Code comes in to assist developers by improving productivity and ensuring the accuracy of the PSS code.
Why Use the Agnisys PSS Extension in VS Code?
Verification engineers require a tool that facilitates the writing of complex PSS models and ensures correctness and consistency. The PSS Extension for VS Code offers features such as real-time syntax validation, auto-completion, error reporting, and hints that are crucial for fast and accurate development. Integrating with VS Code allows engineers to use a familiar, lightweight IDE with a rich ecosystem of extensions and tools, making it ideal for managing large verification projects.
Key Features of the PSS Extension for VS Code
- Real-Time Validation:
- On-the-fly validation ensures that any syntax errors or structural issues in your PSS models are detected as you type. This immediate feedback helps in quickly identifying and resolving issues before they propagate further into the verification process.
- Whether you’re defining complex hierarchical actions, constraints, or resources, any mistake—including missing semicolons, misplaced braces, or wrong type declarations—will be caught and flagged instantly.
- Syntax Highlighting:
- Writing complex PSS models can lead to visual clutter, especially when dealing with many hierarchical elements, constraints, and actions. The extension provides syntax highlighting for PSS constructs, including actions, components, behaviors, constraints, and resources, making the code easier to read and navigate.
- Intelligent Code Hinting and Auto-Completion:
- The IntelliSense feature of the PSS extension provides context-aware suggestions based on the code you’re writing. This includes auto-completion for keywords, type definitions, actions, components, and constraints, allowing you to write code faster and avoid mistakes.
- For example, when declaring a resource or action, the extension will suggest valid keywords and options, helping you quickly set up correct PSS structures.
- Error Highlighting:
- The extension includes error detection and highlighting for both syntax and semantic errors. If you forget to declare an action, use an undeclared resource, or violate PSS rules, the extension will flag the error, and the Problems tab in VS Code will provide detailed descriptions of the issues.
- Highlighted errors allow you to fix problems immediately, reducing debugging time and ensuring a clean, functional codebase.
- Constraint and Scenario Checking:
- One of the challenges in PSS modeling is ensuring that all constraints and scenarios are defined properly and interact as expected. The extension helps by checking for constraint conflicts or missing scenario definitions.
- It will warn you if constraints are overly restrictive or contradictory, allowing you to quickly adjust them for proper scenario generation.
- Faster Development with Code Snippets:
- Predefined code snippets are available for common PSS constructs, including action definitions, component hierarchies, and constraint setups. Instead of manually writing each structure, you can use shortcuts to quickly insert a template, improving productivity.
- For example, typing action might automatically generate a full action template, with placeholders for customization, reducing repetitive typing and minimizing the chance of errors.
- Integration with PSS Tools:
- The PSS Extension can be integrated with external tools and compilers, allowing you to validate and run PSS models directly from the editor. This can be useful for quick iterations and checking your PSS model against a simulator or other verification tool.
- The extension helps bridge the gap between writing PSS models and executing them, streamlining the workflow from development to test generation.
- Project Management:
- With built-in project management features, the PSS extension allows you to organize large PSS projects with ease. You can group multiple files, manage imports, and navigate between different verification scenarios effortlessly within VS Code’s project explorer.
- The extension also provides import handling and ensures that any referenced PSS models are correctly included, avoiding runtime issues later during verification.
Benefits of Using the PSS Extension in VS Code
- Faster and More Accurate Development:
- The combination of real-time validation, intelligent hinting, and code snippets ensures that verification engineers can develop PSS models faster while minimizing errors. This leads to increased productivity and reduced debugging time.
- Error-Free Verification Models:
- By detecting errors as you write, the extension helps ensure that your PSS models are error-free before moving to the test generation and execution phases. This reduces the risk of costly mistakes during the verification process.
- Enhanced Readability and Maintainability:
- The syntax highlighting, project management, and code snippet features make PSS models more readable, maintainable, and easy to navigate. This is particularly helpful in large projects with multiple verification scenarios and constraints.
- Efficient Collaboration:
- Teams working on verification projects can standardize their workflows using VS Code and the PSS extension. Consistent code styles, linting, and validation help maintain a clean and uniform codebase, improving collaboration and reducing merge conflicts.
- Seamless Integration into Verification Workflow:
- The extension integrates well with PSS tools, simulators, and debuggers, making it easy to transition from writing PSS models to running them in a verification environment. This reduces context-switching and speeds up the overall development cycle.
Conclusion
The PSS Extension for VS Code is a must-have tool for hardware verification engineers using the Portable Stimulus Standard. With features such as real-time validation, code hinting, error highlighting, and snippets for common PSS constructs, the extension greatly enhances productivity, reduces errors, and accelerates the verification process.
Whether you’re working on complex multi-level verification scenarios or simple constraint-based tests, the PSS Extension helps you write error-free, maintainable, and reusable verification models, making PSS development in VS Code faster and more efficient.
Getting Started
To start using the PSS Extension in VS Code:
- Download and install Visual Studio Code.
- URL : https://code.visualstudio.com/download
- Click on the highlighted button to search for the extension. In the search bar, type ‘Agnisys PSS.’ Then, click ‘Install’ on the first option to add the extension to VSCode.
Ensure you have Java 8 or above. You can download it from Oracle’s website.
After installing Java, restart VS Code and contact our support team for a license before using the extension.
- Open your PSS files or start a new PSS project and enjoy features such as real-time validation, intelligent code hints, and error reporting for an enhanced development experience.
Start writing PSS code in VS Code, and the extension will suggest improvements and highlight errors with red squiggly lines.
There’s an error on line 22—it should be bit rather than bi.
By using this extension, you’ll be able to focus more on creating high-quality verification models and less on manual error fixing, ultimately improving your verification productivity!