bob2987
Junior Member level 1
- Joined
- Feb 20, 2014
- Messages
- 18
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 192
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ---------------------------------------------------------------------------------------------------------------- -- XOR_SIG.VHD -- May 2001 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; ----------------------------------------------------------------------------------------------------------------
op <= '0';
if set_1 = '1' then
op <= '1';
end if;
You need to study more about VHDL signals and variables. Signals get assigned at the end (and ONLY at the end) of a process; variables get assigned immediately.
vgoodtimes said:snip
signal A, B : integer;
signal C : integer;
signal Y, Z : integer; signal M, N : integer; begin process (A,B,C,M,N) begin M <= A; N <= B; Z <= M + N; M <= C; Y <= M + N; end process;
what does the line " Only the last signal assignment is carried out" mean ?
so if we want every signal assignment to take place ( not only the last one) then what do i need to do?
begin
process (a)
begin
a<= a+1;
a<= a+2;
a<=a+3;
end process
Code:begin process (a) begin a<= a+1; a<= a+2; a<=a+3; end process
in this case will all this instructions be executed or only a <= a+3;
Code:begin process (a) begin a<= a+1; a<= a+2; a<=a+3; end process
in this case will all this instructions be executed or only a <= a+3;
sorry , bt am totally confused and needs discussion.plz help.
begin
process (A,b,c)
begin
a<= a+1;
b <=a+2;
c<= b+3;
end process;
ok, but for how many times will it evaluate ?
ok, but for how many times will it evaluate ?
1)
begin
y <= a+b;
end behavioral;
2)
begin
y <= a and b;
z <= a and d ;
end behavioral
3)
begin
process (a, b)
begin
y <= a and b;
y <= a nand b;
end process
end behavioral;
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?