0
0
VHDLprogramming~20 mins

Signal assignment operator in VHDL - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Signal Assignment Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of this VHDL process with signal assignment?

Consider the following VHDL process. What will be the value of signal_out after the process executes once?

VHDL
signal signal_out : std_logic := '0';
begin
  process
  begin
    signal_out <= '1';
    wait for 10 ns;
  end process;
Asignal_out = '0' immediately after process starts
Bsignal_out = '1' immediately after process starts
Csignal_out = '1' after 10 ns delay
Dsignal_out remains '0' forever
Attempts:
2 left
💡 Hint

Remember that signal assignments in VHDL take effect after the process suspends.

Predict Output
intermediate
2:00remaining
What is the output of multiple signal assignments in one process?

Given this VHDL process, what will be the final value of sig after the process runs?

VHDL
signal sig : std_logic := '0';
begin
  process
  begin
    sig <= '1';
    sig <= '0';
    wait for 5 ns;
  end process;
Asig = '1' immediately
Bsig = '1' after 5 ns
Csig = '0' after 5 ns
Dsig = '0' immediately
Attempts:
2 left
💡 Hint

Later signal assignments override earlier ones within the same process execution.

🔧 Debug
advanced
2:00remaining
Identify the error in this signal assignment code

What error will this VHDL code produce?

VHDL
signal a : std_logic := '0';
begin
  process
  begin
    a = '1';
    wait for 10 ns;
  end process;
ASyntax error: missing semicolon after assignment
BRuntime error: signal 'a' not initialized
CNo error, code runs fine
DSyntax error: '=' used instead of '<=' for signal assignment
Attempts:
2 left
💡 Hint

Check the correct operator for signal assignment in VHDL.

🧠 Conceptual
advanced
2:00remaining
How does signal assignment timing affect simulation?

Which statement best describes when a signal assignment takes effect in VHDL?

ASignal assignments take effect after the process suspends and delta cycles complete
BSignal assignments take effect immediately when executed in the process
CSignal assignments take effect only after the entire simulation cycle ends
DSignal assignments take effect only if the signal is a variable
Attempts:
2 left
💡 Hint

Think about how VHDL schedules signal updates.

🚀 Application
expert
3:00remaining
Determine the final signal value after multiple processes assign it

Given two concurrent processes assigning to the same signal sig, what is the final value of sig after 20 ns?

VHDL
signal sig : std_logic := '0';

process_1: process
begin
  wait for 10 ns;
  sig <= '1';
  wait;
end process;

process_2: process
begin
  wait for 15 ns;
  sig <= '0';
  wait;
end process;
Asig = 'X' (driver conflict) after 20 ns
Bsig = '1' after 20 ns
Csig = '0' after 20 ns
Dsig = 'Z' (high impedance) after 20 ns
Attempts:
2 left
💡 Hint

Consider the order of signal assignments, their timing, and std_logic resolution with multiple drivers.