Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to instantiate the component with port map.
VHDL
U1: entity work.my_component port map([1]);Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting => between port and signal
Listing signals without port names
Swapping port and signal names
✗ Incorrect
Port map requires association of ports with signals using => syntax.
2fill in blank
mediumComplete the port map to connect signals correctly.
VHDL
U2: entity work.adder port map(a => [1], b => b_in, sum => sum_out);Attempts:
3 left
💡 Hint
Common Mistakes
Connecting wrong signals to ports
Using output signals as inputs
✗ Incorrect
The port 'a' must be connected to the signal 'a_in'.
3fill in blank
hardFix the error in the port map association.
VHDL
U3: entity work.counter port map(clk => clk_in, rst => [1]);Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong signal names
Swapping port and signal names
✗ Incorrect
The port 'rst' must be connected to the signal 'rst'.
4fill in blank
hardFill both blanks to complete the port map with correct associations.
VHDL
U4: entity work.multiplier port map([1] => data_in, [2] => data_out);
Attempts:
3 left
💡 Hint
Common Mistakes
Using signal names instead of port names
Mixing input and output ports
✗ Incorrect
Ports 'a' and 'b' are connected to 'data_in' and 'data_out' respectively.
5fill in blank
hardFill all three blanks to correctly map ports to signals in the component instantiation.
VHDL
U5: entity work.register port map(clk => [1], d => [2], q => [3]);
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing input and output signals
Using wrong signal names
✗ Incorrect
Ports 'clk', 'd', and 'q' are connected to 'clk_signal', 'data_in', and 'data_out' respectively.
