sure, you _can_ do it. Even algorithmically:
Code:
for (ii in cnt'length/4-1 downto 1) loop
if (cnt(4*(ii)-1 downto 4*(ii-1))="1001") then -- "if the immediately lower nibble is 9"
if(cnt(4*(ii+1)-1 downto 4*(ii))="1001") then -- "if this nibble is 9"
cnt(4*(ii+1)-1 downto 4*ii) <= "0000"; -- "advance to 0"
else
cnt(4*(ii+1)-1 downto 4*ii) <= cnt(4*(ii+1)-1 downto 4*ii) + 1; -- "increment this nibble"
end if;
end if;
end loop;
if cnt(3 downto 0) = "1001" then -- if the lsn = 9
cnt(3 downto 0) <= "0000"; -- advance to 0
else
cnt(3 downto 0) <=cnt(3 downto 0) + 1; -- increment
end if;
and there really are better ways than that. the above will work for a counter with 2+ decimal digits. (again, I assume that SLU is used, or cnt is signed/unsigned). SLV's are like VHDL's void* types -- you can make a long SLV and put other signals inside. This is seen mostly when coding standards don't allow for array or record types.