From 51484d62e3f1ddd12646275e0344d5c57659e9a2 Mon Sep 17 00:00:00 2001 From: Joseph Abbey Date: Sat, 5 Nov 2022 21:44:14 +0000 Subject: [PATCH] help messages --- examples/ieee.numeric_std.sbi | 4 ++++ examples/ieee.numeric_std_unsigned.sbi | 1 + scratch-vhdl-vscode/media/main.js | 28 +++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/examples/ieee.numeric_std.sbi b/examples/ieee.numeric_std.sbi index 45bb396..50e4b58 100644 --- a/examples/ieee.numeric_std.sbi +++ b/examples/ieee.numeric_std.sbi @@ -14,6 +14,7 @@ } ], "output": null, + "tooltip": "Converts to an integer" }, "generator": function (block) { return ["to_integer(" + generator.valueToCode(block, "NUM", generator.ORDER_NONE) + ")", ["list_index", "list_range"].includes(block.getParent().type) ? generator.ORDER_ATOMIC : generator.ORDER_FUNCTION_CALL] @@ -32,6 +33,7 @@ } ], "output": null, + "tooltip": "Converts to an unsigned" }, "generator": function (block) { return ["unsigned(" + generator.valueToCode(block, "NUM", generator.ORDER_NONE) + ")", ["list_index", "list_range"].includes(block.getParent().type) ? generator.ORDER_ATOMIC : generator.ORDER_FUNCTION_CALL] @@ -50,6 +52,7 @@ } ], "output": null, + "tooltip": "Converts to a signed" }, "generator": function (block) { return ["signed(" + generator.valueToCode(block, "NUM", generator.ORDER_NONE) + ")", ["list_index", "list_range"].includes(block.getParent().type) ? generator.ORDER_ATOMIC : generator.ORDER_FUNCTION_CALL] @@ -68,6 +71,7 @@ } ], "output": null, + "tooltip": "Converts to a std_logic_vector" }, "generator": function (block) { return ["ieee.std_logic_1164.std_logic_vector(" + generator.valueToCode(block, "NUM", generator.ORDER_NONE) + ")", ["list_index", "list_range"].includes(block.getParent().type) ? generator.ORDER_ATOMIC : generator.ORDER_FUNCTION_CALL] diff --git a/examples/ieee.numeric_std_unsigned.sbi b/examples/ieee.numeric_std_unsigned.sbi index 9118509..27b7221 100644 --- a/examples/ieee.numeric_std_unsigned.sbi +++ b/examples/ieee.numeric_std_unsigned.sbi @@ -14,6 +14,7 @@ } ], "output": null, + "tooltip": "Converts unsigned to std_ulogic_vector" }, "generator": function (block) { return ["to_stdulogicvector(" + generator.valueToCode(block, "NUM", generator.ORDER_NONE) + ")", ["list_index", "list_range"].includes(block.getParent().type) ? generator.ORDER_ATOMIC : generator.ORDER_FUNCTION_CALL] diff --git a/scratch-vhdl-vscode/media/main.js b/scratch-vhdl-vscode/media/main.js index f446f92..66d6b49 100644 --- a/scratch-vhdl-vscode/media/main.js +++ b/scratch-vhdl-vscode/media/main.js @@ -408,6 +408,7 @@ document.addEventListener('DOMContentLoaded', function () { ], "colour": 190, "mutator": "process_mutator", + "tooltip": "A VHDL process" }, { "kind": "block", @@ -444,7 +445,8 @@ document.addEventListener('DOMContentLoaded', function () { "args0": [], "previousStatement": null, "nextStatement": null, - "colour": 190 + "colour": 190, + "tooltip": "A VHDL wait statement" }, { "type": "process_direct_set", @@ -461,6 +463,7 @@ document.addEventListener('DOMContentLoaded', function () { "name": "VALUE" } ], + "tooltip": "Create a process that is sensitive to all that does `VAR <= VALUE`" }, { "kind": "block", @@ -478,6 +481,7 @@ document.addEventListener('DOMContentLoaded', function () { } ], "output": null, + "tooltip": "STD_LOGIC input" }, { "kind": "block", @@ -491,6 +495,7 @@ document.addEventListener('DOMContentLoaded', function () { } ], "output": null, + "tooltip": "STD_LOGIC_VECTOR input" }, { "kind": "block", @@ -517,6 +522,7 @@ document.addEventListener('DOMContentLoaded', function () { "output": "Boolean", "inputsInline": true, "style": "logic_blocks", + "tooltip": "Do a logic operation with the bits of the vector as input." }, { "kind": "block", @@ -531,6 +537,7 @@ document.addEventListener('DOMContentLoaded', function () { "output": "Boolean", "inputsInline": true, "style": "logic_blocks", + "tooltip": "Inverts input" }, { "kind": "block", @@ -545,6 +552,7 @@ document.addEventListener('DOMContentLoaded', function () { "output": null, "inputsInline": true, "colour": "%{BKY_MATH_HUE}", + "tooltip": "Creates a list of inferred length" }, { "kind": "block", @@ -575,6 +583,7 @@ document.addEventListener('DOMContentLoaded', function () { "output": "Boolean", "style": "logic_blocks", "inputsInline": true, + "tooltip": "Do a logic operation with A and B as inputs" }, { "kind": "block", @@ -593,6 +602,7 @@ document.addEventListener('DOMContentLoaded', function () { ], "output": null, "inputsInline": true, + "tooltip": "List index" }, { "kind": "block", @@ -626,6 +636,7 @@ document.addEventListener('DOMContentLoaded', function () { } ], "output": null, + "tooltip": "Logic range" }, { "kind": "block", @@ -644,6 +655,7 @@ document.addEventListener('DOMContentLoaded', function () { ], "output": null, "inputsInline": true, + "tooltip": "Join 2 lists together" }, { "type": "variables_set", @@ -663,6 +675,7 @@ document.addEventListener('DOMContentLoaded', function () { "inputsInline": true, "previousStatement": null, "nextStatement": null, + "tooltip": "Set a signal" }, { "type": "variables_get", @@ -676,7 +689,8 @@ document.addEventListener('DOMContentLoaded', function () { } ], "inputsInline": true, - "output": null + "output": null, + "tooltip": "Get a signal" }, { "type": "math_change", @@ -696,6 +710,7 @@ document.addEventListener('DOMContentLoaded', function () { "inputsInline": true, "previousStatement": null, "nextStatement": null, + "tooltip": "Change a signal" }, { "type": "variables_set_index", @@ -719,6 +734,7 @@ document.addEventListener('DOMContentLoaded', function () { "inputsInline": true, "previousStatement": null, "nextStatement": null, + "tooltip": "Set an index of a signal" }, { "kind": "block", @@ -733,6 +749,7 @@ document.addEventListener('DOMContentLoaded', function () { ], "output": "Boolean", "style": "logic_blocks", + "tooltip": "Goes high in the rising edge of the variable" }, { "kind": "block", @@ -745,7 +762,8 @@ document.addEventListener('DOMContentLoaded', function () { } ], "previousStatement": null, - "nextStatement": null + "nextStatement": null, + "tooltip": "print a message in the simulator (does not synthesise)" }, { "kind": "block", @@ -765,6 +783,7 @@ document.addEventListener('DOMContentLoaded', function () { "previousStatement": null, "nextStatement": null, "inputsInline": true, + "tooltip": "case" }, { "kind": "block", @@ -783,6 +802,7 @@ document.addEventListener('DOMContentLoaded', function () { "colour": "%{BKY_LOGIC_HUE}", "previousStatement": "controls_when", "nextStatement": "controls_when", + "tooltip": "when" }, { "kind": "block", @@ -791,6 +811,7 @@ document.addEventListener('DOMContentLoaded', function () { "colour": "%{BKY_LOGIC_HUE}", "args0": [], "output": null, + "tooltip": "The pattern for anything that doesn't match any other patterns" }, { "kind": "block", @@ -809,6 +830,7 @@ document.addEventListener('DOMContentLoaded', function () { ], "inputsInline": true, "output": null, + "tooltip": "The pattern that matches both of the patterns supplied" }, ]);