Snippets
This commit is contained in:
parent
96237f9f6c
commit
c5fcc9eabb
|
@ -0,0 +1,3 @@
|
||||||
|
snippet pack "This is the package." bA
|
||||||
|
(package! $1)$0
|
||||||
|
endsnippet
|
|
@ -42,7 +42,7 @@ $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ,m "Math equation" A
|
snippet ,m "Math equation" A
|
||||||
\$\$ $1 \$\$ $0
|
\$$1\$ $0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet entry "Add new entry" bA
|
snippet entry "Add new entry" bA
|
||||||
|
|
|
@ -1,13 +1,23 @@
|
||||||
snippet addlib "add new library" A
|
snippet addlib "add new library" A
|
||||||
library $1;
|
library $1;
|
||||||
use $1.${2:package}.${3:all};
|
use $1.${2:`!p
|
||||||
|
if t[1] == "ieee":
|
||||||
|
snip.rv = "std_logic_1164"
|
||||||
|
else:
|
||||||
|
snip.rv = "package"`}.${3:all};
|
||||||
|
`!p
|
||||||
|
if t[1] == "ieee":
|
||||||
|
snip.rv = "use ieee.numeric_std.all;"
|
||||||
|
else:
|
||||||
|
snip.rv = ""`
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet entity "new entity"
|
snippet entity "new entity"
|
||||||
-- Entity $1: ${2:$1}
|
-- Entity $1: ${2:$1}
|
||||||
entity ${1:Name} is
|
entity ${1:Name} is
|
||||||
port($3
|
port(
|
||||||
|
$3`!p t[3] = t[3].replace(" : ", "\t:\t").replace("in ", "in\t").replace("out ", "out\t").replace(" ", "\t")`
|
||||||
);
|
);
|
||||||
end $1;
|
end $1;
|
||||||
$0
|
$0
|
||||||
|
@ -17,7 +27,7 @@ snippet addPort "add a new Port to an entity" A
|
||||||
${1:name} : ${2:In/Out} ${3:std_logic}; -- ${4:What is this?}$0
|
${1:name} : ${2:In/Out} ${3:std_logic}; -- ${4:What is this?}$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet architecture "define an architecture"
|
snippet architecture "define an architecture"
|
||||||
-- Architecture $1 of $2: $3
|
-- Architecture $1 of $2: $3
|
||||||
architecture ${1:name} of ${2:Entity_name} is
|
architecture ${1:name} of ${2:Entity_name} is
|
||||||
${4:Konstanten, Typen, Signale}
|
${4:Konstanten, Typen, Signale}
|
||||||
|
@ -27,7 +37,7 @@ end $1;
|
||||||
$0
|
$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet process "New Process in arch"
|
snippet process "New Process in arch"
|
||||||
-- Process $1 ${3}
|
-- Process $1 ${3}
|
||||||
${1:Name} : process (${2}) -- runs only, when $2 changed
|
${1:Name} : process (${2}) -- runs only, when $2 changed
|
||||||
begin
|
begin
|
||||||
|
@ -58,9 +68,8 @@ endsnippet
|
||||||
|
|
||||||
snippet vhtodo "VHDL Todo" A
|
snippet vhtodo "VHDL Todo" A
|
||||||
-- TODO from `whoami`: ${1: What to do?} => `date`
|
-- TODO from `whoami`: ${1: What to do?} => `date`
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet regflit "reg_idx from literal" iA
|
snippet regflit "reg_idx from literal" iA
|
||||||
std_logic_vector(to_unsigned('${1:Literal}', reg_adr_size));
|
std_logic_vector(to_unsigned('${1:Literal}', reg_adr_size));
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue