View
937
Download
0
Category
Preview:
Citation preview
SEGUNDO PARCIAL:DISEÑO DE UN SISTEMA DIGITAL RECEPTOR DE COMUNICACIÓN
SERIAL
1
0110000101110011011000010110111001111010011000010
11
01
01
00
11
00
10
10
11
00
00
10
11
01
11
0
Sistemas Digitales II
EJERCICIO RESUELTOSISTEMAS DIGITALES II
vasanza
2
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
Se dispone de untransmisor Tx y variosreceptores Rx como semuestra en la figura.
El transmisor utiliza un protocolo de comunicacion que esta determinado por lasiguiente trama como se muestra en el ejemplo:
vasanzaSistemas Digitales II
3
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
Se debera disenar el sistema digital de un receptor Rx que sea capaz de leer la tramaenviada por el transmisor y que sepa que la informacion enviada es para ese receptoren particular mediante el ID enviada en la trama.
vasanzaSistemas Digitales II
4
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
De manera general podemos resolver el problema asi:1.- Si Ld ID = 1, genera ID Rx (0X00)2.- Pregunto por start
SI NO
3.- Si start es verdadero, IF SINC=1, BYTE PQ => REG STARTSI
COMP 0X24.- SINC = 1 BYTE PQ – >REG SOST.
COMP 0X ID Rx5.-
6 GENERAR CHK7 CREA PROPIO CHK Y COMPARA
IF =? si => ok
NO
vasanzaSistemas Digitales II
5
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
vasanzaSistemas Digitales II
6
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
vasanzaSistemas Digitales II
7
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
vasanzaSistemas Digitales II
8
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
vasanzaSistemas Digitales II
9
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
Enc, RM, SCH, En, RCH
Start Load
ENIS
0
0
1
1Tb
Mart
Tc
Pnc, Mod, Set
resetn Ta
vasanzaSistemas Digitales II
10
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
vasanzaSistemas Digitales II
11
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
En, Ec, RmEn
1
I 63
Sel 1, Sel 0
Ti
1
0
En RCH
EncontZg
Th
1
0
TdTa
Tk
Sou, ok
vasanzaSistemas Digitales II
12
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
library ieee;use ieee.std_logic_1164.all;use work.elementos.all;
entity receptor isPORT (clock, nReset, Start,: in std_logic;sout, sinc, load, ig, ig3, snrch: in std_logic;enid, en, enc, ok, ru1, modo, ld, sel0, sel1, enrch, sch: out std_logic;
end receptor;
architecture sol of receptor isbegintype estado is:(Ta, Tb, Tc, Td, Te, Tf, Tg, Th, Ti, Tj, Tk);signal y: estado;process (nReset,clock)
beginif (nReset='0') then y<=Ta;elsif (clock'event and clock = '1') then
vasanzaSistemas Digitales II
13
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
case y iswhen y=Ta => if start='1' then y<=Tb;
else if load='0' then y<=Ta;else y<=Ta; end if;
when y=Tb =>when y=Tc => when y=Td => if sinc='0' then y<=Td;
else if ig='0'y<=Td; end if;end if;when y=Te => if sinc='0' then y<=Te;
else if ig='0' then y<=Td;else y<=tf end if;
when y=Tf => if sinc = '0' then y<=Tf;else y<=Tf;end if
when y=Tg => if sinc ='0' then y<=Tg;else y<= th; end if;
when y=Th =>if sinc3='0' then y<=Tj;else y=Ti; end if;
when y=Ti => if ig='0' then y<=Td;else y<=Tk; end if;
vasanzaSistemas Digitales II
14
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
when y=Tj => Th;when y=Tk => Ta;
end case;end if;end process;
process (y, enid, en, enc, eu1, modo, ld, sel0, sel1, enrch, sch,OK)enid='0', en='0', enc='0', eu1='0', modo='0', ld='0', sel0='0', sel1='0', enrch='0', sch='0',OK='0';begin
case y iswhen y=Ta =>
enc='1'; ru1='1' ; sch='1' ; enrch='1' or if start='0' and load='1' then enid='1'; end if;
when y=Tb =>modo='1';when y=Tc =>enc='1'; modo='1' ; sel0='1';when y=Td =>enrch='1' ; sch='1'or if sinc='1' then en='1';end if;
vasanzaSistemas Digitales II
15
01
10
10
10
01
10
01
01
01
10
00
01
01
10
11
10
011000010111001101100001011011100111101001100001
when y=te => sel0='1'or if sinc='1' then en='1'and if ig='1' then enc='1';end if;
when y=Tf =>sel1='1 or if sinc='1' then en='1'; modo='1';end if;
when y=Tg =>when y=Th =>
en='1'; enc='1'; ru1='1' or if ig3='0' then enrch='1'; end if;when y=Ti =>;when y=Tj =>
sel1='1'; sel0='1' or if ig='1' then sout='1'; ok='1'; end ifend case;
end process;end sol;
vasanzaSistemas Digitales II
Recommended