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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 1660|回复: 1

[求助] ISE综合出来的RTL电路图有点疑惑,是不是自己那里弄错了?

[复制链接]
发表于 2020-11-30 23:36:41 | 显示全部楼层 |阅读模式

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

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

x
自己在ISE(14.7)里写了个计数器的代码,综合之后查看的RTL图如下(项目用的CPLD实现):

image.png

自己搞不懂是哪里除了问题,想请各位大佬看一下?
代码如下:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library UNISIM;
use UNISIM.VComponents.all;

entity cnt8bc is
    port (
        txclk:      in      std_logic;
        grst:       in      std_logic;
        enable:     in      std_logic;
        load:       in      std_logic;
        oe:         in      std_logic; --output enable
        up_down:    in      std_logic; --up and down counter control
        cnt_inout:  inout   std_logic_vector(7 downto 0)--inout req'd
        );
end cnt8bc;

architecture archcnt8b of cnt8bc is
    signal cnt      : std_logic_vector (7 downto 0) := "00000000"; --cnt signal
    signal cnt_in   : std_logic_vector (7 downto 0) := "00000000"; --cnt_in signal
begin
    count: process (grst, txclk)
    begin
        if grst = '1' then--asynchronous reset
            cnt <= "00111010";
        elsif (txclk'event and txclk = '1') then
            if load = '1' then --synchronous data loaded
                cnt <= cnt_in;--from cnt_out port
            else
                if enable = '1' then --synchronous count enable
                    if up_down = '1' then
                        cnt <= cnt + 1;
                    elsif up_down = '0' then
                        cnt <= cnt -1;
                    end if;
                end if;
            end if;
        end if;
    end process count;

    oes_out: process (oe, cnt)--three-state buffers
    begin
        if oe = '0' then
            cnt_inout <= (others => 'Z');
        else
            cnt_inout <= cnt;
        end if;
    end process oes_out;

    oes_in: process (oe, cnt_inout)--three-state buffers
    begin
        if oe = '1' then
            cnt_in <= (others => 'Z');
        else
            cnt_in <= cnt_inout;
        end if;
    end process oes_in;
end archcnt8b;

发表于 2020-12-1 04:43:10 | 显示全部楼层
      if oe = '1' then
            cnt_in <= (others => 'Z');

cnt_in不要使用high-z。一般bi-direction,板子上会有PULL-UP/down.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-20 04:43 , Processed in 0.019500 second(s), 8 queries , Gzip On, Redis On.

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