// Do not edit this file; automatically generated by build.py.
'use strict';

Blockly.Blocks.architecture={};Blockly.Blocks.name={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("default"),"Name");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(180);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.generate_if={init:function(){this.appendValueInput("label").setCheck(null).appendField(new Blockly.FieldTextInput("default"),"label").appendField(": if");this.appendDummyInput().appendField("generate");this.appendStatementInput("NAME").setCheck(null);this.appendDummyInput().appendField("end generate").appendField(new Blockly.FieldTextInput("default"),"endgenerate");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(180);this.setTooltip("");
this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("label");this.setFieldValue(a,"endgenerate")}};
Blockly.Blocks.architecture={init:function(){this.appendDummyInput().appendField("architecture").appendField(new Blockly.FieldTextInput("default"),"architecture_name").appendField("of").appendField(new Blockly.FieldTextInput("default"),"entity_name").appendField("is");this.appendStatementInput("declarations").setCheck(["component_instantiation","subtype"]).appendField("declarations");this.appendDummyInput().appendField("begin");this.appendStatementInput("concurent_statements").setCheck("process");
this.appendDummyInput().appendField("end ").appendField(new Blockly.FieldTextInput("default"),"end_arch_name");this.setInputsInline(!0);this.setPreviousStatement(!0,"architecture");this.setNextStatement(!0,"no_connect_3");this.setColour(180);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("architecture_name");this.setFieldValue(a,"end_arch_name")}};
Blockly.Blocks.port_map={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("label"),"label").appendField(":").appendField(new Blockly.FieldTextInput("component"),"component");this.appendStatementInput("NAME").setCheck(null);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(180);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.map_list={init:function(){this.appendValueInput("port").setCheck(null).appendField(new Blockly.FieldDropdown([["port map","port map"],["generic map","generic map"]]),"map");this.setInputsInline(!1);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(180);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.map_association={init:function(){this.appendValueInput("signal_name").setCheck(null);this.appendValueInput("signal_type").setCheck(null).appendField("=>");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(180);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.constant2={init:function(){this.appendValueInput("constant_name").setCheck("name").appendField("constant");this.appendValueInput("constant_type").setCheck(null).appendField(":");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(180);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.concurrent={};
Blockly.Blocks.process={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("label"),"label_begin").appendField(": process (").appendField(new Blockly.FieldTextInput(""),"sens").appendField(")");this.appendStatementInput("declarations").setCheck(null).appendField("declarations");this.appendStatementInput("begin").setCheck(null).appendField("begin");this.appendDummyInput().appendField("end process").appendField(new Blockly.FieldTextInput("label"),"label_end").appendField(";");
this.setInputsInline(!1);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(90);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("label_begin");this.setFieldValue(a,"label_end")}};
Blockly.Blocks.procedure_call={init:function(){this.appendValueInput("procedurename").setCheck(null);this.appendValueInput("values").setCheck(null).appendField("(");this.appendDummyInput().appendField(")");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(90);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.generate={init:function(){this.appendValueInput("start").setCheck(null).appendField(new Blockly.FieldTextInput("default"),"generate_label").appendField(": for");this.appendValueInput("end").setCheck(null).appendField("in");this.appendDummyInput().appendField("generate");this.appendStatementInput("generate").setCheck(null);this.appendDummyInput().appendField("end generate").appendField(new Blockly.FieldTextInput("default"),"end_label");this.appendDummyInput().appendField(";");this.setInputsInline(!0);
this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(90);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("generate_label");this.setFieldValue(a,"end_label")}};Blockly.Blocks.configuration={};Blockly.Blocks.configuration.HUE=15;
Blockly.Blocks.configuration={init:function(){this.appendDummyInput().appendField("configuration").appendField(new Blockly.FieldTextInput(""),"name").appendField("of").appendField(new Blockly.FieldTextInput(""),"type").appendField("is");this.appendStatementInput("config_state").setCheck(null);this.appendDummyInput().appendField("end").appendField(new Blockly.FieldTextInput(""),"end_name").appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);
this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("name");this.setFieldValue(a,"end_name")}};
Blockly.Blocks.forconfig={init:function(){this.appendDummyInput().appendField("for").appendField(new Blockly.FieldTextInput(""),"name");this.appendStatementInput("for_config").setCheck(null);this.appendDummyInput().appendField("end for");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.for_arch={init:function(){this.appendDummyInput().appendField("for").appendField(new Blockly.FieldTextInput(""),"label").appendField(":").appendField(new Blockly.FieldTextInput(""),"comp_name");this.appendStatementInput("comp_conf").setCheck(null);this.appendDummyInput().appendField("end for;");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.controls_case={};
Blockly.Blocks.controls_case={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.appendDummyInput("ADD").appendField("case").setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput(""),"case_name").appendField("is");this.appendStatementInput("ADD0").setAlign(Blockly.ALIGN_RIGHT).appendField("when").appendField(new Blockly.FieldTextInput(""),"Q").appendField("=>");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setMutator(new Blockly.Mutator(["controls_case_when","controls_case_when_others"]));
var a=this;this.setColour(195);this.setTooltip(function(){if(a.elseifCount_||a.elseCount_){if(!a.elseifCount_&&a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(a.elseifCount_&&!a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(a.elseifCount_&&a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""});this.elseCount_=this.elseifCount_=0;this.mem=[];this.detection=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;
var a=document.createElement("mutation");this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10)||0;this.elseCount_=parseInt(a.getAttribute("else"),10)||0;this.updateShape_()},decompose:function(a){var b=a.newBlock("case_when0");b.initSvg();for(var c=b.nextConnection,d=1;d<=this.elseifCount_;d++){var e=a.newBlock("controls_case_when");e.initSvg();c.connect(e.previousConnection);
c=e.nextConnection}this.elseCount_&&(a=a.newBlock("controls_case_when_others"),a.initSvg(),c.connect(a.previousConnection));return b},compose:function(a){var b=a.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0;a=[null];var c=[null],d=null,e=[null];for(this.detection=0;b;){switch(b.type){case "controls_case_when":this.elseifCount_++;a.push(b.valueConnection_);c.push(b.statementConnection_);e.push(b.dummyConnection_);this.mem[this.elseifCount_]!=b.id&&0==this.detection&&(this.detection=
this.elseifCount_);this.mem[this.elseifCount_]=b.id;break;case "controls_case_when_others":this.elseCount_++;d=b.statementConnection_;break;default:throw"Unknown block type.";}b=b.nextConnection&&b.nextConnection.targetBlock()}this.itemAdd=this.itemDelete=!1;this.elseifCount_<this.itemCount_&&(this.itemDelete=!0);1==this.itemCount_-this.elseifCount_&&0==this.detection&&(this.detection=this.itemCount_);this.elseifCount_>this.itemCount_&&(this.itemAdd=!0);this.itemCount_=c.length-1;this.updateShape_();
for(b=1;b<=this.elseifCount_;b++)Blockly.Mutator.reconnect(a[b],this,"IF"+b),Blockly.Mutator.reconnect(c[b],this,"DO"+b);Blockly.Mutator.reconnect(d,this,"ELSE")},saveConnections:function(a){a=a.nextConnection.targetBlock();for(var b=1;a;){switch(a.type){case "controls_case_when":var c=this.getInput("IF"+b),d=this.getInput("DO"+b);a.valueConnection_=c&&c.connection.targetConnection;a.statementConnection_=d&&d.connection.targetConnection;b++;break;case "controls_case_when_others":d=this.getInput("ELSE");
a.statementConnection_=d&&d.connection.targetConnection;break;default:throw"Unknown block type.";}a=a.nextConnection&&a.nextConnection.targetBlock()}},updateShape_:function(){this.getInput("ELSE")&&(this.removeInput("ELSE"),this.removeInput("ENDIF"));for(var a=1,b=0,c=[];this.getInput("DO"+a);){var d=this.getInput("DO"+a);c[a]=d.fieldRow["1"].text_;this.removeInput("DO"+a);a++}this.getInput("ENDIF")&&this.removeInput("ENDIF");1==this.itemAdd&&(b=this.elseifCount_);1==this.itemDelete&&(b=this.elseifCount_+
1);for(a=1;a<=b;a++)1==this.itemAdd&&(this.detection==a&&(c[a+1]=c[a],c[a]=""),this.detection<a&&(c[a+1]=c[a])),1==this.itemDelete&&a>this.detection-1&&(c[a]=c[a+1]);for(a=1;a<=this.elseifCount_;a++)this.appendStatementInput("DO"+a).setAlign(Blockly.ALIGN_RIGHT).appendField("when").appendField(new Blockly.FieldTextInput(c[a]),"Q"+a).appendField("=>");this.elseCount_&&this.appendStatementInput("ELSE").setAlign(Blockly.ALIGN_RIGHT).appendField("when others").appendField("=>");this.appendDummyInput("ENDIF").appendField("end case;")}};
Blockly.Blocks.case_when0={init:function(){this.setColour(195);this.appendDummyInput().appendField("when");this.setNextStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP);this.contextMenu=!1}};Blockly.Blocks.controls_case_when={init:function(){this.setColour(195);this.appendDummyInput().appendField("when");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP);this.contextMenu=!1}};
Blockly.Blocks.controls_case_when_others={init:function(){this.setColour(195);this.appendDummyInput().appendField("when others");this.setPreviousStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP);this.contextMenu=!1}};Blockly.Blocks.controls_if={};
Blockly.Blocks.controls_if={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.appendValueInput("IF0").setCheck("Boolean").appendField("if");this.appendDummyInput("THEN0").appendField("then");this.setInputsInline(!0);this.appendStatementInput("DO0").appendField("");this.appendDummyInput("ENDIF").appendField("end if;");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setMutator(new Blockly.Mutator(["controls_if_elseif","controls_if_else"]));var a=this;this.setColour(195);
this.setTooltip(function(){if(a.elseifCount_||a.elseCount_){if(!a.elseifCount_&&a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(a.elseifCount_&&!a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(a.elseifCount_&&a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""});this.elseCount_=this.elseifCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=document.createElement("mutation");this.elseifCount_&&
a.setAttribute("elsif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elsif"),10)||0;this.elseCount_=parseInt(a.getAttribute("else"),10)||0;this.updateShape_()},decompose:function(a){var b=a.newBlock("controls_if_if");b.initSvg();for(var c=b.nextConnection,d=1;d<=this.elseifCount_;d++){var e=a.newBlock("controls_if_elseif");e.initSvg();c.connect(e.previousConnection);c=e.nextConnection}this.elseCount_&&(a=
a.newBlock("controls_if_else"),a.initSvg(),c.connect(a.previousConnection));return b},compose:function(a){var b=a.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0;a=[null];for(var c=[null],d=null,e=[null];b;){switch(b.type){case "controls_if_elseif":this.elseifCount_++;a.push(b.valueConnection_);c.push(b.statementConnection_);e.push(b.dummyConnection_);break;case "controls_if_else":this.elseCount_++;d=b.statementConnection_;break;default:throw"Unknown block type.";}b=b.nextConnection&&
b.nextConnection.targetBlock()}this.updateShape_();for(b=1;b<=this.elseifCount_;b++)Blockly.Mutator.reconnect(a[b],this,"IF"+b),Blockly.Mutator.reconnect(c[b],this,"DO"+b);Blockly.Mutator.reconnect(d,this,"ELSEDO")},saveConnections:function(a){a=a.nextConnection.targetBlock();for(var b=1;a;){switch(a.type){case "controls_if_elseif":var c=this.getInput("IF"+b),d=this.getInput("DO"+b);a.valueConnection_=c&&c.connection.targetConnection;a.statementConnection_=d&&d.connection.targetConnection;b++;break;
case "controls_if_else":d=this.getInput("ELSEDO");a.statementConnection_=d&&d.connection.targetConnection;break;default:throw"Unknown block type.";}a=a.nextConnection&&a.nextConnection.targetBlock()}},updateShape_:function(){this.getInput("ELSE")&&(this.removeInput("ELSE"),this.removeInput("ELSEDO"),this.removeInput("ENDIF"));for(var a=1;this.getInput("IF"+a);)this.removeInput("THEN"+a),this.removeInput("IF"+a),this.removeInput("DO"+a),a++;this.getInput("ENDIF")&&this.removeInput("ENDIF");for(a=1;a<=
this.elseifCount_;a++)this.appendValueInput("IF"+a).setCheck("Boolean").appendField("elsif","state_name"+a),this.appendDummyInput("THEN"+a).appendField("then"),this.setInputsInline(!0),this.appendStatementInput("DO"+a).appendField("");this.elseCount_&&(this.appendDummyInput("ELSE").appendField("else"),this.appendStatementInput("ELSEDO"));this.appendDummyInput("ENDIF").appendField("end if;")}};
Blockly.Blocks.controls_if_if={init:function(){this.setColour(195);this.appendDummyInput().appendField("if");this.setNextStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP);this.contextMenu=!1}};Blockly.Blocks.controls_if_elseif={init:function(){this.setColour(195);this.appendDummyInput().appendField("elsif");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP);this.contextMenu=!1}};
Blockly.Blocks.controls_if_else={init:function(){this.setColour(195);this.appendDummyInput().appendField("else");this.setPreviousStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP);this.contextMenu=!1}};Blockly.Blocks.declaration={};
Blockly.Blocks.procedure={init:function(){this.appendDummyInput().appendField("procedure").appendField(new Blockly.FieldTextInput("default"),"procedure_name");this.appendStatementInput("parameter_list").setCheck(null);this.appendStatementInput("declaration").setCheck(null).appendField("is");this.appendStatementInput("sequential").setCheck(null).appendField("begin");this.appendDummyInput().appendField("end").appendField(new Blockly.FieldTextInput("default"),"end_name");this.setInputsInline(!0);this.setPreviousStatement(!0,
null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("procedure_name");this.setFieldValue(a,"end_name")}};
Blockly.Blocks.function_pack={init:function(){this.appendDummyInput().appendField("function").appendField(new Blockly.FieldTextInput("default"),"name");this.appendStatementInput("declaration").setCheck(null);this.appendValueInput("return").setCheck(null).appendField("return");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.component_instantiation={init:function(){this.appendDummyInput().appendField("component").appendField(new Blockly.FieldTextInput("name"),"component_name");this.appendStatementInput("generic_port").setCheck(null).appendField("generic/port");this.appendDummyInput().appendField("end component").appendField(new Blockly.FieldTextInput("name"),"end_name").appendField(";");this.setInputsInline(!1);this.setPreviousStatement(!0,"component_instantiation");this.setNextStatement(!0,"component_instantiation");
this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("component_name");this.setFieldValue(a,"end_name")}};
Blockly.Blocks.component_procedure={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["component","component"],["procedure","procedure"]]),"module").appendField(new Blockly.FieldTextInput("name"),"component_name");this.appendStatementInput("generic_port").setCheck(null).appendField("generic/port");this.appendDummyInput().appendField("end component;");this.setInputsInline(!1);this.setPreviousStatement(!0,"component_instantiation");this.setNextStatement(!0,"component_instantiation");
this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.alias={init:function(){this.appendValueInput("alias").setCheck(null).appendField("alias");this.appendDummyInput().appendField(":");this.appendValueInput("name").setCheck(null);this.appendDummyInput().appendField("is");this.appendValueInput("type").setCheck(null);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.signal={init:function(){this.appendValueInput("signal_name").setCheck(null).appendField(new Blockly.FieldDropdown([["signal","signal"],["variable","variable"],["constant","constant"]]),"signal");this.appendValueInput("signal_type").setCheck(null).appendField(":");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.signal_init={init:function(){this.appendValueInput("signal_name").setCheck(null).appendField(new Blockly.FieldDropdown([["signal","signal"],["variable","variable"],["constant","constant"]]),"signal");this.appendValueInput("signal_type").setCheck(null).appendField(":");this.appendValueInput("signal_init").setCheck(null).appendField(":=");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);
this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.variable={init:function(){this.appendValueInput("variable").setCheck(null).appendField("variable");this.appendDummyInput().appendField(":");this.appendValueInput("list").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.association={init:function(){this.appendValueInput("signal_name").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["<=","<="],[":=",":="]]),"association");this.appendValueInput("variable").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.name_type={init:function(){this.appendValueInput("name").setCheck(null);this.appendValueInput("type").setCheck(null).appendField(":");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.association_delay={init:function(){this.appendValueInput("signal_name").setCheck(null);this.appendDummyInput().appendField("<=");this.appendValueInput("variable").setCheck(null);this.appendDummyInput().appendField("after");this.appendValueInput("delay").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.attribute={init:function(){this.appendDummyInput().appendField("attribute");this.appendValueInput("atribute_name").setCheck(null);this.appendDummyInput().appendField(":");this.appendValueInput("type_name").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.attribute_of={init:function(){this.appendDummyInput().appendField("attribute");this.appendValueInput("atribute_name").setCheck(null);this.appendDummyInput().appendField("of");this.appendValueInput("variable").setCheck(null);this.appendDummyInput().appendField(":");this.appendValueInput("type_name").setCheck(null);this.appendDummyInput().appendField("is");this.appendValueInput("value").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,
null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.type={init:function(){this.appendValueInput("type").setCheck(null).appendField("type");this.appendValueInput("list").appendField(new Blockly.FieldDropdown([["is","is"],["is access","is access"],["is range","is range"],["is file of","is file of"]]),"type_list").setCheck(null);this.setInputsInline(!0);this.setPreviousStatement(!0,"variables");this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.subtype={init:function(){this.appendValueInput("subtype").setCheck(null).appendField("subtype");this.appendDummyInput().appendField("is");this.appendValueInput("base_type").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.subtype_range={init:function(){this.appendValueInput("subtype").setCheck(null).appendField("subtype");this.appendDummyInput().appendField("is");this.appendValueInput("base_type").setCheck(null);this.appendDummyInput().appendField("range");this.appendValueInput("type").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.type_array={init:function(){this.appendValueInput("type1").setCheck(null).appendField("type");this.appendDummyInput().appendField("is array");this.appendValueInput("type2").setCheck(null);this.appendDummyInput().appendField("of");this.appendValueInput("range").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.array_type_type={init:function(){this.appendDummyInput().appendField("type");this.appendValueInput("type").setCheck(null);this.appendDummyInput().appendField("is array (");this.appendValueInput("index_type").setCheck(null);this.appendValueInput("range").setCheck(null);this.appendDummyInput().appendField(") of");this.appendValueInput("data_type").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,
null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.alias={init:function(){this.appendDummyInput().appendField("alias");this.appendValueInput("alias_name").setCheck(null);this.appendDummyInput().appendField(":");this.appendValueInput("type").setCheck(null);this.appendDummyInput().appendField("is");this.appendValueInput("name").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.disconnect={init:function(){this.appendDummyInput().appendField("disconnect");this.appendValueInput("signal").setCheck(null);this.appendDummyInput().appendField(":");this.appendValueInput("type").setCheck(null);this.appendDummyInput().appendField("after");this.appendValueInput("time").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.record={init:function(){this.appendDummyInput().appendField("type").appendField(new Blockly.FieldTextInput("default"),"record_name").appendField("is record");this.appendStatementInput("record").setCheck(null);this.appendDummyInput().appendField("end record").appendField(new Blockly.FieldTextInput("default"),"record_name_end");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(15);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.proc_pin_name={init:function(){this.appendDummyInput("signal_type").appendField(new Blockly.FieldDropdown([["signal","signal"],["variable","variable"],["constant","constant"]]),"type");this.appendValueInput("pin_name").setCheck(null);this.appendValueInput("pin_type").setCheck(null).appendField(":").appendField(new Blockly.FieldDropdown([["in","in"],["out","out"],["inout","inout"]]),"in_out");this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setColour(15);
this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.entity={};
Blockly.Blocks.entity={init:function(){this.appendDummyInput().appendField("entity").appendField(new Blockly.FieldTextInput("default"),"entity").appendField("is");this.appendStatementInput("generic_port").setCheck(null).appendField("generic/port");this.appendDummyInput().appendField("end").appendField(new Blockly.FieldTextInput("default"),"end_entity");this.setPreviousStatement(!0,"entity");this.setNextStatement(!0,"architecture");this.setColour(65);this.setTooltip("");this.setHelpUrl("../help/entity.html")},onchange:function(a){a=
this.getFieldValue("entity");this.setFieldValue(a,"end_entity")}};Blockly.Blocks.generic={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["generic","generic"],["port","port"]]),"port_list");this.appendStatementInput("generic_inputs").setCheck("generic_name");this.setInputsInline(!0);this.setPreviousStatement(!0,"generic");this.setNextStatement(!0,"generic");this.setColour(65);this.setTooltip("");this.setHelpUrl("../help/entity.html#generic")}};
Blockly.Blocks.port_pin_name={init:function(){this.appendValueInput("pin_name").setCheck(null);this.appendValueInput("pin_type").setCheck(null).appendField(":").appendField(new Blockly.FieldDropdown([["in","in"],["out","out"],["inout","inout"],["buffer","buffer"]]),"in_out");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setColour(65);this.setTooltip("");this.setHelpUrl("../help/entity.html#input_output")}};Blockly.Blocks.expression={};
Blockly.Blocks.operator={init:function(){this.appendValueInput("in_a").setCheck(null).appendField("(");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["+","+"],["-","-"],["/","/"],["*","*"],["**","**"],["&","&"],["and","and"],["or","or"],["nand","nand"],["nor","nor"],["xor","xor"],["xnor","xnor"],["mod","mod"],["rem","rem"],["sll","sll"],["srl","srl"],["sla","sla"],["sra","sra"],["rol","rol"],["ror","ror"]]),"operator");this.appendValueInput("in_b").setCheck(null);this.appendDummyInput().appendField(")");
this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.qualified={init:function(){this.appendValueInput("name").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["'RIGHTOF","RIGHTOF"],["'LEFTOF","LEFTOF"],["'PRED","PRED"],["'SUCC","SUCC"],["'VAL","VAL"],["'POS","POS"],["'BASE","BASE"],["'LEFT","LEFT"],["'RIGHT","RIGHT"],["'LOW","LOW"],["'HIGH","HIGH"],["'ASCENDING","ASCENDING"],["'IMAGE","IMAGE"],["'VALUE","VALUE"]]),"range");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");
this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.not={init:function(){this.appendDummyInput().appendField("not");this.appendValueInput("not_value").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.others={init:function(){this.appendDummyInput().appendField("others =>");this.appendValueInput("others").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.condition={init:function(){this.appendValueInput("A").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["=","="],["/=","/="],[">",">"],[">=",">="],["<","<"],["<=","<="]]),"condition");this.appendValueInput("B").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.type_conversion={init:function(){this.appendValueInput("variable").setCheck(null);this.appendDummyInput().appendField("(").appendField(new Blockly.FieldDropdown([["to_integer","to_integer"],["to_signed","to_signed"],["to_unsigned","to_unsigned"]]),"conversion");this.appendValueInput("to_integer").setCheck(null).appendField("(");this.appendDummyInput().appendField(")").appendField(")");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.conversion={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["To_integer","To_integer"],["To_signed","To_signed"],["To_unsigned","To_unsigned"],["To_Bit","To_Bit"],["To_Bitvector","To_Bitvector"],["To_StdULogic","To_StdULogic"],["To_StdLogicVector","To_StdLogicVector"],["To_StdULogicVector","To_StdULogicVector"],["To_X01","To_X01"],["To_X01Z","To_X01Z"],["To_UX01","To_UX01"],["Rising_edge","Rising_edge"],["Falling_edge","Falling_edge"],["Is_X","Is_X"]]),
"std_logic").appendField("(");this.appendValueInput("NAME").setCheck(null);this.appendDummyInput().appendField(")");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.std_match={init:function(){this.appendValueInput("left").setCheck(null).appendField("std_match (");this.appendValueInput("right").setCheck(null).appendField(",");this.appendDummyInput().appendField(")");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.range_type={init:function(){this.appendDummyInput().appendField("range");this.appendValueInput("type").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.range1={init:function(){this.appendValueInput("msb").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["downto","downto"],["to","to"]]),"downto");this.appendValueInput("lsb").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.range2={init:function(){this.appendDummyInput();this.appendValueInput("name").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["'EVENT","EVENT"],["'LEFT","LEFT"],["'RIGHT","RIGHT"],["'LOW","LOW"],["'HIGH","HIGH"],["'RANGE","RANGE"],["'REVERSE_RANGE","REVERSE_RANGE"],["'LENGTH","LENGTH"],["'ASCENDING","ASCENDING"]]),"range");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.range2_index={init:function(){this.appendValueInput("name").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["'LEFT","LEFT"],["'RIGHT","RIGHT"],["'LOW","LOW"],["'HIGH","HIGH"],["'RANGE","RANGE"],["'REVERSE_RANGE","REVERSE_RANGE"],["'LENTGH","LENTGH"],["'ASCENDING","ASCENDING"]]),"range");this.appendValueInput("N").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.range_var={init:function(){this.appendValueInput("variable").setCheck(null);this.appendDummyInput().appendField("range");this.appendValueInput("range").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.index={init:function(){this.appendValueInput("index_name");this.appendDummyInput().appendField("(");this.appendValueInput("index_list");this.appendDummyInput().appendField(")");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.all={init:function(){this.appendDummyInput().appendField("<>");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.time_association={init:function(){this.appendValueInput("time").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["fs","fs"],["ps","ps"],["ns","ns"]]),"unit");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.file={};
Blockly.Blocks.file={init:function(){this.appendValueInput("filevar").setCheck(null).appendField("file");this.appendValueInput("filetype").setCheck(null).appendField(":");this.appendValueInput("filename").setCheck(null).appendField("open").appendField(new Blockly.FieldDropdown([["Write_mode","Write_mode"],["Read_mode","Read_mode"],["Append_mode","Append_mode"]]),"filemode").appendField("is");this.appendDummyInput("").appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,
null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.write={init:function(){this.appendValueInput("write1").setCheck(null).appendField("write (");this.appendValueInput("write2").setCheck(null).appendField(",");this.appendDummyInput().appendField(");");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.write2={init:function(){this.appendValueInput("write1").setCheck(null).appendField("write (");this.appendValueInput("write2").setCheck(null).appendField(",");this.appendValueInput("write3").setCheck(null).appendField(",");this.appendValueInput("write4").setCheck(null).appendField(",");this.appendDummyInput().appendField(");");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.writeline={init:function(){this.appendValueInput("write1").setCheck(null).appendField("writeline (");this.appendValueInput("write2").setCheck(null).appendField(",");this.appendDummyInput().appendField(");");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.read={init:function(){this.appendValueInput("read1").setCheck(null).appendField("read (");this.appendValueInput("read2").setCheck(null).appendField(",");this.appendDummyInput().appendField(");");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.readline={init:function(){this.appendValueInput("read1").setCheck(null).appendField("readline (");this.appendValueInput("read2").setCheck(null).appendField(",");this.appendDummyInput().appendField(");");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(160);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks["function"]={};
Blockly.Blocks["function"]={init:function(){this.appendDummyInput().appendField("function").appendField(new Blockly.FieldTextInput("default"),"function_name");this.appendStatementInput("parameters").setCheck(null);this.appendValueInput("return").setCheck(null).appendField("return");this.appendDummyInput().appendField("is");this.appendStatementInput("declaration").setCheck(null).appendField("declaration");this.appendDummyInput().appendField("begin");this.appendStatementInput("sequential").setCheck(null);this.appendValueInput("return2").setCheck(null).appendField("return");
this.appendDummyInput().appendField("end").appendField(new Blockly.FieldTextInput("default"),"end_name").appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(240);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("function_name");this.setFieldValue(a,"end_name")}};
Blockly.Blocks.function_call={init:function(){this.appendValueInput("function_name");this.appendDummyInput().appendField("(");this.appendValueInput("parameter_list");this.appendDummyInput().appendField(");");this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(240);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.library={};Blockly.Blocks.library.HUE=290;Blockly.Blocks.library={init:function(){this.appendDummyInput().appendField("Library ").appendField(new Blockly.FieldDropdown([["IEEE","IEEE"],["STD","STD"]]),"library");this.appendDummyInput().appendField(";");this.appendStatementInput("declarations").setCheck("library");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,"entity");this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.ieee={init:function(){this.appendDummyInput().appendField("use IEEE.").appendField(new Blockly.FieldDropdown([["std_logic_1164","std_logic_1164"],["std_logic_textio","std_logic_textio"],["std_logic_arith","std_logic_arith"],["numeric_std","numeric_std"],["numeric_bit","numeric_bit"],["std_logic_signed","std_logic_signed"],["std_logic_unsinged","std_logic_unsinged"],["math_real","math_real"],["math_complex","math_complex"]]),"IEEE").appendField(".all");this.setInputsInline(!0);this.setPreviousStatement(!0,
"library");this.setNextStatement(!0,"library");this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.std_textio={init:function(){this.appendDummyInput().appendField("use STD.textio;");this.setInputsInline(!0);this.setPreviousStatement(!0,"library");this.setNextStatement(!0,"library");this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.use={init:function(){this.appendValueInput("use").setCheck(null).appendField("use");this.appendValueInput("library").setCheck(null).appendField(".");this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,"library");this.setNextStatement(!0,"library");this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.std_logic={init:function(){var a=new Blockly.FieldDropdown([["char","char"],["line","line"],["boolean","boolean"],["std_logic","std_logic"],["std_logic_vector","std_logic_vector"],["time","time"],["std_ulogic","std_ulogic"],["bit","bit"],["side","side"]]);this.appendDummyInput().appendField(a,"std_bit");this.setOutput(!0,null);this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.std_logic_init={init:function(){var a=new Blockly.FieldDropdown([["char :=","char"],["line :=","line"],["boolean :=","boolean"],["std_logic :=","std_logic"],["time :=","time"],["integer :=","integer"],["std_ulogic :=","std_ulogic"],["bit :=","bit"],["side :=","side"]]);this.appendDummyInput().appendField(a,"std_bit");this.appendValueInput("bit_value").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.vector={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["std_logic_vector","std_logic_vector"],["std_ulogic_vector","std_ulogic_vector"],["bit_vector","bit_vector"]]),"vector");this.appendValueInput("msb").setCheck(null).appendField("(");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["downto","downto"],["to","to"]]),"range");this.appendValueInput("lsb").setCheck(null);this.appendDummyInput().appendField(")");this.setInputsInline(!0);
this.setOutput(!0,null);this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.vector_init={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["std_logic_vector","std_logic_vector"],["std_ulogic_vector","std_ulogic_vector"],["bit_vector","bit_vector"]]),"vector").appendField("(");this.appendValueInput("msb").setCheck(null);this.appendDummyInput().appendField(new Blockly.FieldDropdown([["downto","downto"],["to","to"]]),"range");this.appendValueInput("lsb").setCheck(null);this.appendDummyInput().appendField(") =");this.appendValueInput("init").setCheck(null);
this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.integer={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["integer","integer"],["positive","positive"],["natural","natural"],["real","real"],["string","string"]]),"integer");this.setOutput(!0,null);this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.integer_init={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["integer","integer"],["positive","positive"],["natural","natural"],["real","real"],["string","string"]]),"integer").appendField(":=");this.appendValueInput("integer_value").setCheck(null);this.setInputsInline(!0);this.setOutput(!0,null);this.setColour(290);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.lists={};Blockly.Blocks.lists.HUE=180;Blockly.Blocks.lists_create_empty={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_CREATE_EMPTY_TITLE,output:"Array",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP,helpUrl:Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL})}};
Blockly.Blocks.lists_positional1={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.itemCount_=3;this.updateShape_();this.setOutput(!0,null);this.setMutator(new Blockly.Mutator(["lists_create_with_item"]));this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP);this.detection=0;this.mem=[];this.setInputsInline(!1)},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=
parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=a.newBlock("lists_create_with_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d<this.itemCount_;d++){var e=a.newBlock("lists_create_with_item");e.initSvg();this.mem[d]=e.id;c.connect(e.previousConnection);c=e.nextConnection}return b},compose:function(a){var b=a.getInputTargetBlock("STACK");a=[];for(var c=0;b;)0!=c&&b.id!=this.mem[c]&&0==this.detection&&(this.detection=c),this.mem[c]=b.id,a.push(b.valueConnection_),
b=b.nextConnection&&b.nextConnection.targetBlock(),c++;this.itemAdd=this.itemDelete=!1;c<this.itemCount_&&(this.itemDelete=!0);c>this.itemCount_&&(this.itemAdd=!0);for(c=0;c<this.itemCount_;c++)(b=this.getInput("ADD"+c).connection.targetConnection)&&-1==a.indexOf(b)&&b.disconnect();this.itemCount_=a.length;this.updateShape_();for(c=0;c<this.itemCount_;c++)Blockly.Mutator.reconnect(a[c],this,"ADD"+c)},saveConnections:function(a){a=a.getInputTargetBlock("STACK");for(var b=0;a;){var c=this.getInput("ADD"+
b);a.valueConnection_=c&&c.connection.targetConnection;b++;a=a.nextConnection&&a.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);for(var a=0;a<this.itemCount_;a++)this.getInput("ADD"+a)||(0==a?this.appendValueInput("ADD"+a):this.appendValueInput("ADD"+a).setAlign(Blockly.ALIGN_RIGHT));if(1==this.itemAdd){for(a=
0;a<this.itemCount_;a++)this.getInput("ADD"+a);this.detection=0}if(1==this.itemDelete){for(a=0;a<this.itemCount_;a++);this.detection=0}for(;this.getInput("ADD"+a);)this.removeInput("ADD"+a),a++}};
Blockly.Blocks.lists_named={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.itemCount_=3;this.updateShape_();this.setOutput(!0,null);this.setMutator(new Blockly.Mutator(["lists_create_with_item"]));this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP);this.detection=0;this.mem=[]},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=
parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=a.newBlock("lists_create_with_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d<this.itemCount_;d++){var e=a.newBlock("lists_create_with_item");e.initSvg();this.mem[d]=e.id;c.connect(e.previousConnection);c=e.nextConnection}return b},compose:function(a){var b=a.getInputTargetBlock("STACK");a=[];for(var c=0;b;)0!=c&&b.id!=this.mem[c]&&0==this.detection&&(this.detection=c),this.mem[c]=b.id,a.push(b.valueConnection_),
b=b.nextConnection&&b.nextConnection.targetBlock(),c++;this.itemAdd=this.itemDelete=!1;c<this.itemCount_&&(this.itemDelete=!0);c>this.itemCount_&&(this.itemAdd=!0);for(c=0;c<this.itemCount_;c++)(b=this.getInput("ADD"+c).connection.targetConnection)&&-1==a.indexOf(b)&&b.disconnect();this.itemCount_=a.length;this.updateShape_();for(c=0;c<this.itemCount_;c++)Blockly.Mutator.reconnect(a[c],this,"ADD"+c)},saveConnections:function(a){a=a.getInputTargetBlock("STACK");for(var b=0;a;){var c=this.getInput("ADD"+
b);a.valueConnection_=c&&c.connection.targetConnection;b++;a=a.nextConnection&&a.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);for(var a=0;a<this.itemCount_;a++)this.getInput("ADD"+a)||this.appendValueInput("ADD"+a).setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput("default"),"b"+a).appendField("=>",
"c"+a);if(1==this.itemAdd){var b="default";for(a=this.detection;a<this.itemCount_;a++){var c=this.getInput("ADD"+a);var d=c.fieldRow["0"].text_;c.removeField("b"+a);c.removeField("c"+a);c.appendField(new Blockly.FieldTextInput(b),"b"+a);c.appendField("=>","c"+a);b=d}this.detection=0}if(1==this.itemDelete){for(a=this.detection;a<this.itemCount_;a++)c=this.getInput("ADD"+(a+1)),b=c.fieldRow["0"].text_,c=this.getInput("ADD"+a),c.removeField("b"+a),c.removeField("c"+a),c.appendField(new Blockly.FieldTextInput(b),
"b"+a),c.appendField("=>","c"+a);this.detection=0}for(;this.getInput("ADD"+a);)this.removeInput("ADD"+a),a++}};Blockly.Blocks.lists_create_with_container={init:function(){this.setColour(Blockly.Blocks.lists.HUE);this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD);this.appendStatementInput("STACK");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP);this.contextMenu=!1}};
Blockly.Blocks.lists_create_with_item={init:function(){this.setColour(Blockly.Blocks.lists.HUE);this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP);this.contextMenu=!1}};
Blockly.Blocks.lists_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_REPEAT_TITLE,args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_REPEAT_HELPURL})}};
Blockly.Blocks.lists_length={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.LISTS_LENGTH_HELPURL})}};
Blockly.Blocks.lists_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.LISTS_ISEMPTY_HELPURL})}};
Blockly.Blocks.lists_indexOf={init:function(){var a=[[Blockly.Msg.LISTS_INDEX_OF_FIRST,"FIRST"],[Blockly.Msg.LISTS_INDEX_OF_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.LISTS_INDEX_OF_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Number");this.appendValueInput("VALUE").setCheck("Array").appendField(Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST);this.appendValueInput("FIND").appendField(new Blockly.FieldDropdown(a),"END");this.setInputsInline(!0);this.setTooltip(Blockly.Msg.LISTS_INDEX_OF_TOOLTIP)}};
Blockly.Blocks.lists_getIndex={init:function(){var a=[[Blockly.Msg.LISTS_GET_INDEX_GET,"GET"],[Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE,"GET_REMOVE"],[Blockly.Msg.LISTS_GET_INDEX_REMOVE,"REMOVE"]];this.WHERE_OPTIONS=[[Blockly.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[Blockly.Msg.LISTS_GET_INDEX_LAST,"LAST"],[Blockly.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]];this.setHelpUrl(Blockly.Msg.LISTS_GET_INDEX_HELPURL);
this.setColour(Blockly.Blocks.lists.HUE);a=new Blockly.FieldDropdown(a,function(a){this.sourceBlock_.updateStatement_("REMOVE"==a)});this.appendValueInput("VALUE").setCheck("Array").appendField(Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST);this.appendDummyInput().appendField(a,"MODE").appendField("","SPACE");this.appendDummyInput("AT");Blockly.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.LISTS_GET_INDEX_TAIL);this.setInputsInline(!0);this.setOutput(!0);this.updateAt_(!0);
var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE")+"_"+b.getFieldValue("WHERE");return Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_"+a]})},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("statement",!this.outputConnection);var b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("statement");this.updateStatement_(b);a="false"!=a.getAttribute("at");this.updateAt_(a)},updateStatement_:function(a){a!=
!this.outputConnection&&(this.unplug(!0,!0),a?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS,
function(b){var c="FROM_START"==b||"FROM_END"==b;if(c!=a){var e=this.sourceBlock_;e.updateAt_(c);e.setFieldValue(b,"WHERE");return null}});this.getInput("AT").appendField(b,"WHERE");Blockly.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}};
Blockly.Blocks.lists_setIndex={init:function(){var a=[[Blockly.Msg.LISTS_SET_INDEX_SET,"SET"],[Blockly.Msg.LISTS_SET_INDEX_INSERT,"INSERT"]];this.WHERE_OPTIONS=[[Blockly.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[Blockly.Msg.LISTS_GET_INDEX_LAST,"LAST"],[Blockly.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]];this.setHelpUrl(Blockly.Msg.LISTS_SET_INDEX_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST);
this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"MODE").appendField("","SPACE");this.appendDummyInput("AT");this.appendValueInput("TO").appendField(Blockly.Msg.LISTS_SET_INDEX_INPUT_TO);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.LISTS_SET_INDEX_TOOLTIP);this.updateAt_(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE")+"_"+b.getFieldValue("WHERE");return Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_"+a]})},
mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){a="false"!=a.getAttribute("at");this.updateAt_(a)},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS,
function(b){var c="FROM_START"==b||"FROM_END"==b;if(c!=a){var e=this.sourceBlock_;e.updateAt_(c);e.setFieldValue(b,"WHERE");return null}});this.moveInputBefore("AT","TO");this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO");this.getInput("AT").appendField(b,"WHERE")}};
Blockly.Blocks.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]];this.WHERE_OPTIONS_2=[[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.LISTS_GET_SUBLIST_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);
this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST);this.appendDummyInput("AT1");this.appendDummyInput("AT2");Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.LISTS_GET_SUBLIST_TAIL);this.setInputsInline(!0);this.setOutput(!0,"Array");this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip(Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT1").type==
Blockly.INPUT_VALUE;a.setAttribute("at1",b);b=this.getInput("AT2").type==Blockly.INPUT_VALUE;a.setAttribute("at2",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("at1");a="true"==a.getAttribute("at2");this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):
this.appendDummyInput("AT"+a);var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var d="FROM_START"==c||"FROM_END"==c;if(d!=b){var f=this.sourceBlock_;f.updateAt_(a,d);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"));Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)}};
Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdown([[Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(b){a.updateType_(b)});this.setHelpUrl(Blockly.Msg.LISTS_SPLIT_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("INPUT").setCheck("String").appendField(b,"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0);
this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},updateType_:function(a){"SPLIT"==a?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("mode",
this.getFieldValue("MODE"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("mode"))}};Blockly.Blocks.modules={};Blockly.Blocks.modules.HUE=260;
Blockly.Blocks.counter={init:function(){this.appendDummyInput().appendField("Counter");this.appendDummyInput().appendField("Width:").appendField(new Blockly.FieldTextInput("default"),"width");this.appendDummyInput().appendField("Clock name:").appendField(new Blockly.FieldTextInput("default"),"clockname");this.appendDummyInput().appendField("Reset name:").appendField(new Blockly.FieldTextInput("default"),"resetname");this.appendDummyInput().appendField("Enable name:").appendField(new Blockly.FieldTextInput("default"),"enablename");
this.appendDummyInput().appendField("Ouput name:").appendField(new Blockly.FieldTextInput("default"),"outputname");this.setColour(260);this.setPreviousStatement(!1,null);this.setNextStatement(!1,null);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks["package"]={};
Blockly.Blocks["package"]={init:function(){this.appendDummyInput().appendField(new Blockly.FieldDropdown([["package","package"],["package body","package body"]]),"package").appendField(new Blockly.FieldTextInput("default"),"name").appendField("is");this.appendStatementInput("declarations").setCheck(null);this.appendDummyInput().appendField("end").appendField(new Blockly.FieldTextInput("default"),"end_name").appendField(";");this.setTooltip("");this.setPreviousStatement(!0,null);this.setNextStatement(!0,
null);this.setColour(105);this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("name");this.setFieldValue(a,"end_name")}};Blockly.Blocks.select={};Blockly.Blocks.select.HUE=90;
Blockly.Blocks.controls_select={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.select.HUE);this.appendDummyInput("ADD").appendField(new Blockly.FieldTextInput(""),"label").appendField(":").setAlign(Blockly.ALIGN_RIGHT).appendField("with").appendField(new Blockly.FieldTextInput(""),"A").appendField("select");this.appendValueInput("ADD0").setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput(""),"Q").appendField("<=").appendField(new Blockly.FieldTextInput(""),
"Y").appendField("when");this.itemCount_=3;this.updateShape_();this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setMutator(new Blockly.Mutator(["select_item"]));this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP);this.setColour(90);this.detection=0;this.mem=[]},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);this.updateShape_()},
decompose:function(a){var b=a.newBlock("select_item_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d<this.itemCount_;d++){var e=a.newBlock("select_item");e.initSvg();this.mem[d]=e.id;c.connect(e.previousConnection);c=e.nextConnection}return b},compose:function(a){var b=a.getInputTargetBlock("STACK");a=[];for(var c=0;b;)0!=c&&b.id!=this.mem[c]&&0==this.detection&&(this.detection=c),this.mem[c]=b.id,a.push(b.valueConnection_),b=b.nextConnection&&b.nextConnection.targetBlock(),
c++;this.itemAdd=this.itemDelete=!1;c<this.itemCount_&&(this.itemDelete=!0);c>this.itemCount_&&(this.itemAdd=!0);for(c=0;c<this.itemCount_;c++)(b=this.getInput("ADD"+c).connection.targetConnection)&&-1==a.indexOf(b)&&b.disconnect();this.itemCount_=a.length;this.updateShape_();for(c=0;c<this.itemCount_;c++)Blockly.Mutator.reconnect(a[c],this,"ADD"+c)},saveConnections:function(a){a=a.getInputTargetBlock("STACK");for(var b=0;a;){var c=this.getInput("ADD"+b);a.valueConnection_=c&&c.connection.targetConnection;
b++;a=a.nextConnection&&a.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);for(var a=1;a<this.itemCount_;a++)this.getInput("ADD"+a)||this.appendValueInput("ADD"+a).setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput(""),"B"+a).appendField("when","C"+a);if(1==this.itemAdd){var b="default";for(a=
this.detection;a<this.itemCount_;a++){var c=this.getInput("ADD"+a);var d=c.fieldRow["1"].text_;c.removeField("B"+a);c.removeField("C"+a);c.appendField(new Blockly.FieldTextInput(b),"B"+a);c.appendField("when","C"+a);b=d}this.detection=0}if(1==this.itemDelete){for(a=this.detection;a<this.itemCount_;a++)this.getInput("ADD"+(a+1)),this.getInput("ADD"+a);this.detection=0}for(;this.getInput("ADD"+a);)this.removeInput("ADD"+a),a++}};
Blockly.Blocks.select_item_container={init:function(){this.setColour(Blockly.Blocks.select.HUE);this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD);this.appendStatementInput("STACK");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP);this.contextMenu=!1}};
Blockly.Blocks.select_item={init:function(){this.setColour(Blockly.Blocks.select.HUE);this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP);this.contextMenu=!1}};Blockly.Blocks.sequential={};
Blockly.Blocks.for_loop={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("label"),"label_name").appendField(": for");this.appendValueInput("loop").setCheck(null);this.appendDummyInput().appendField("in");this.appendValueInput("range").setCheck(null);this.appendDummyInput().appendField("loop");this.appendStatementInput("NAME").setCheck(null);this.appendDummyInput().appendField("end loop").appendField(new Blockly.FieldTextInput("label"),"end_loop").appendField(";");this.setInputsInline(!0);
this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("label_name");this.setFieldValue(a,"end_loop")}};
Blockly.Blocks.loop={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("label"),"label_name").appendField(": loop");this.appendStatementInput("NAME").setCheck(null);this.appendDummyInput().appendField("end loop").appendField(new Blockly.FieldTextInput("label"),"end_loop").appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=
this.getFieldValue("label_name");this.setFieldValue(a,"end_loop")}};
Blockly.Blocks.while_loop={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("label"),"label_name").appendField(": while");this.appendValueInput("range").setCheck(null);this.appendDummyInput().appendField("loop");this.appendStatementInput("NAME").setCheck(null);this.appendDummyInput().appendField("end loop").appendField(new Blockly.FieldTextInput("label"),"end_loop").appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,
null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")},onchange:function(a){a=this.getFieldValue("label_name");this.setFieldValue(a,"end_loop")}};Blockly.Blocks.next={init:function(){this.appendDummyInput().appendField(new Blockly.FieldTextInput("label"),"labelnext").appendField(": next").appendField(new Blockly.FieldTextInput("looplabel"),"labelloop");this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.next_when={init:function(){this.appendValueInput("NAME").setCheck(null).appendField(new Blockly.FieldTextInput("label"),"labelnext").appendField(": next").appendField(new Blockly.FieldTextInput("looplabel"),"labelloop").appendField("when");this.setInputsInline(!1);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks["return"]={init:function(){this.appendDummyInput().appendField("return");this.appendValueInput("condition").setCheck(null);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.exit={init:function(){this.appendDummyInput().appendField("exit;");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.exit_label={init:function(){this.appendDummyInput().appendField("exit").appendField(new Blockly.FieldTextInput("default"),"exit_label").appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.exit_when={init:function(){this.appendDummyInput().appendField("exit").appendField(new Blockly.FieldTextInput("default"),"exit_when").appendField("when");this.appendValueInput("exit_when").setCheck(null);this.appendDummyInput().appendField(";");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.wait={init:function(){this.appendDummyInput().appendField("wait;");this.setInputsInline(!1);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.wait_list={init:function(){this.appendValueInput("wait_list3").setCheck(null).appendField("wait").appendField(new Blockly.FieldDropdown([["for","for"],["until","until"],["on","on"]]),"wait_list2");this.setInputsInline(!1);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks["null"]={init:function(){this.appendDummyInput().appendField("null");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.testbench={};
Blockly.Blocks.assert={init:function(){this.appendDummyInput().appendField("assert");this.appendValueInput("condition").setCheck(null);this.appendDummyInput().appendField("report");this.appendValueInput("test_String").setCheck(null);this.appendDummyInput().appendField("severity");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["Note","Note"],["Warning","Warning"],["Error","Error"],["Failure","Failure"]]),"severity");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,
null);this.setColour(270);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.testbench={init:function(){this.appendDummyInput().appendField("testbench:").appendField(new Blockly.FieldTextInput("default"),"testbench");this.appendStatementInput("testbench").setCheck(null);this.setInputsInline(!0);this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};
Blockly.Blocks.testbench_out={init:function(){this.appendDummyInput().appendField("signal\\output").appendField(new Blockly.FieldTextInput("default"),"output");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(270);this.setTooltip("");this.setHelpUrl("")}};
Blockly.Blocks.tb_out={init:function(){this.appendDummyInput().appendField("output").appendField(new Blockly.FieldTextInput("default"),"output");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(270);this.setTooltip("");this.setHelpUrl("")}};
Blockly.Blocks.tb_internal={init:function(){this.appendDummyInput().appendField("internal signal").appendField(new Blockly.FieldTextInput("default"),"internal");this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(270);this.setTooltip("");this.setHelpUrl("")}};
Blockly.Blocks.tb_clockgen={init:function(){this.appendDummyInput().appendField("clockname").appendField(new Blockly.FieldTextInput(""),"clockname").appendField("periods").appendField(new Blockly.FieldTextInput(""),"periods");this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};
Blockly.Blocks.tb_signal={init:function(){this.appendDummyInput().appendField("input").appendField(new Blockly.FieldTextInput(""),"signalname").appendField("trace").appendField(new Blockly.FieldTextInput(""),"trace");this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setTooltip("");this.setHelpUrl("http://www.example.com/")}};Blockly.Blocks.when={};Blockly.Blocks.when.HUE=90;
Blockly.Blocks.controls_when={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("ADD0").appendField(new Blockly.FieldTextInput(""),"label").appendField(":").setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput(""),"A").appendField("<=").appendField(new Blockly.FieldTextInput(""),"B").appendField("when");this.itemCount_=3;this.updateShape_();this.setPreviousStatement(!0,null);this.setNextStatement(!0,
null);this.setMutator(new Blockly.Mutator(["when_item"]));this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP);this.setColour(90);this.detection=0;this.mem=[]},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=a.newBlock("when_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d<this.itemCount_;d++){var e=
a.newBlock("when_item");e.initSvg();this.mem[d]=e.id;c.connect(e.previousConnection);c=e.nextConnection}return b},compose:function(a){var b=a.getInputTargetBlock("STACK");a=[];for(var c=0;b;)0!=c&&b.id!=this.mem[c]&&0==this.detection&&(this.detection=c),this.mem[c]=b.id,a.push(b.valueConnection_),b=b.nextConnection&&b.nextConnection.targetBlock(),c++;this.itemAdd=this.itemDelete=!1;c<this.itemCount_&&(this.itemDelete=!0);c>this.itemCount_&&(this.itemAdd=!0);for(c=0;c<this.itemCount_;c++)(b=this.getInput("ADD"+
c).connection.targetConnection)&&-1==a.indexOf(b)&&b.disconnect();this.itemCount_=a.length;this.updateShape_();for(c=0;c<this.itemCount_;c++)Blockly.Mutator.reconnect(a[c],this,"ADD"+c)},saveConnections:function(a){a=a.getInputTargetBlock("STACK");for(var b=0;a;){var c=this.getInput("ADD"+b);a.valueConnection_=c&&c.connection.targetConnection;b++;a=a.nextConnection&&a.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||
this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);for(var a=1;a<this.itemCount_;a++)this.getInput("ADD"+a)||this.appendValueInput("ADD"+a).appendField("else","A"+a).setAlign(Blockly.ALIGN_RIGHT).appendField(new Blockly.FieldTextInput(""),"B"+a).appendField("when","C"+a);if(1==this.itemAdd){var b="";for(a=this.detection;a<this.itemCount_;a++){var c=this.getInput("ADD"+a);var d=c.fieldRow["1"].text_;c.removeField("B"+a);c.removeField("C"+a);c.appendField(new Blockly.FieldTextInput(b),
"B"+a);c.appendField("when","C"+a);b=d}this.detection=0}if(1==this.itemDelete){for(a=this.detection;a<this.itemCount_;a++)this.getInput("ADD"+(a+1)),this.getInput("ADD"+a);this.detection=0}for(;this.getInput("ADD"+a);)this.removeInput("ADD"+a),a++}};
Blockly.Blocks.when_container={init:function(){this.setColour(Blockly.Blocks.when.HUE);this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD);this.appendStatementInput("STACK");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP);this.contextMenu=!1}};
Blockly.Blocks.when_item={init:function(){this.setColour(Blockly.Blocks.when.HUE);this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP);this.contextMenu=!1}};