id field data
This commit is contained in:
parent
7e5d636cd0
commit
483aac6162
@ -30,7 +30,7 @@ ENTITY receptionTrame_com IS
|
|||||||
END receptionTrame_com;
|
END receptionTrame_com;
|
||||||
|
|
||||||
ARCHITECTURE arch of receptionTrame_com IS
|
ARCHITECTURE arch of receptionTrame_com IS
|
||||||
TYPE state IS (waiting, syncBreak0, syncBreak1, syncFieldWait, syncFieldStart, syncFieldData, syncFieldStop, idFieldWait);
|
TYPE state IS (waiting, syncBreak0, syncBreak1, syncFieldWait, syncFieldStart, syncFieldData, syncFieldStop, idFieldWait, idFieldStart, idFieldData, idFieldStop);
|
||||||
SIGNAL cState, nState : state;
|
SIGNAL cState, nState : state;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
@ -97,6 +97,34 @@ CASE cState IS
|
|||||||
nState <= waiting;
|
nState <= waiting;
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldWait =>
|
||||||
|
if(LinSynchro = '0') then
|
||||||
|
nState <= idFieldStart;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldStart =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
if(LinSynchro = '0') then
|
||||||
|
nState <= idFieldData;
|
||||||
|
else
|
||||||
|
nState <= waiting;
|
||||||
|
end if;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldData =>
|
||||||
|
if(nbBit_0 = '1') then
|
||||||
|
nState <= idFieldStop;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldStop =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
if(LinSYnchro = '1') then
|
||||||
|
nState <= waiting; -- data frame
|
||||||
|
else
|
||||||
|
nState <= waiting;
|
||||||
|
end if;
|
||||||
|
end if;
|
||||||
|
|
||||||
WHEN others =>
|
WHEN others =>
|
||||||
end CASE;
|
end CASE;
|
||||||
@ -112,6 +140,7 @@ BEGIN
|
|||||||
nbBit_LOAD <= '1';
|
nbBit_LOAD <= '1';
|
||||||
nbBit_SELECT <= '0';
|
nbBit_SELECT <= '0';
|
||||||
end IF;
|
end IF;
|
||||||
|
|
||||||
WHEN syncBreak0 =>
|
WHEN syncBreak0 =>
|
||||||
if(LinSynchro = '1') then
|
if(LinSynchro = '1') then
|
||||||
if(nbBit_0 = '1') then
|
if(nbBit_0 = '1') then
|
||||||
@ -132,6 +161,7 @@ BEGIN
|
|||||||
n_EN <= '1';
|
n_EN <= '1';
|
||||||
nbBit_LOAD <= '0';
|
nbBit_LOAD <= '0';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
WHEN syncBreak1 =>
|
WHEN syncBreak1 =>
|
||||||
if(n_0 = '1') then
|
if(n_0 = '1') then
|
||||||
if(LinSynchro = '0') then
|
if(LinSynchro = '0') then
|
||||||
@ -141,11 +171,13 @@ BEGIN
|
|||||||
n_LOAD <= '0';
|
n_LOAD <= '0';
|
||||||
n_EN <= '1';
|
n_EN <= '1';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
WHEN syncFieldWait =>
|
WHEN syncFieldWait =>
|
||||||
if(LinSynchro = '0') then
|
if(LinSynchro = '0') then
|
||||||
n_LOAD <= '1';
|
n_LOAD <= '1';
|
||||||
n_SELECT <= '1';
|
n_SELECT <= '1';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
WHEN syncFieldStart =>
|
WHEN syncFieldStart =>
|
||||||
if(n_0 = '1') then
|
if(n_0 = '1') then
|
||||||
if(LinSynchro = '0') then
|
if(LinSynchro = '0') then
|
||||||
@ -160,6 +192,7 @@ BEGIN
|
|||||||
n_LOAD <= '0';
|
n_LOAD <= '0';
|
||||||
n_EN <= '1';
|
n_EN <= '1';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
WHEN syncFieldData =>
|
WHEN syncFieldData =>
|
||||||
if(nbBit_0 = '1') then
|
if(nbBit_0 = '1') then
|
||||||
n_SELECT <= '0';
|
n_SELECT <= '0';
|
||||||
@ -178,6 +211,56 @@ BEGIN
|
|||||||
end if;
|
end if;
|
||||||
nbBit_LOAD <= '0';
|
nbBit_LOAD <= '0';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
WHEN syncFieldStop =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
if(LinSynchro = '1') then
|
||||||
|
|
||||||
|
else
|
||||||
|
-- ERROR sync stop
|
||||||
|
end if;
|
||||||
|
else
|
||||||
|
n_LOAD <= '0';
|
||||||
|
n_EN <= '1';
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldWait =>
|
||||||
|
if(LinSynchro = '0') then
|
||||||
|
n_SELECT <= '1';
|
||||||
|
n_LOAD <= '1';
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldStart =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
n_SELECT <= '0';
|
||||||
|
n_LOAD <= '1';
|
||||||
|
nbBit_SELECT <= '1';
|
||||||
|
nbBit_LOAD <= '1';
|
||||||
|
else
|
||||||
|
n_LOAD <= '0';
|
||||||
|
n_EN <= '1';
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldData =>
|
||||||
|
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 others =>
|
WHEN others =>
|
||||||
|
|
||||||
end CASE;
|
end CASE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user