求大神帮我看一下程序

2019-07-16 00:47发布

 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity mux2 is   generic (n:integer:=16);          port (d0:in std_logic_vector(7 downto 0);                         d1: in integer range 0 to n-1;                                  sel:in std_logic;                                  yout: out std_logic_vector(7 downto 0));                                  end mux2;                                  architecture if_march of mux2 is                                   begin                                       process(d0,d1,sel)                                           begin                                              if(sel='1') then                                                  yout<=conv_std_logic_vector(d1,8);                                                 else                                                  yout<=d0;                                                 end if;                                     end process;                                         end if_march;
]Y]C}LUE~QV[W9{UMBNZQ45.jpg 这是教科书上的一个程序,为什么我怎么仿真都得不到这个结果?这是一个二选一的选择器,是程序错误还是我不会仿真,求指导一下。


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。