Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The best place to put a component is inside a package...in the same file as the entity. So if you have an entity called 'Widget', the entity would be...Is it possible to put a component inside a package ?
If so, what is the correct syntax to instatiate it ?
[LEFT][TABLE="class: vhdl syntaxHighlighter expand"]
[TR]
[TD="colspan: 2"]Code VHDL - [[COLOR=#226c22]expand[/COLOR]][/TD]
[/TR]
[TR="class: li1"]
[TD]
123[/TD]
[TD]
[COLOR=#000080][B]entity[/B][/COLOR] Widget [COLOR=#000080][B]is[/B][/COLOR] ...[COLOR=#000080][B]end[/B][/COLOR] Widget[COLOR=#000066];[/COLOR][/TD]
[/TR]
[/TABLE]
[/LEFT]
[LEFT][TABLE="class: vhdl syntaxHighlighter expand"]
[TR]
[TD="colspan: 2"]Code VHDL - [[COLOR=#226c22]expand[/COLOR]][/TD]
[/TR]
[TR="class: li1"]
[TD]
123[/TD]
[TD]
[COLOR=#000080][B]component[/B][/COLOR] Widget [COLOR=#000080][B]is[/B][/COLOR] ...[COLOR=#000080][B]end[/B][/COLOR] [COLOR=#000080][B]component[/B][/COLOR] Widget[COLOR=#000066];[/COLOR][/TD]
[/TR]
[/TABLE]
[/LEFT]
[LEFT][TABLE="class: vhdl syntaxHighlighter expand"]
[TR]
[TD="colspan: 2"]Code VHDL - [[COLOR=#226c22]expand[/COLOR]][/TD]
[/TR]
[TR="class: li1"]
[TD]
12345[/TD]
[TD]
[COLOR=#000080][B]package[/B][/COLOR] pkg_Widget [COLOR=#000080][B]component[/B][/COLOR] Widget [COLOR=#000080][B]is[/B][/COLOR] ... [COLOR=#000080][B]end[/B][/COLOR] [COLOR=#000080][B]component[/B][/COLOR] Widget[COLOR=#000066];[/COLOR][COLOR=#000080][B]end[/B][/COLOR] [COLOR=#000080][B]package[/B][/COLOR] pkg_Widget[/TD]
[/TR]
[/TABLE]
[/LEFT]
[LEFT][TABLE="class: vhdl syntaxHighlighter expand"]
[TR]
[TD="colspan: 2"]Code VHDL - [[COLOR=#226c22]expand[/COLOR]][/TD]
[/TR]
[TR="class: li1"]
[TD]
123456[/TD]
[TD]
[COLOR=#000080][B]use[/B][/COLOR] [COLOR=#0000ff]work[/COLOR].pkg_Widget.[COLOR=#000080][B]all[/B][/COLOR][COLOR=#000066];[/COLOR]...[COLOR=#000080][B]architecture[/B][/COLOR] rtl [COLOR=#000080][B]of[/B][/COLOR] Use_The_Widget [COLOR=#000080][B]is[/B][/COLOR][COLOR=#000080][B]begin[/B][/COLOR] The_Widget [COLOR=#000066]:[/COLOR] widget [COLOR=#000080][B]generic[/B][/COLOR] [COLOR=#000080][B]map[/B][/COLOR][COLOR=#000066]([/COLOR]...[COLOR=#000066])[/COLOR] [COLOR=#000080][B]port[/B][/COLOR] [COLOR=#000080][B]map[/B][/COLOR][COLOR=#000066]([/COLOR]...[COLOR=#000066])[/COLOR][COLOR=#000066];[/COLOR][COLOR=#000080][B]end[/B][/COLOR] rtl[COLOR=#000066];[/COLOR][/TD]
[/TR]
[/TABLE]
[/LEFT]
[LEFT][TABLE="class: vhdl syntaxHighlighter expand"]
[TR]
[TD="colspan: 2"]Code VHDL - [[COLOR=#226c22]expand[/COLOR]][/TD]
[/TR]
[TR="class: li1"]
[TD]
123456[/TD]
[TD]
...[COLOR=#000080][B]architecture[/B][/COLOR] rtl [COLOR=#000080][B]of[/B][/COLOR] Use_The_Widget [COLOR=#000080][B]is[/B][/COLOR][COLOR=#000080][B]begin[/B][/COLOR] The_Widget [COLOR=#000066]:[/COLOR] [COLOR=#000080][B]entity[/B][/COLOR] [COLOR=#0000ff]work[/COLOR].widget [COLOR=#000080][B]generic[/B][/COLOR] [COLOR=#000080][B]map[/B][/COLOR][COLOR=#000066]([/COLOR]...[COLOR=#000066])[/COLOR] [COLOR=#000080][B]port[/B][/COLOR] [COLOR=#000080][B]map[/B][/COLOR][COLOR=#000066]([/COLOR]...[COLOR=#000066])[/COLOR][COLOR=#000066];[/COLOR][COLOR=#000080][B]end[/B][/COLOR] rtl[COLOR=#000066];[/COLOR][/TD]
[/TR]
[/TABLE]
[/LEFT]