data field start
This commit is contained in:
parent
483aac6162
commit
886949296a
@ -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, idFieldStart, idFieldData, idFieldStop);
|
TYPE state IS (waiting, syncBreak0, syncBreak1, syncFieldWait, syncFieldStart, syncFieldData, syncFieldStop, idFieldWait, idFieldStart, idFieldData, idFieldStop, dataFieldWait, dataFieldStart, dataFieldData, dataFieldStop);
|
||||||
SIGNAL cState, nState : state;
|
SIGNAL cState, nState : state;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
@ -120,7 +120,39 @@ CASE cState IS
|
|||||||
WHEN idFieldStop =>
|
WHEN idFieldStop =>
|
||||||
if(n_0 = '1') then
|
if(n_0 = '1') then
|
||||||
if(LinSYnchro = '1') then
|
if(LinSYnchro = '1') then
|
||||||
nState <= waiting; -- data frame
|
nState <= dataFieldWait;
|
||||||
|
else
|
||||||
|
nState <= waiting;
|
||||||
|
end if;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN dataFieldWait =>
|
||||||
|
if(LinSynchro = '0') then
|
||||||
|
nState <= dataFieldStart;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN dataFieldStart =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
if(LinSynchro = '0') then
|
||||||
|
nState <= dataFieldData;
|
||||||
|
else
|
||||||
|
nState <= waiting;
|
||||||
|
end if;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN dataFieldData =>
|
||||||
|
if(nbBit_0 = '1') then
|
||||||
|
nState <= dataFieldStop;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN dataFieldStop =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
if(LinSynchro = '1') then
|
||||||
|
if(nbData_0 = '1') then
|
||||||
|
nState <= waiting;
|
||||||
|
else
|
||||||
|
nState <= dataFieldWait;
|
||||||
|
end if;
|
||||||
else
|
else
|
||||||
nState <= waiting;
|
nState <= waiting;
|
||||||
end if;
|
end if;
|
||||||
@ -261,6 +293,35 @@ BEGIN
|
|||||||
n_EN <= '1';
|
n_EN <= '1';
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
WHEN idFieldStop =>
|
||||||
|
if(n_0 = '1') then
|
||||||
|
if(LinSynchro = '1') then
|
||||||
|
nbData_LOAD <= '1';
|
||||||
|
else
|
||||||
|
-- ERROR id stop
|
||||||
|
end if;
|
||||||
|
else
|
||||||
|
n_LOAD <= '0';
|
||||||
|
n_EN <= '1';
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN dataFieldWait =>
|
||||||
|
if(LinSynchro = '0') then
|
||||||
|
n_SELECT <= '1';
|
||||||
|
n_LOAD <= '1';
|
||||||
|
end if;
|
||||||
|
|
||||||
|
WHEN dataFieldStart =>
|
||||||
|
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 others =>
|
WHEN others =>
|
||||||
|
|
||||||
end CASE;
|
end CASE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user