Why can't I increment this `std_logic_vector`

后端 未结 6 1993
萌比男神i
萌比男神i 2020-12-16 15:26

What\'s going on here? Why am I getting an \'operator argument type mismatch\', and what can I do to fix it?

--
-- 32-bit counter with enable and async reset         


        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 16:06

    In a nutshell, STD_LOGIC_VECTOR is just that, a vector of bits. It means nothing by itself so you cannot expect vhdl to semantically assume that an increment operation will work on it. The other posts here about converting it to an unsigned should do the trick.

提交回复
热议问题