Complete the VHDL code to declare a component inside an architecture.
component [1] port(clk : in std_logic); end component;
The component declaration requires the component name, here my_component.
Complete the code to instantiate a component named 'alu' with port map.
U1: [1] port map(clk => clk, a => a_in, b => b_in);To instantiate a component, use its name alu after the label.
Fix the error in the architecture declaration by completing the missing keyword.
architecture [1] of my_module is begin -- architecture body end [1];
The architecture name, such as behavioral, must be consistent in declaration and end statement.
Fill both blanks to correctly declare and instantiate a component named 'counter'.
component [1] port(clk : in std_logic); end component; U2: [2] port map(clk => clk);
The component declaration and instantiation must use the same component name counter.
Fill all three blanks to create a proper hierarchy: declare a component, instantiate it, and name the architecture.
architecture [1] of top_module is component [2] port(clk : in std_logic); end component; begin U3: [3] port map(clk => clk); end [1];
The architecture name behavioral is used in declaration and end.
The component name counter is used in declaration and instantiation.
