[VHDL]

一个数组赋值给另外一个数组

[复制链接]
590|2
手机看帖
扫描二维码
随时随地手机跟帖
仪器设备|  楼主 | 2020-7-23 08:33 | 显示全部楼层 |阅读模式
亲,VHDL ,  我定义了2个数组, 现在将数组B赋值给数组A,   
TYPE DATA_SS IS ARRAY(0 TO 79) OF std_logic_vector(11 downto 0);
signal temp_data : DATA_SS;
TYPE DATA_SSS IS ARRAY(0 TO 9) OF std_logic_vector(11 downto 0);
signal ch1_s : DATA_SSS;

  temp_data( 0 to  9) <= ch1_s(0 to 9);



编译时出错,Error (10381): VHDL Type Mismatch error at AA.vhd(329): indexed name returns a value whose type does not match "DATA_SS", the type of the target expression
有好的赋值方法吗? 单独一个一个的赋值是没有问题的,但太麻烦

使用特权

评论回复

相关帖子

正点原子FPGA| | 2020-7-23 09:09 | 显示全部楼层
帮顶

使用特权

评论回复
ucx| | 2020-8-1 09:53 | 显示全部楼层
        type Anx12B                is array(natural range <>) of std_logic_vector(11 downto 0);
        subtype DATA_SS                is Anx12B(0 to 79);
        subtype DATA_SSS                is  Anx12B(0 to 9);
这个就不用解释了吧?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

11

主题

65

帖子

0

粉丝