data field

This commit is contained in:
leo 2023-09-26 11:14:59 +02:00
parent 886949296a
commit fd5bd6662e
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB
2 changed files with 38 additions and 3 deletions

View File

@ -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 =>

View File

@ -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;