Differences between Signals and Variables in VHDL? If the
same code is written using Signals and Variables what does
it synthesize to?
Answer Posted / seetharamukg
Signals updates a value after some "delta" time or at the
end of the process. But variable updates a value immediately.
Both variable and signals are synthesizable.
Designer should know hoe to use these 2 objects.
Ex: Signal usage
Library IEEE;
use IEEE.std_logic_1164.all;
entity xor_sig is
port (
A, B, C: in STD_LOGIC;
X, Y: out STD_LOGIC
);
end xor_sig;
architecture SIG_ARCH of xor_sig is
signal D: STD_LOGIC;
begin
SIG:process (A,B,C)
begin
D <= A; -- ignored !!
X <= C xor D;
D <= B; -- overrides !!
Y <= C xor D;
end process;
end SIG_ARCH;
Variable usage:
Library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity xor_var is
port (
A, B, C: in STD_LOGIC;
X, Y: out STD_LOGIC
);
end xor_var;
architecture VAR_ARCH of xor_var is
begin
VAR:process (A,B,C)
variable D: STD_LOGIC;
begin
D := A;
X <= C xor D;
D := B;
Y <= C xor D;
end process;
end VAR_ARCH;
| Is This Answer Correct ? | 48 Yes | 9 No |
Post New Answer View All Answers
What products have you designed which have entered high volume production?
Design an 8 is to 3 encoder using 4 is to encoder?
What is the function of enhancement mode transistor?
What is the ideal input and output resistance of a current source?
What are the steps required to solve setup and hold violations in vlsi?
Give the logic expression for an AOI gate. Draw its transistor level equivalent. Draw its stick diagram
6-T XOR gate?
If the current through the poly is 20nA and the contact can take a max current of 10nA how would u overcome the problem?
What are the different design constraints occur in the synthesis phase?
what is a sequential circuit?
What are the changes that are provided to meet design power targets?
Calculate rise delay of a 3-input NAND gate driving a 3-input NOR gate through a 6mm long and 0.45m wide metal wire with sheet resistance R = 0.065 / and Cpermicron= 0.25 fF/m. The resistance and capacitance of the unit NMOS are 6.5k and 2.5fF. Use a 3 segment -model for the wire. Consider PMOS and NMOS size of reference inverter as 2 and 1 respectively. Use appropriate sizing for the NAND and NOR gate.
What is Noise Margin? Explain the procedure to determine Noise Margin?
What are the main issues associated with multiprocessor caches and how might you solve them?
What transistor level design tools are you proficient with? What types of designs were they used on?