Skip to content

Commit

Permalink
help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephAbbey committed Nov 5, 2022
1 parent efc64d2 commit 51484d6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
4 changes: 4 additions & 0 deletions examples/ieee.numeric_std.sbi
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down
1 change: 1 addition & 0 deletions examples/ieee.numeric_std_unsigned.sbi
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
28 changes: 25 additions & 3 deletions scratch-vhdl-vscode/media/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ document.addEventListener('DOMContentLoaded', function () {
],
"colour": 190,
"mutator": "process_mutator",
"tooltip": "A VHDL process"
},
{
"kind": "block",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -478,6 +481,7 @@ document.addEventListener('DOMContentLoaded', function () {
}
],
"output": null,
"tooltip": "STD_LOGIC input"
},
{
"kind": "block",
Expand All @@ -491,6 +495,7 @@ document.addEventListener('DOMContentLoaded', function () {
}
],
"output": null,
"tooltip": "STD_LOGIC_VECTOR input"
},
{
"kind": "block",
Expand All @@ -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",
Expand All @@ -531,6 +537,7 @@ document.addEventListener('DOMContentLoaded', function () {
"output": "Boolean",
"inputsInline": true,
"style": "logic_blocks",
"tooltip": "Inverts input"
},
{
"kind": "block",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -593,6 +602,7 @@ document.addEventListener('DOMContentLoaded', function () {
],
"output": null,
"inputsInline": true,
"tooltip": "List index"
},
{
"kind": "block",
Expand Down Expand Up @@ -626,6 +636,7 @@ document.addEventListener('DOMContentLoaded', function () {
}
],
"output": null,
"tooltip": "Logic range"
},
{
"kind": "block",
Expand All @@ -644,6 +655,7 @@ document.addEventListener('DOMContentLoaded', function () {
],
"output": null,
"inputsInline": true,
"tooltip": "Join 2 lists together"
},
{
"type": "variables_set",
Expand All @@ -663,6 +675,7 @@ document.addEventListener('DOMContentLoaded', function () {
"inputsInline": true,
"previousStatement": null,
"nextStatement": null,
"tooltip": "Set a signal"
},
{
"type": "variables_get",
Expand All @@ -676,7 +689,8 @@ document.addEventListener('DOMContentLoaded', function () {
}
],
"inputsInline": true,
"output": null
"output": null,
"tooltip": "Get a signal"
},
{
"type": "math_change",
Expand All @@ -696,6 +710,7 @@ document.addEventListener('DOMContentLoaded', function () {
"inputsInline": true,
"previousStatement": null,
"nextStatement": null,
"tooltip": "Change a signal"
},
{
"type": "variables_set_index",
Expand All @@ -719,6 +734,7 @@ document.addEventListener('DOMContentLoaded', function () {
"inputsInline": true,
"previousStatement": null,
"nextStatement": null,
"tooltip": "Set an index of a signal"
},
{
"kind": "block",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -765,6 +783,7 @@ document.addEventListener('DOMContentLoaded', function () {
"previousStatement": null,
"nextStatement": null,
"inputsInline": true,
"tooltip": "case"
},
{
"kind": "block",
Expand All @@ -783,6 +802,7 @@ document.addEventListener('DOMContentLoaded', function () {
"colour": "%{BKY_LOGIC_HUE}",
"previousStatement": "controls_when",
"nextStatement": "controls_when",
"tooltip": "when"
},
{
"kind": "block",
Expand All @@ -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",
Expand All @@ -809,6 +830,7 @@ document.addEventListener('DOMContentLoaded', function () {
],
"inputsInline": true,
"output": null,
"tooltip": "The pattern that matches both of the patterns supplied"
},
]);

Expand Down

0 comments on commit 51484d6

Please sign in to comment.