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 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)