EmbDev.net

Forum: FPGA, VHDL & Verilog strange behaviour of PROCESS

Author: Andrew Kovalenko (andrewk)
Posted on:

Hi,
I don't understand, why does PROCESS work if it's impossible to work.
Simplified code described below.
There is unused input "unused_test" which is in sensitivty list of
PROCESS. I activate simulator in Altera Quartus II (v9.1) with clock
pulses on input "clk" while input "unused_test" is always zero.
And I see in simulator that output "outp" is negation of wafeform on
input "clk", i.e. "outp" changes its state as described inside PROCESS.
How can static input "unused_test" activate PROCESS ?????


LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.numeric_std.all;

ENTITY ques IS
PORT( unused_test: IN STD_LOGIC;
    clk: IN STD_LOGIC;
    outp: OUT STD_LOGIC);
END ques;

ARCHITECTURE arch OF ques IS
  SIGNAL prom: STD_LOGIC := '0';
BEGIN
  PROCESS(unused_test)
  BEGIN
  prom <= NOT clk ;
  END PROCESS;
outp <= prom;
END arch;
Author: Na sowas (Guest)
Posted on:

To get things right:
The sensitivity list is wrong.
  PROCESS(unused_test)  -- wrong
  PROCESS(clk)          -- correct
  BEGIN
    prom <= NOT clk ;
  END PROCESS;
> And I see in simulator that output "outp" is negation of wafeform on
> input "clk", i.e. "outp" changes its state as described inside PROCESS.
The autocompletion of a sensitivity list is what a synthesizer does
automatically. Look for an info or a warning like:
"incomplete sensitivity list corrected"

> I activate simulator in Altera Quartus II (v9.1)
I suppose this behaviour is because Quartus is a synthesis toolchain in
first line.
Author: Andrew Kovalenko (andrewk)
Posted on:

Na sowas, thank you for reply.
Really, synthesizer does autocompletion of a sensitivity list.
But it may be necessary to have only selected signals in sensitivity
list. And there is no settings to turn off "autocompletion" in
QuartusII.
Author: Na sowas (Guest)
Posted on:

> But it may be necessary to have only selected signals in sensitivity
> list.
Then the sensitivity list ist wrong and therefor the simulation is
wrong.

Keep in mind:
This list is not a way to get different behaviour by choosing some
selected entries. Every signal that changes the results of the process
MUST be in the list. Otherwise the simulation simply is WRONG (although
it may look nice to you). Its definitly not up to you to choose some
signals.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.


webmaster@embdev.netContactAdvertising on EmbDev.net