Challenge - 5 Problems
VHDL Entity-Architecture Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of a simple AND gate entity-architecture
What is the output of the following VHDL code when inputs A=1 and B=0?
VHDL
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity AndGate is Port ( A : in STD_LOGIC; B : in STD_LOGIC; Y : out STD_LOGIC); end AndGate; architecture Behavioral of AndGate is begin Y <= A and B; end Behavioral;
Attempts:
2 left
💡 Hint
AND gate outputs '1' only if both inputs are '1'.
✗ Incorrect
Since input B is '0', the AND operation results in '0'.
🧠 Conceptual
intermediate1:30remaining
Purpose of the architecture block in VHDL
What is the main purpose of the architecture block in a VHDL entity-architecture model?
Attempts:
2 left
💡 Hint
Think about where the logic or circuit details are described.
✗ Incorrect
The architecture block contains the actual logic or structure that implements the entity's function.
🔧 Debug
advanced2:30remaining
Identify the error in this entity-architecture code
What error will this VHDL code produce when compiled?
VHDL
entity OrGate is Port ( A : in STD_LOGIC; B : in STD_LOGIC; Y : out STD_LOGIC); end OrGate; architecture Behavioral of OrGate is begin Y <= A or B; end Behavioral;
Attempts:
2 left
💡 Hint
Check the entity declaration ending line carefully.
✗ Incorrect
The entity declaration must end with a semicolon after 'end OrGate'.
📝 Syntax
advanced2:00remaining
Correct architecture declaration syntax
Which option shows the correct syntax to declare an architecture named 'DataPath' for an entity 'Processor'?
Attempts:
2 left
💡 Hint
Remember the order: architecture name, of entity name, is, begin ... end;
✗ Incorrect
The correct syntax is: architecture of is begin ... end ;
🚀 Application
expert3:00remaining
Number of signals in architecture after elaboration
Given this VHDL entity-architecture, how many signals are present inside the architecture after elaboration?
VHDL
entity Counter is Port ( clk : in STD_LOGIC; reset : in STD_LOGIC; count_out : out INTEGER range 0 to 15); end Counter; architecture Behavioral of Counter is signal count : INTEGER range 0 to 15 := 0; begin process(clk, reset) begin if reset = '1' then count <= 0; elsif rising_edge(clk) then count <= count + 1; end if; end process; count_out <= count; end Behavioral;
Attempts:
2 left
💡 Hint
Count only signals declared inside the architecture block.
✗ Incorrect
Only one signal named 'count' is declared inside the architecture.