trashernet/bench/bench_pkg.vhd

24 lines
606 B
VHDL
Raw Normal View History

2021-08-30 12:14:58 +02:00
library ieee;
use ieee.std_logic_1164.all;
library trashernet;
use trashernet.trashernet_types.all;
package bench_pkg is
procedure send_data(signal rx_p : inout std_logic; constant data : in byte_vector);
end package bench_pkg;
package body bench_pkg is
procedure send_data(signal rx_p : inout std_logic; constant data : in byte_vector) is
begin
for i in data'low to data'high loop
for j in data(i)'low to data(i)'high loop
rx_p <= not data(i)(j);
wait for 50 ns;
rx_p <= data(i)(j);
wait for 50 ns;
end loop;
end loop;
end procedure send_data;
end package body bench_pkg;