Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // Place your snippets for systemverilog here. Each snippet is defined under a snippet name and has a prefix, body and
- // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
- // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
- // same ids are connected.
- // Example:
- // "Print to console": {
- // "prefix": "log",
- // "body": [
- // "console.log('$1');",
- // "$2"
- // ],
- // "description": "Log output to console"
- // }
- "UVM Info": {
- "prefix": "uinfo",
- "body": ["`uvm_info(get_name(),$sformatf(\"$1\"),UVM_${2:LOW});"]
- },
- "UVM Error": {
- "prefix": "uerror",
- "body": ["`uvm_error(get_name(),$sformatf(\"$1\"));"]
- },
- "UVM Fatal": {
- "prefix": "ufatal",
- "body": ["`uvm_fatal(get_name(),$sformatf(\"$1\"));"]
- },
- "Variable with comments" : {
- "prefix": "uvar",
- "body": [
- "// Variable: ${1:name}",
- "// ${2:Variable Description}",
- "${3:int} ${1};"
- ]
- },
- "Task SystemVerilog" : {
- "prefix": "utask",
- "body": [
- "/*",
- " * Task: ${1}",
- " *",
- " * ${2}",
- " *",
- " * Parameters:",
- " *",
- " */",
- "task ${1}();",
- " ${0}",
- "endtask // ${1}"
- ]
- },
- "Function SystemVerilog" : {
- "prefix" : "ufunction",
- "body": [
- "/*",
- " * Function: ${1}",
- " *",
- " * ${2}",
- " *",
- " * Parameters:",
- " *",
- " */",
- "function ${1}();",
- " ${0}",
- "endfunction // ${1}"
- ]
- },
- "UVM object": {
- "prefix": "uobj",
- "body": [
- "/*",
- " * Class: ${1}",
- " *",
- " * ${2:Class Description}",
- " *",
- " */",
- "class ${1} extends ${3:uvm_object}",
- " `uvm_object_utils($1)",
- "",
- " // ***************************",
- " // Group: State variables",
- " // ***************************",
- "",
- " // ***************************",
- " // Group: Random variables",
- " // ***************************",
- "",
- " // Constructor: new",
- " function new(string name=\"$1\");",
- " super.new(name);",
- " endfunction",
- "",
- " ${0}",
- "endclass // ${1}",
- ]
- },
- "UVM component": {
- "prefix": "ucomp",
- "body": [
- "/*",
- "* Class: ${1}",
- "*",
- "* ${2:Component Description}",
- "*",
- "*/",
- "class ${1} extends ${3:uvm_component}",
- " `uvm_component_utils($1)",
- "",
- " // ***************************",
- " // Group: State variables",
- " // ***************************",
- "",
- " // ***************************",
- " // Group: Random variables",
- " // ***************************",
- "",
- " // Constructor: new",
- " function new(string name=\"$1\", uvm_component parent);",
- " super.new(name, parent);",
- " endfunction",
- "",
- " ${0}",
- "endclass // ${1}"
- ]
- },
- "UVM Phase Function": {
- "prefix": "uphase_func",
- "body": [
- "/**",
- "* Function: ${1:build}_phase",
- "*",
- "* ${2:Method description needed}",
- "*",
- "* Parameters:",
- "* - uvm_phase phase",
- "*/",
- "function void ${1}_phase(uvm_phase phase);",
- " super.${1}_phase(phase);",
- " ${0}",
- "endfunction // ${1}_phase"
- ]
- },
- "UVM Phase Task": {
- "prefix": "uphase_task",
- "body": [
- "/**",
- "* Task: ${1:build}_phase",
- "*",
- "* ${2:Method description needed}",
- "*",
- "* Parameters:",
- "* - uvm_phase phase",
- "*/",
- "task ${1}_phase(uvm_phase phase);",
- " super.${1}_phase(phase);",
- " ${0}",
- "endtask // ${1}_phase"
- ]
- },
- "UVM Config DB set": {
- "prefix": "udbset",
- "body": [
- "uvm_config_db #(${1:uvm_object})::set(${2:this}, \"${3}\", \"${4:name}\" , ${5:variable}))"
- ]
- },
- "UVM Config DB get": {
- "prefix": "udbget",
- "body": [
- "if (!uvm_config_db #(${1:uvm_object})::get(${2:this}, \"${3}\", \"${4:name}\" , ${5:variable})) begin",
- "`uvm_error(get_name(),\"Failed to find ${2:this}.${3}.${4:name} of type ${1:uvm_object}\");",
- "end"
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement