VHDL: How to convert 2D std_logic array element into string?

Status
Not open for further replies.

design_engineer

Newbie level 6
Joined
Oct 23, 2006
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,411
Hello,

I have a 2D array of std_logic elements as below:

type A1 is array(1 downto 0) of std_logic;
type A2 is array(7 downto 0) of A1;
signal A3 : A2 := ((0,1),(1,0),(0,0),(1,1),(0,1),(0,1),(1,0),(1,0));

Now how do I print an element of A3 in an assertion? I tried doing something like this:

assert false report "Element 2 of A3 is" &to_string(A3(2))& "" severity note;

But to_string is not a function in the std libraries in VHDL. Please let me how this can be done. Thanks.
 

Re: VHDL: How to convert 2D std_logic array element into str

Hi,

Maybe the image package (image_pb.vhd), written by Ben Cohen, has a function you can use for this. His website is systemverilog.us, select VHDL Models & Papers.

Devas
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…