diff --git a/vscode-client/snippets/snippets.generate.json b/vscode-client/snippets/snippets.generate.json index aeab149..df398fd 100644 --- a/vscode-client/snippets/snippets.generate.json +++ b/vscode-client/snippets/snippets.generate.json @@ -1,4 +1,22 @@ { + "Generate If": { + "prefix": "generate_if", + "body": [ + "gen_${1:generateName} : if ${2:expression} generate", + "\t$0", + "end generate;" + ], + "description": "if generate instantiation" + }, + "Generate For": { + "prefix": "generate_for", + "body": [ + "gen_loop_${1:generateName} : for ${2:i} in ${3:range} generate", + "\t$0", + "end generate;" + ], + "description": "for generate loop instantiation (vhdl 2008)" + }, "Generate Case 2008": { "prefix": "generate_case_2008", "body": [ @@ -10,15 +28,6 @@ ], "description": "case generate instantiation (vhdl 2008)" }, - "Generate If": { - "prefix": "generate_if", - "body": [ - "gen_${1:generateName} : if ${2:expression} generate", - "\t$0", - "end generate;" - ], - "description": "if generate instantiation" - }, "Generate Elsif 2008": { "prefix": "generate_elsif_2008", "body": [ @@ -34,14 +43,5 @@ "\t\t$0" ], "description": "else generate instantiation (vhdl 2008)" - }, - "Generate For": { - "prefix": "generate_for", - "body": [ - "gen_loop_${1:generateName} : for ${2:i} in ${3:range} generate", - "\t$0", - "end generate;" - ], - "description": "for generate loop instantiation (vhdl 2008)" } } diff --git a/vscode-client/snippets/snippets.vhdl.declaration.json b/vscode-client/snippets/snippets.vhdl.declaration.json index 6a10beb..309e016 100644 --- a/vscode-client/snippets/snippets.vhdl.declaration.json +++ b/vscode-client/snippets/snippets.vhdl.declaration.json @@ -30,16 +30,6 @@ ], "description": "synthesizable attributes (high,low,left,right,range,reverse_range,length,event)" }, - "Assert": { - "prefix": "assert", - "body": [ - "assert ${1:expression}", - "\treport \"${2:string}\"", - "\tseverity ${3|note,warning,error,failure|};", - "$0" - ], - "description": "assert declaration" - }, "Constant": { "prefix": "constant", "body": [ @@ -78,7 +68,7 @@ ], "description": "procedure body declaration" }, - "Record Type": { + "Record": { "prefix": "record", "body": [ "type ${1:name} is record", @@ -126,33 +116,6 @@ "body": [ "unsigned(${1} ${2|downto,to|} ${3})${4| := ,;|}$0" ], "description": "unsigned declaration" }, - "When": { - "prefix": "when", - "body": [ - "when ${1:others} =>", - "\t$0" - ], - "description": "when declaration" - }, - "When Else": { - "prefix": "when_else", - "body": [ - "${1:signal} <= ${2:first_value} when ${3:expression}", - "\telse ${4:final_value};", - "$0" - ], - "description": "concurrent when else declaration" - }, - "With Select": { - "prefix": ["select", "with_select"], - "body": [ - "with ${1:select} select", - "\t${2:signal} <= ${3:first_value} when ${4:select_value},", - "\t\t${5:last_value} when others;", - "$0" - ], - "description": "concurrent with select declaration" - }, "Variable": { "prefix": "variable", "body": [ diff --git a/vscode-client/snippets/snippets.vhdl.interface.json b/vscode-client/snippets/snippets.vhdl.interface.json index 3d993d1..c89ee18 100644 --- a/vscode-client/snippets/snippets.vhdl.interface.json +++ b/vscode-client/snippets/snippets.vhdl.interface.json @@ -1,7 +1,7 @@ { // TODO: package generics // TODO: configuration - "Architecture Interface": { + "Architecture": { "prefix": "architecture", "body": [ "architecture ${1:behav} of ${2:$TM_FILENAME_BASE} is", @@ -11,7 +11,7 @@ ], "description": "architecture interface" }, - "Block Interface": { + "Block": { "prefix": "block", "body": [ "blk_${1:blockName} : block ${2| ,optional_guard_expression|}", @@ -21,7 +21,22 @@ ], "description": "block interface" }, - "Component Interface": { + "Component": { + "prefix":"component", + "body": [ + "${1:instanceName}_inst: ${2:entity work.compName}", + "\tgeneric map (", + "\t\t${3:generics}", + "\t)", + "\tport map (", + "\t\t${4:clk => clk,}", + "\t\t${5:reset => reset,}", + "\t\t$0", + "\t);" + ], + "description": "component instantiation" + }, + "Component": { "prefix":"component", "body": [ "component ${1:comp_name} is", @@ -37,7 +52,7 @@ ], "description": "component interface" }, - "Entity Interface": { + "Entity": { "prefix": "entity", "body": [ "entity ${1:$TM_FILENAME_BASE} is", @@ -53,7 +68,25 @@ ], "description": "entity interface" }, - "Package Interface": { + "Generic": { + "prefix": "generic", + "body": [ + "generic (", + "\t${2:generics}", + ");" + ], + "description": "generic interface" + }, + "Generic Map": { + "prefix": "generic_map", + "body": [ + "generic map (", + "\t${2:generics}", + ")" + ], + "description": "generic map interface" + }, + "Package": { "prefix": "package", "body": [ "package ${1:$TM_FILENAME_BASE} is", @@ -62,7 +95,7 @@ ], "description": "package interface" }, - "Package Body Interface": { + "Package Body": { "prefix": "package_body", "body": [ "package body ${1:$TM_FILENAME_BASE} is", @@ -70,5 +103,23 @@ "end package;" ], "description": "package body interface" + }, + "Port": { + "prefix": "port", + "body": [ + "port (", + "\t${2:ports}", + ");" + ], + "description": "port interface" + }, + "Port Map": { + "prefix": "port_map", + "body": [ + "port map (", + "\t${2:ports}", + ");" + ], + "description": "port map interface" } } diff --git a/vscode-client/snippets/snippets.vhdl.library.json b/vscode-client/snippets/snippets.vhdl.library.json index a543068..a8f46c1 100644 --- a/vscode-client/snippets/snippets.vhdl.library.json +++ b/vscode-client/snippets/snippets.vhdl.library.json @@ -68,5 +68,5 @@ "$0" ], "description": "context clause for IEEE standard contexts (ieee_bit_context,ieee_std_context) (vhdl 2008)" - }, + } } diff --git a/vscode-client/snippets/snippets.vhdl.logic.json b/vscode-client/snippets/snippets.vhdl.logic.json index bc1cd77..252cc58 100644 --- a/vscode-client/snippets/snippets.vhdl.logic.json +++ b/vscode-client/snippets/snippets.vhdl.logic.json @@ -1,8 +1,18 @@ { + "Assert": { + "prefix": "assert", + "body": [ + "assert ${1:expression}", + "\treport \"${2:string}\"", + "\tseverity ${3|note,warning,error,failure|};", + "$0" + ], + "description": "assert declaration" + }, "Case": { "prefix": "case", "body": [ - "case ${1:select} is", + "case ${1:sel} is", "\twhen ${2:others} =>", "\t\t${3:null;}", "\t$0", @@ -106,6 +116,23 @@ ], "description": "combinatorial process block (vhdl 2008)" }, + "When": { + "prefix": "when", + "body": [ + "when ${1:others} =>", + "\t$0" + ], + "description": "when declaration" + }, + "When Else": { + "prefix": "when_else", + "body": [ + "${1:signal} <= ${2:first_value} when ${3:expression}", + "\telse ${4:final_value};", + "$0" + ], + "description": "concurrent when else declaration" + }, "While": { "prefix": "while", "body": [ @@ -114,5 +141,15 @@ "end loop;" ], "description": "while loop block" + }, + "With Select": { + "prefix": ["select", "with_select"], + "body": [ + "with ${1:sel} select", + "\t${2:signal} <= ${3:first_value} when ${4:select_value},", + "\t\t${5:last_value} when others;", + "$0" + ], + "description": "concurrent with select declaration" } }