Detailed Tool Operation For Generating Single UVM Component Object - hellovimo/uvm_testbench_gen GitHub Wiki

Table of Contents

1. Lets Deep Dive and See The Detailed Operation Of UVM Template Generator As Given Below

The UVM template generator provides the user to generate,

  • Single UVM Components
  • Complete UVM VIP as shown below in Figure 1.

2. Creating Single UVM Component/Object

  • If you click the “Single UVM Component” generator button, below Figure 2 shows the list of individual components that you can create
  • Let’s take an example of creating an agent. All you need to do is enter the name of the name of the agent you wanted to create and click the Agent radio button as shown in the below Figure 3.
  • Below Figure 4 shows the filled in state for the Agent component.
  • Once all the information is entered, all the user needs to do is click the "GENERATE CODE" button and then the tool will generate all the required UVM templates related to this agent component as shown below in Figure 5. The user can exit the tool by clicking the "EXIT CODE GENERATOR" or by clicking the other buttons to generate different templates.
  • Below snapshot in Figure 6 shows the code snippet for the agent component. Similarly the other components contains the required UVM templates.

3. Interface File Generation

  • Interface are created specifically to encapsulate the communication between blocks, allowing a smooth refinement from abstract system-level through successive steps down to lower RTL and structural levels of the design and also helps in binding the static world with the dynamic testbench world.
  • The tool provides user with 3 ways of creating the interface as shown below in Figure 7, namely "Default interface, User Defined Interface and Load Interface from spreadsheet".
  • Default interface are just dummy interface template where the user has to write/fill in all the required interface information not through the tool. Snapshot of the dummy interface is shown below in Figure 8.
  • Now lets see the working operation of "User Defined Interface". The moment user clicks the drop-down option and chooses the "User Defined Interface", the tool automatically pops-up the entry frame for user to fill up the interface definition details and the entry widget is self explanatory as shown below in Figure 9.
  • Below is an example of the fill-ed in details for a signal inside the frame entry widget. Once the user enters the details about a signal and if he wanted to add more signals onto the interface, the user just need to click the "NEXT INTERFACE CONFIG" button and by doing so the tool adds up a new entry widget row for the user to enter more signals/details. Below Figure 10 shows the examples.
  • Below Figure 11 shows an example of filled in details for the interface.
  • Once when the user knows that he has entered all the required signal information's all he needs to do is click "DONE INTERFACE CONFIG" to let the tool know you have finished entering all the required details. When the user clicks done interface, the tool interface captures all the user defined interface signals names into their respective hash arrays and use it during the generation stage. Below Figure 12 shows the tool after the user clicked the done interface config and before generating the interface. All the user needs to do now is click the "GENERATE CODE" to produce the interface output.
  • Below Figure 13 shows the code snippet for the user defined interface that we created with required details described below.
  • Now lets see the working operation of "Load Interface". In this mode the user can define the required interface definition in the spread-sheet and load it into the tool to generate the required interface output. He can also modify and regenerate the required interface. The moment user clicks the drop-down option and chooses the "Load Interface", the tool automatically pops-up drop-down option to choose the required spread-sheet to be loaded as shown in the below Figure 14.
  • The moment when the user clicks the right click, the tool pops-up the file browser window as shown below in Figure 15. So the user can choose the required spread-sheet which contains the interface details and press "DONE INTERFACE CONFIG" to indicate to the tool that interface definition is provided by load interface and proceed to generate the output.
  • Below Figure 16 shows the format of spread-sheet which the tool utilizes and so does provided to the user to enter the interface definition.
  • For more usability, not only the tool takes only the interface information provided in the Sheet1, but the user can maintain the same spread sheet to have details about multiple interfaces in different sheet. All the user has to do is, choose the required spread-sheet file from the file dialog window and enter the sheet name which the user wanted to use to generate the required interface. Please see the below Figure 17 for example. Format : (Spread Sheet Path), (Sheet name) Eg : Uvm_Template_Generator_Interface_Declaration_Sample_2.xlsx, Sheet2
  • Reference/Example spreadsheet is kept in the below path. You can copy over to your local area for further testing.

    Interface Definition Spread Sheet

  • Below Figure 18 shwos the interface file created using the 3rd option which is by loading the interface defined in the spread-sheet.