Where to begin?
I'm not exactly sure what your goals are here, but is sounds as if you want to initialize part of an array of ASCII characters. It looks like you want a 1Dx1D array, not a 2D array. You may want to try something along these lines:
Code:
TYPE Chars IS ARRAY (0 TO 9) OF STD_LOGIC_VECTOR(0 TO 7);
SIGNAL x: Chars;
x(0) <= CONV_STD_LOGIC_VECTOR(character'pos('P'),8);
This creates an array of ten ascii codes, which you can initialize individually with a character to ASCII conversion.
Beware of passing around nonstandard dataypes, such as character, in your vhdl code, you can simulate the code, but you will not be able to implement it. Using a conversion to standard logic is alright because it takes place at compile time, not during implemenation.
Of course there are several other ways of accomplishing the same feat.
If you are really looking for a 2D array then try this code:
Code:
TYPE Chars IS ARRAY (0 TO 9, 9 DOWNTO 0) OF STD_LOGIC_VECTOR(0 TO 7);
SIGNAL x: Chars;
x(0,0) <= CONV_STD_LOGIC_VECTOR(character'pos('P'),8);
This forms a 10x10 array of 1 Byte for your ASCII codes, enough for one hundred characters to be stored as ASCII.
Both these examples compile fine and can be implemented.