sheepherdee
Newbie level 2
- Joined
- Nov 24, 2012
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,300
I'm a beginner.When I complie this VHDL file of my IC design homework, I encounter with the error. I have searched many forums and know the reasons now. But I don't know how to make it right. If anyone can help me, I really appreciate. At last, thank you.
error:signal "p" has multiple sources
THANK YOU
error:signal "p" has multiple sources
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 66 67 68 69 70 71 library ieee; use ieee.std_logic_1164.all; entity fsq is port ( clk : in std_logic; u : out std_logic ); end fsq; architecture afsq of fsq is signal p : std_logic_vector(3 downto 0); signal p0 : std_logic; signal p1 : std_logic; signal p2 : std_logic; signal p3 : std_logic; begin process(clk) begin if clk'event and clk='1' then p0<=not p0; end if; end process; process(p0) begin if p0'event and p0='0' then p1<=not p1; end if; end process; process(p1) begin if p1'event and p1='0' then p2<=not p2; end if; end process; process(p2) begin if p2'event and p2='0' then p3<=not p3; end if; end process; p<=p3&p2&p1&p0; process(p) begin if p="1000" then p<="0000"; end if; case p is when "0000" => u<='0'; when "0001" => u<='1'; when "0010" => u<='1'; when "0011" => u<='0'; when "0100" => u<='1'; when "0101" => u<='1'; when "0110" => u<='1'; when "0111" => u<='1'; when others => null; end case; end process; end afsq;
THANK YOU
Last edited by a moderator: