UVM access to external parameters method - $ value $ plusargs

In use UVM verification, we often use to write a sanity embodiment, and thereby generating a different use cases by changing the parameters. One method is to use cases to achieve them by uvm_config_db pass parameters, which is the conventional usage do not speak aside, now talk about the acquisition parameters by $ value $ plusarg.
Parameter file into a verification environment we may need to capture them, as follows:
following steps:
1. Define the desired file among the parameters, and assign a default value;
Here Insert Picture Description
2. Among the new function by $ value $ plusarg acquisition parameters, the first parameter is a string type, and its structure is a parameter name + "=" + "parameter type as 10 decimal, hexadecimal" and the second is the need to assign parameters file;
3. define a cfg file for storing the parameter needs to be changed, the structure is: "+" + "parameter name" + "=" + "value (usual type)", need to ensure that the first parameter name and in $ value $ plusarg the same parameters, or can not be acquired.
Here Insert Picture Description
4. If the parameters corresponding to the acquired, $ value $ plusarg returns a value of 1, otherwise 0; return value is 0, the default value of the parameter does not change, otherwise it will change;
5. in top distributed file, it may generate a different verification embodiment the following parameters need to add the makefile:
Here Insert Picture Description

Published 22 original articles · won praise 3 · Views 763

Guess you like

Origin blog.csdn.net/weixin_39662684/article/details/104576602