qq_41030699 2017-11-26 03:02 采纳率: 0%
浏览 930

vhdl用74163设计19进制加法器 功能和时序仿真出现问题 求大神教

检查没错误,但是功能仿真有结果,时序仿真没有结果
求大神教

代码如下:
library ieee;
use ieee.std_logic_1164.all;
entity Sell is
port ( clk,rst:in std_logic;--clk
A,B: in std_logic;
Y,Z:out std_logic);
end Sell;

architecture struct of Sell is
type state is (S0,S1,S2,S3);
signal S:state;
signal M:std_logic_vector(1 downto 0);
begin
M<=A&B;
process (clk,rst,M)
begin
if rst='1' then
S<=S0;

    elsif (clk'event and clk='1') then 
      case S is 
        when S0 =>
            if (M="01") then
            S<=S1;
            Y<='0';Z<='0';
            elsif (M="10") then
            S<=S2;
            Y<='0';Z<='0';
            else 
            S<=S;
            Y<='0';Z<='0';
            end if;
        when S1 =>
            if (M="01") then 
            S<=S2;
            Y<='0';Z<='0';
            elsif (M="10") then
            S<=S0;
            Y<='1';Z<='0';
            else 
            S<=S;
            end if;
        when S2 => 
            if (M="01") then 
            S<=S0;
            Y<='1';Z<='0';
            elsif (M="10") then
            S<=S0;
            Y<='1';Z<='1';
            else 
            S<=S;
            end if;
        when others => 
            S<=S0;
        end case;
    end if;
end process;

end struct;

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-11-26 04:14
    关注
    评论

报告相同问题?

悬赏问题

  • ¥20 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏