How to Use DVT AI Assistant Blueprints in Eclipse

Overview

Blueprints are pre-configured context-aware tasks that are used to automate specific coding related activities within your project. This video showcases built-in Blueprints and exemplifies the creation of new ones.

Details

DVT IDE AI Assistant enables seamless interaction with Large Language Models. Blueprints are pre-configured context-aware tasks that are used to automate specific coding-related activities within your project. A blueprint contains at least a request to the LLM and can be used to start either a Chat or an Editor Session.

The AI Assistant provides a library of predefined blueprints. Simply open the AI Assistant Commands window and type Blueprint to see all the available ones.

Examples Using Predefined Blueprints

Select a piece of code, right click and choose Explain the Selected Code (in chat). Notice the underlying request, and the LLM`s response in the chat view. Blueprint requests can contain natural language as well as other DVT-specific constructs such as snippets and symbols. Feel free to continue the chat conversation, picking one of the suggested follow-up questions.

Next, select a piece of code and use the Analyze and Fix the Selected Code (in editor) blueprint. Notice the LLM`s reply being seamlessly inserted in the current editor. When finished, DVT's incremental compilation automatically validates the changes.

Examples Using Custom Blueprints

Alongside predefined blueprints, you can create custom ones to be reused and shared across the team. Take this Create Virtual Interface chat conversation for example. The user request instructs the LLM to generate a virtual interface for a given module, instantiate the interface and connect it to the DUT, and set its reference in the uvm_config_db. To save this initial request as a blueprint, use the Save Message as Blueprint button. To reuse the prompt, place the cursor within a module, open the AI Assistant Commands window, choose the Start a New Session from Blueprint command, and select it from the list. Once the LLM response is complete, you can easily place each block of code into its corresponding section of the project.

Blueprints can also serve as baselines for future conversations. Take this chat conversation for example. The user request aims to provide relevant context on the design currently under development. To save the entire conversation as a blueprint, click Save Chat Session as Blueprint. Now you can start a new session from the saved blueprint. Your next requests in this chat session, such as multiple module instantiations and auto-stitching will benefit from the context given at the start of the conversation. Let's generate a Schematic Diagram to visualize and validate the semantics of the generated response.

Custom Blueprints that insert the LLM response into the editor can also be created. Let's take a look at this Create UVM Register chat conversation. It instructs the LLM to generate a UVM register from the IPXACT specification selected in the editor. By the way, you might find out that some models do better at specific types of tasks, so make sure to select the best one. Next, click Save Message as Blueprint, and adjust its parameters. Then select the IPXACT reg description and start a new session from the saved blueprint. Of course, DVT's Incremental Compilation will assist in identifying and resolving any potential code errors in the LLM`s response.