-- types
library ieee;
context ieee.ieee_std_context;
package types is
alias logic is std_ulogic;
subtype unsigned_byte is unsigned(7 downto 0);
end package types;
-- testbench
library ieee;
context ieee.ieee_std_context;
use std.textio.all;
use std.env.all;
use work.types.all;
entity tb is end entity tb;
architecture bug of tb is
signal rst, clk : logic;
signal cnt : unsigned_byte := (others => '0');
begin
reset: rst <= '1', '0' after 20 ns;
clock: process
begin
clk <= '0';
wait for 10 ns;
clk <= '1';
wait for 10 ns;
end process clock;
counter: process (clk) is
begin
if rst then
cnt <= (others => '0');
elsif rising_edge(clk) then
cnt <= cnt + 1;
end if;
end process;
write_log: postponed process (clk) is
alias s is to_string [logic return string];
alias s is to_string [unsigned_byte return string];
alias h is to_hex_string [unsigned_byte return string];
variable log_line : line;
begin
swrite(log_line,
"time: " & time'image(now) &
", rst: " & s(rst) & ", clk: " & s(clk) &
", cnt: " & h(cnt) & " = " & s(cnt));
writeline(output, log_line);
end process write_log;
fin: process begin
wait for 256*20 ns; finish;
end process fin;
end architecture bug;
Hi,
I get this crash report when analysing (with
nvc --std=2008 -a
) the code given further below:Here is the code:
BR, Stanislav