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
|
2021-08-30 13:27:03 +02:00
|
|
|
report (" TX Byte: " & to_hstring(data(i)));
|
2021-08-30 12:14:58 +02:00
|
|
|
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;
|
2021-08-30 13:27:03 +02:00
|
|
|
wait for 16 us; -- IPG
|
|
|
|
report "Frame TX complete";
|
2021-08-30 12:14:58 +02:00
|
|
|
end procedure send_data;
|
|
|
|
end package body bench_pkg;
|