Report Statements
In VHDL, the report statement is used to generate text messages during simulation. This statement is useful for providing information about the status or certain values during simulation. The generated report will appear in the transcript to help with debugging.
‘Image Attribute
In VHDL, the 'image
attribute is used to convert a certain data type into a string data type. This attribute is useful when you want to combine or display values of different data types in the form of a string. In a report statement, this attribute is used so that variables/signals can be printed to the transcript, which only accepts strings.
Here is an example of a report statement that also uses the 'image
attribute:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
ENTITY test IS
PORT (
clk : IN STD_LOGIC
);
END test;
ARCHITECTURE Behavioral OF test IS
SIGNAL counter : UNSIGNED(7 DOWNTO 0);
BEGIN
PROCESS
BEGIN
WAIT FOR 50 ps;
LOOP
WAIT UNTIL rising_edge(clk);
REPORT "Counter = " & INTEGER'image(conv_integer(counter));
counter <= counter + 1;
END LOOP;
END PROCESS;
END Behavioral;
Example simulation:
No comments to display
No comments to display