﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="thpdoc.xsl"?>
<page id="generate_vhdl" suffix=" Statement">
  <subsection>Specifies additional entities that will be compiled to VHDL.<code>generate_vhdl(EntityName);</code></subsection>
  <section name="Remarks">
    <p>Normally, VisualHDL uses either <kw>synthesize_hardware</kw> or <kw>simulate_entity</kw> to determine the root entity of your design. Then it generates VHDL code for the root entity and all entities referenced by it. However, you can additionally generate VHDL code for any other entities of your choice. To do so, use the generate_vhdlstatement.</p>
  </section>
  <examples>
	<example><code>using Core.Primitives;
using Core.RAMs.Synchronous;
	
entity LEDSetter
{
	port out logic[8] LEDs;

	LEDs = 0x55;
}

entity MyTestbench
{
	LEDSetter uut(
		LEDs = auto
	);
}

simulate_entity(MyTestbench);
generate_vhdl(SimpleRAM&lt;1024, 8&gt;);
generate_vhdl(SimpleRAM&lt;512, 16&gt;);</code>
This code will generate VHDL for  MyTestbench, LEDSetter and two variations of SimpleRAM.
	</example>
  </examples>
<seealso id="synthesize_hardware"/>
<seealso id="simulate_entity"/>
<seealso id="import_entity"/>
</page>