From 0ba40d10cad82aeb6f829699fafb7f7bc6359541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sun, 19 Feb 2023 20:30:31 +0100 Subject: [PATCH] feat: add frame_state to transport package --- src/transport/transport_pkg.vhd | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/transport/transport_pkg.vhd b/src/transport/transport_pkg.vhd index 0d9d354..048b09a 100644 --- a/src/transport/transport_pkg.vhd +++ b/src/transport/transport_pkg.vhd @@ -11,8 +11,25 @@ package transport_pkg is ctrl_bits : std_logic_vector; end record sample; + type frame_state is record -- An errors passed from data_link to transport + user_data : std_logic; -- All characters are user_data + invalid_characters : std_logic; -- Any of the charachers should not be + -- there (ie. there is a control) + not_enough_data : std_logic; -- There is not enough data in the + -- buffer, data will be sent on next + -- frame clock + ring_buffer_overflow : std_logic; -- Buffer storing characters has overflowed, + -- meaning frame clock is too slow + disparity_error : std_logic; -- Any character had disparity error + not_in_table_error : std_logic; -- Any character not in table + wrong_alignment : std_logic; -- Alignment character was detected to + -- be on wrong position, possible misalignment + last_frame_repeated : std_logic; -- Whether last frame was repeated + -- instead of new frame + end record frame_state; + -- Array of frame characters (characters in one frame) - type frame_character_array is array (natural range <>) of frame_character; + type lane_character_array is array (natural range <>) of std_logic_vector; -- Array of samples in one frame by converter and by sample (used with oversampling) type samples_array is array (natural range <>, natural range <>) of sample; -- 2.48.1