From 7e5d636cd00c9bcd8eeb5e33b540b644e0483ec2 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 26 Sep 2023 10:33:29 +0200 Subject: [PATCH] sync field data --- ReceptionTrame_lib/receptionTrame_com.vhd | 20 ++++++++++++++++++++ ReceptionTrame_lib/receptionTrame_tb.vhd | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ReceptionTrame_lib/receptionTrame_com.vhd b/ReceptionTrame_lib/receptionTrame_com.vhd index c2d5a6b..81a3d83 100644 --- a/ReceptionTrame_lib/receptionTrame_com.vhd +++ b/ReceptionTrame_lib/receptionTrame_com.vhd @@ -7,6 +7,8 @@ ENTITY receptionTrame_com IS H: IN std_logic; nRST: IN std_logic; LinSynchro: IN std_logic; + + octetRecu_EN: OUT std_logic; n_SELECT: OUT std_logic; n_LOAD: OUT std_logic; @@ -158,6 +160,24 @@ BEGIN n_LOAD <= '0'; n_EN <= '1'; end if; + WHEN syncFieldData => + if(nbBit_0 = '1') then + n_SELECT <= '0'; + n_LOAD <= '1'; + octetRecu_EN <= '0'; + else + if(n_0 = '1') then + n_LOAD <= '1'; + n_SELECT <= '0'; + nbBit_EN <= '1'; + octetRecu_EN <= '1'; + else + n_LOAD <= '0'; + nbBit_EN <= '0'; + octetRecu_EN <= '0'; + end if; + nbBit_LOAD <= '0'; + end if; WHEN others => end CASE; diff --git a/ReceptionTrame_lib/receptionTrame_tb.vhd b/ReceptionTrame_lib/receptionTrame_tb.vhd index c226eb3..91380c8 100644 --- a/ReceptionTrame_lib/receptionTrame_tb.vhd +++ b/ReceptionTrame_lib/receptionTrame_tb.vhd @@ -5,7 +5,7 @@ USE ieee.std_logic_arith.all; ENTITY receptionTrame_tb IS GENERIC( CLOCK_PERIOD: time := 52 us; - UC_CLK_PERIOD: time := 40 ns + UC_CLK_PERIOD: time := 43 ns ); END receptionTrame_tb; @@ -74,6 +74,8 @@ COMPONENT receptionTrame_com H: IN std_logic; nRST: IN std_logic; LinSynchro: IN std_logic; + + octetRecu_EN: OUT std_logic; n_SELECT: OUT std_logic; n_LOAD: OUT std_logic; @@ -126,6 +128,8 @@ U1 : receptionTrame_com H => H, nRST => '1', LinSynchro => LinSynchro, + + octetRecu_EN => octetRecu_EN, n_SELECT => n_SELECT, n_LOAD => n_LOAD,