在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3442|回复: 2

[求助] VHDL 74193建模不能综合(ISE 13.3)

[复制链接]
发表于 2012-10-10 21:27:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
代码如下:



  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use ieee.std_logic_unsigned.all;

  4. -- Uncomment the following library declaration if using
  5. -- arithmetic functions with Signed or Unsigned values
  6. --use IEEE.NUMERIC_STD.ALL;

  7. -- Uncomment the following library declaration if instantiating
  8. -- any Xilinx primitives in this code.
  9. --library UNISIM;
  10. --use UNISIM.VComponents.all;

  11. entity module_74193 is
  12.         port(
  13.                         A:in std_logic_vector(3 downto 0);
  14.                         LDN,UP,DN,CLR:in std_logic;
  15.                         BON,CON:out std_logic;
  16.                         Q:out std_logic_vector(3 downto 0)
  17.                  );
  18. end module_74193;

  19. architecture Behavioral of module_74193 is
  20.         signal Qt:std_logic_vector(3 downto 0);
  21. begin
  22.        
  23.         process(UP,DN,CLR,LDN)
  24.         begin
  25.         if(CLR = '1')then
  26.                 Qt<= (others =>'0');
  27.         elsif(LDN = '0')then
  28.                 Qt <= A;
  29.         elsif(UP'event and UP ='1')then
  30.                 if(Qt = "1111")then
  31.                         CON <= '1';
  32.                 end if;
  33.                 Qt <= Qt + 1;
  34.         elsif(DN'event and DN = '1') then
  35.                 if(Qt = "0000")then
  36.                         BON <= '1';
  37.                 end if;
  38.                 Qt <= Qt - 1;
  39.         end if;
  40.         end process;
  41.         Q <= Qt;


  42. end Behavioral;


复制代码


综合报错:
Xst:827 - "D:/Project/Xilinx Project/My_Own/cpu_for_exercise/cpu_cisc/module_74193.vhd" line 46: Signal Qt cannot be synthesized, bad synchronous description. The description style you are using to describe a synchronous element (register, memory, etc.) is not supported in the current software release.
求助高手指点!!
发表于 2012-10-11 10:11:36 | 显示全部楼层
一个process里用两个clk_event?补习下VHDL吧。写代码的时候多想想对应的硬件结构
 楼主| 发表于 2012-10-13 11:46:51 | 显示全部楼层
回复 2# falloutmx
已经修改为两个进程,但是如何确定什么时候选用正确的计数值怎么设计啊?



  1.         process(up,clr,ldn,Qt,A)
  2.         begin
  3.                 if(clr = '1')then
  4.                         Qu <= (others => '0');
  5.                 elsif(ldn = '0')then
  6.                         Qu <= A;
  7.                 elsif(up'event and up = '1')then
  8.                         if(Qt = "1111")then
  9.                                 con <= '1';
  10.                         end if;
  11.                         Qu <= Qt + 1;
  12.                 end if;
  13.         end process;
  14.        
  15.         process(dn,clr,ldn,Qt,A)
  16.         begin
  17.                 if(clr = '1')then
  18.                         Qd <= (others =>'0');
  19.                 elsif(ldn = '0')then
  20.                         Qd <= A;
  21.                 elsif(dn'event and dn = '1')then
  22.                         if(Qt = "0000")then
  23.                                 bon <= '0';
  24.                         end if;
  25.                         Qd <= Qt - 1;
  26.                 end if;
  27.         end process;


复制代码
求指点
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-2-2 14:27 , Processed in 0.020921 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表