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
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料