VHDL错误:中缀表达式中的类型不明确; reg_buff或data_buff

时间:2018-12-18 12:55:21

标签: type-conversion vhdl modelsim

在进行类型转换时,我在ModelSim中遇到以下错误

  

中缀表达式中的歧义类型; reg_buff或data_buff。

     

错误:(vcom-1583)非法类型从'未知'转换为   “ ieee.NUMERIC_STD.UNSIGNED”(操作数类型未知)。

--declaration of types:                 
type packet_ipg_array is 
    array (1 downto 0) of integer;

type packet_buffer_array is 
    array (1 downto 0, packet_buffer_size-1 downto 0) of std_logic_vector(8 downto 0);

variable packet_ipg     : packet_ipg_array; 
variable packet_buffers : packet_buffer_array; 

--conversion:
packet_ipg(i) := 
    to_integer(unsigned(
          packet_buffers(i,packet_buffer_bytes_sent(i))(7 downto 0) 
        & packet_buffers(i,packet_buffer_bytes_sent(i)+1)(7 downto 0)  
        & packet_buffers(i,packet_buffer_bytes_sent(i)+2)(7 downto 0)  
        & packet_buffers(i,packet_buffer_bytes_sent(i)+3)(7 downto 0)
    ));

有人可以帮我吗?

0 个答案:

没有答案