blob: 02b275dbf57d10e2f9ce637a3e7450bd498aa2f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
library ieee;
use ieee.std_logic_1164.all;
entity foo is
end entity;
architecture fum of foo is
constant A: std_logic_vector (7 downto 0) := X"04";
function slv_image(inp: std_logic_vector) return string is
variable image_str: string (1 to inp'length);
alias input_str: std_logic_vector (1 to inp'length) is inp;
begin
for i in input_str'range loop
image_str(i) := character'VALUE(std_ulogic'IMAGE(input_str(i)));
end loop;
return image_str;
end;
begin
SOME_LABEL:
process
begin
wait for 1 ns;
if A <= "00001011" then -- if A <= std_logic_vector'("00001011") then
report "A = " & slv_image(A) ;
end if;
wait;
end process;
end architecture;
|