{ "Module": { "prefix": "module", "body": [ "module ${1:name} (", " input wire ${2:clk},", " input wire ${3:rst_n}$4", ");", " $0", "endmodule" ], "description": "Module with a port list" }, "Function": { "prefix": "function", "body": [ "function ${1:[7:0]} ${2:name}(input ${3:[7:0]} ${4:arg});", " begin", " $2 = ${5:$4};", " end", "endfunction" ], "description": "Function declaration" }, "Task": { "prefix": "task", "body": [ "task ${1:name}(input ${2:[7:0]} ${3:arg});", " begin", " $0", " end", "endtask" ], "description": "Task declaration" }, "Generate for": { "prefix": "genfor", "body": [ "genvar ${1:i};", "generate", " for ($1 = 0; $1 < ${2:N}; $1 = $1 + 1) begin : ${3:gen_$1}", " $0", " end", "endgenerate" ], "description": "Generate for loop with a named block" }, "Testbench skeleton": { "prefix": "tb", "body": [ "module ${1:${TM_FILENAME_BASE}};", " reg clk = 1'b0;", " reg rst_n;", "", " always #${2:5} clk = ~clk;", "", " initial begin", " rst_n = 1'b0;", " repeat (2) @(posedge clk);", " rst_n = 1'b1;", " $0", " \\$display(\"${3:done}\");", " \\$finish;", " end", "endmodule" ], "description": "Testbench with clock and reset" }, "Include guard": { "prefix": "guard", "body": [ "`ifndef ${1:${TM_FILENAME_BASE/(.*)/${1:/upcase}/}_VH}", "`define $1", "", "$0", "", "`endif // $1" ], "description": "ifndef/define include guard from the file name" } }