Skip to content

Commit

Permalink
Add new snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
klevin committed Jul 9, 2020
1 parent bc4574d commit b5f038b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
24 changes: 24 additions & 0 deletions uvm_reg.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<snippet>
<name>UVM Reg Class</name>
<content><![CDATA[class ${1:reg_name} extends uvm_reg;
`uvm_object_utils(${1})
rand uvm_reg_field ${2:field_name};
function new(string name = "${1}");
super.new(name, 32, UVM_NO_COVERAGE);
endfunction : new
virtual function void build();
${2} = uvm_reg_field::type_id::create("${2}",,get_full_name());
${2}.configure(this, <size>, <lsb>, <access>, 0, 0, 1, 1, 0);
endfunction : build
endclass : ${1}
]]></content>
<tabTrigger>uvm_reg</tabTrigger>
<scope>source.systemverilog</scope>
<description>UVM register class</description>
</snippet>
7 changes: 7 additions & 0 deletions uvm_type_id.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<snippet>
<name>type_id</name>
<content><![CDATA[type_id::create("$1", $2);
]]></content>
<tabTrigger>type_id</tabTrigger>
<scope>source.systemverilog</scope>
</snippet>

0 comments on commit b5f038b

Please sign in to comment.