fightingfyp 发布于 2007-11-5 14:11:21
[求助]29进制
编了一个29进制计数器,出现以下错误,怎么回事? WARNING:Xst:528 - Multi-source in Unit <ershijiu> on signal <c> not replaced by logic Signal is stuck at GND ERROR:Xst:415 - Synthesis failed CPU : 1.91 / 3.02 s | Elapsed : 1.00 / 3.00 s 源程序:library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity ershijiu is port( cp:in std_logic; q:out std_logic_vector(7 downto 0); c:out std_logic); end ershijiu; architecture Behavioral of ershijiu is signal qa:std_logic_vector(3 downto 0); signal qb:std_logic_vector(3 downto 0); signal cin:std_logic; begin q(7 downto 4)<=qb; q(3 downto 0)<=qa; process(cp) begin if rising_edge(cp) then if ((qa=9) or (qa=8 and qb=2)) then qa<="0000"; c<='0'; elsif qa=8 then cin<='1'; qa<=qa+1; else qa<=qa+1; cin<='0'; end if ; end if ; end process; process (cin,cp) begin if rising_edge(cp) then if (qa=8 and qb=2) then qb<="0000"; c<='1'; else c<='0'; end if ; if cin='1' then qb<=qb+1; end if ; end if ; end process; end Behavioral; levi 发布于 2007-11-6 0:10:03
qb多次赋值 fightingfyp 发布于 2007-11-6 21:41:29
 能不能说的具体一点,这个程序是我从书上照抄下来的~~ 怎么该啊? |