diff options
Diffstat (limited to 'vim/bundle/vim-snippets/snippets/verilog.snippets')
-rw-r--r-- | vim/bundle/vim-snippets/snippets/verilog.snippets | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/vim/bundle/vim-snippets/snippets/verilog.snippets b/vim/bundle/vim-snippets/snippets/verilog.snippets new file mode 100644 index 0000000..5cd80f3 --- /dev/null +++ b/vim/bundle/vim-snippets/snippets/verilog.snippets @@ -0,0 +1,63 @@ +# if statement +snippet if + if (${1}) begin + ${0} + end +# If/else statements +snippet ife + if (${1}) begin + ${2} + end + else begin + ${1} + end +# Else if statement +snippet eif + else if (${1}) begin + ${0} + end +#Else statement +snippet el + else begin + ${0} + end +# While statement +snippet wh + while (${1}) begin + ${0} + end +# Repeat Loop +snippet rep + repeat (${1}) begin + ${0} + end +# Case statement +snippet case + case (${1:/* variable */}) + ${2:/* value */}: begin + ${3} + end + default: begin + ${4} + end + endcase +# CaseZ statement +snippet casez + casez (${1:/* variable */}) + ${2:/* value */}: begin + ${3} + end + default: begin + ${4} + end + endcase +# Always block +snippet al + always @(${1:/* sensitive list */}) begin + ${0} + end +# Module block +snippet mod + module ${1:module_name} (${2}); + ${0} + endmodule |