nikhilsigma
Full Member level 2
- Joined
- Jun 19, 2010
- Messages
- 142
- Helped
- 17
- Reputation
- 34
- Reaction score
- 16
- Trophy points
- 1,298
- Location
- Delhi, India
- Activity points
- 2,584
this is my code....
so i have 2 problems.....
1. I want to add a delay of 2seconds at the place as shown in syntax....i think it can be done with a counter with a for loop....if yes...please give syntax....
2. tool is showing that "Signal a1 cannot be synthesized, bad synchronous description." so how can i remove this error....
Note : consider signal b as clock....
please help..... :sad:
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity server is Port ( a : in STD_LOGIC; -- a is the rquests from the user b : in STD_LOGIC; ar,ag,al : out STD_LOGIC:='0'); -- c is showinh the processing of disk according to request(a)... end server; architecture Behavioral of server is signal a1 :integer:=0; signal a2 :std_logic := '0'; begin reqA : process (a,a2,a1) begin if(a' event and a='1') then a1<=a1+1; end if; if(a2' event and a2='1') then a1<=a1-1; end if; if(a1>0) then al<='1'; ag<='0'; else al<='0'; if(a2='1') then ag<='0'; else ag<='1'; end if; end if; end process reqA; logic : process begin if(a1>0) then ar<='1'; a2<='1'; wait for 2 sec; -- wait for 2second clock ar<='0'; a2<='0'; elsif (a1=0) then a2<='0'; wait until rising_edge(b); -- wait for small clock end if; end process logic; end Behavioral;
so i have 2 problems.....
1. I want to add a delay of 2seconds at the place as shown in syntax....i think it can be done with a counter with a for loop....if yes...please give syntax....
2. tool is showing that "Signal a1 cannot be synthesized, bad synchronous description." so how can i remove this error....
Note : consider signal b as clock....
please help..... :sad: