Gabrigob - very outdated views indeed. I suppose you only use std_logic(_vector) for ports too?
Synthesisors are pretty good at doing stuff now. I even messed around with it a couple of months ago and used the character type as an array indexes fior a mux:
type silly_array_t is array ('A' to 'G') of integer;
signal mux : silly_array_t;
...
entity silly is
port (
char : in character range 'A' to 'G';
);
architecture....
output <= input(char);
And it built me a mux fine (just dont try and map a character to a pin).
At Korch - thats a lot of code for anyone else to look at. Why not minismise the code to something specific where you're having the error.