[an error occurred while processing this directive]
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity tb is
generic (
InpFileName_g : string := "../Tkxstrm/zzz.bin"
);
end entity tb;
architecture tb_arch of tb is
type file_t is file of character;
file ff_f : file_t;
signal INP1_REFCLK : std_logic; -- clock
signal Q_U31 : std_logic_vector(7 downto 0); --output
begin
INP1_REFCLK <= not INP1_REFCLK after 5 ns;
rdfl_p: process is
variable fl_opn_sts_v : file_open_status;
variable streambyte : character;
begin
...
file_open(fl_opn_sts_v, ff_f, InpFileName_g, read_mode);
assert fl_opn_sts_v = open_ok
report file_open_status'IMAGE(fl_opn_sts_v)
severity error;
...
while not endfile(ff_f) loop
wait until rising_edge(INP1_REFCLK);
...
read(ff_f, streambyte);
Q_U31 <= std_logic_vector(TO_UNSIGNED((character'POS(streambyte)), 8))
...
end loop;
...
file_close(ff_f);
...
end process rdfl_p;
...
E-mail: info@telesys.ru