0
0
VHDLprogramming~10 mins

VHDL vs Verilog comparison - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a signal in VHDL.

VHDL
signal clk : [1];
Drag options to blanks, or click blank then click option'
Awire
Bbit
Creg
Dint
Attempts:
3 left
💡 Hint
Common Mistakes
Using Verilog types like 'wire' or 'reg' in VHDL signal declaration.
2fill in blank
medium

Complete the code to assign a value to a signal in VHDL.

VHDL
clk <= [1];
Drag options to blanks, or click blank then click option'
A'1'
B1'b1
C"1"
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using Verilog style bit literals like 1'b1 in VHDL.
3fill in blank
hard

Fix the error in the VHDL process sensitivity list.

VHDL
process([1])
begin
  -- process body
end process;
Drag options to blanks, or click blank then click option'
Aclk or reset
Bclk; reset
Cclk, reset
Dclk and reset
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'or' like in Verilog or semicolons instead of commas in sensitivity lists.
4fill in blank
hard

Fill both blanks to complete the VHDL entity port declaration.

VHDL
entity my_entity is
  port(
    clk : in [1];
    data : out [2];
  );
end my_entity;
Drag options to blanks, or click blank then click option'
Astd_logic
Bbit_vector
Cstd_logic_vector
Dinteger
Attempts:
3 left
💡 Hint
Common Mistakes
Using bit_vector which is less common than std_logic_vector.
Mixing types between single bit and vector signals.
5fill in blank
hard

Fill all three blanks to complete the VHDL architecture signal assignment.

VHDL
architecture Behavioral of my_entity is
  signal temp : [1];
begin
  process([2])
  begin
    if rising_edge([3]) then
      temp <= '1';
    end if;
  end process;
end Behavioral;
Drag options to blanks, or click blank then click option'
Astd_logic
Bclk
Dbit
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for clock signal in sensitivity list and edge detection.
Declaring signal with wrong type.