找回密码
 注册
搜索
查看: 667|回复: 0

[讨论] VHDL新手问题

[复制链接]
发表于 2006-10-2 11:12:00 | 显示全部楼层 |阅读模式
请问各位,怎样用VHDL描述一个可变输入数目(用generic)的multiplexer?
我写不出architecture

library        ieee;
use        ieee.std_logic_1164.all;
package mytype is
        type vector_array is array(natural range<>) of std_logic_vector(7 downto 0);
end package;

library        ieee;
use        ieee.std_logic_1164.all;
use               work.mytype.all;

entity mux501 is
        generic(n: integer:= 2);         
        port(din: in vector_array(0 to 2**n-1);
        sel: in integer range 0 to 2**n-1;
        dout: out std_logic_vector(7 downto 0));
end mux501;

architecture mux501_arch of mux501 is
begin
    --不知道怎么写?
end mux501_arch;

不胜感谢!!!!
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-9-29 14:23 , Processed in 0.045762 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表