1
\$\begingroup\$

I want to design a NAND gate (\$t_{PLH}\$ = \$t_{PHL}\$ = 10ns) with VHDL.

\$t_{PLH}\$ = Propagation delay low to high

\$t_{PHL}\$ = Propagation delay high to low

This is first code.

library IEEE;               
use IEEE.STD_LOGIC_1164.ALL;
entity nand_gate is
    Port ( A : in STD_LOGIC;
           B : in STD_LOGIC;
           X : out STD_LOGIC);
end nand_gate;

architecture Behavioral of nand_gate is

begin

    X <= A nand B after 10 ns;

end Behavioral;

This is second one:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity NAND_GATE is
    port (
        A, B : in  STD_LOGIC;
        Y    : out STD_LOGIC
    );
end NAND_GATE;

architecture Behavioral of NAND_GATE is
    
begin
    process(A, B)
    begin

       Y <= A nand B after 10 ns;
    end process;
end Behavioral;

What is the difference between these codes?
What changes if I use the term "process" for short?

I write a test bench and I simulate this code. Both are exactly the same. Then why do we use the term "process"?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ your design adds a delay at every input change: At 40 A=B=1 which leads to X=0 at 50; B=0 at 50 leads to X=1 at 60. \$\endgroup\$ Apr 4 at 8:17
  • \$\begingroup\$ @Matthias Schweikart When I changed the delay time, I saw that my design adds a delay on each input change. However, I would expect it not to add a delay on each input change without the "process" statement. Is there any difference between the code above and another code that includes the "process" statement? \$\endgroup\$ Apr 4 at 8:46
  • 2
    \$\begingroup\$ A concurrent assignment not included in a process behaves like an assignment included in a process, which is sensitive to the signals read in the assignment. So there is no difference between the code above and another code using a process. \$\endgroup\$ Apr 4 at 9:31

1 Answer 1

1
\$\begingroup\$

A concurrent assignment not included in a process behaves like an assignment included in a process, which is sensitive to the signals read in the assignment. So there is no difference between the code above and another code using a process.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.