diff --git a/ReceptionTrame_lib/receptionTrame_com.vhd b/ReceptionTrame_lib/receptionTrame_com.vhd index b5ebd44..3e5b3e5 100644 --- a/ReceptionTrame_lib/receptionTrame_com.vhd +++ b/ReceptionTrame_lib/receptionTrame_com.vhd @@ -309,6 +309,9 @@ BEGIN if(LinSynchro = '0') then n_SELECT <= '1'; n_LOAD <= '1'; + else + nbData_EN <= '0'; + nbData_LOAD <= '0'; end if; WHEN dataFieldStart => @@ -321,6 +324,38 @@ BEGIN n_LOAD <= '0'; n_EN <= '1'; end if; + + WHEN dataFieldData => + 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'; + n_EN <= '1'; + end if; + + WHEN dataFieldStop => + if(n_0 = '1') then + if(LinSynchro = '1') then + nbData_EN <= '1'; + else + -- ERROR data stop + end if; + else + n_LOAD <= '0'; + n_EN <= '1'; + end if; WHEN others => diff --git a/ReceptionTrame_lib/receptionTrame_tb.vhd b/ReceptionTrame_lib/receptionTrame_tb.vhd index 91380c8..260ad99 100644 --- a/ReceptionTrame_lib/receptionTrame_tb.vhd +++ b/ReceptionTrame_lib/receptionTrame_tb.vhd @@ -185,18 +185,18 @@ BEGIN -- data fields (both 0x00) Lin <= '0'; - WAIT FOR 8 * CLOCK_PERIOD; + WAIT FOR 9 * CLOCK_PERIOD; Lin <= '1'; WAIT FOR CLOCK_PERIOD; Lin <= '0'; - WAIT FOR 8 * CLOCK_PERIOD; + WAIT FOR 9 * CLOCK_PERIOD; Lin <= '1'; WAIT FOR CLOCK_PERIOD; -- checksum (0x0) Lin <= '0'; - WAIT FOR 8 * CLOCK_PERIOD; + WAIT FOR 9 * CLOCK_PERIOD; Lin <= '1'; WAIT FOR CLOCK_PERIOD;