Академический Документы
Профессиональный Документы
Культура Документы
Faculty of Engineering
Electrical department
2nd year - 2014
VHDL Report
VHDL Project
Serial Data Receiver
Prepared By:
Mohamed Khaled Aly
Mohamed Said
Mohamed Salah Bassuny
Mahmoud Gaber
Marwan Salem
April, 2014
203
207
209
220
225
VHDL Project
Steps of Design:
Our aim is to receive a serial data input from the transmitter and
put it in a frame of 10 timeslots .
the first time slot is the start bit , the data input will be transmitted
to the receiver when start = '1' , otherwise it will stop receiving
bits.
the ninth bit is the parity checking bit , which = '1' when number of
ones in the data out is odd , if the parity checked from the receiver
don't match the parity supposed from the transmitter it will cause
an error called parity_err .
the tenth bit is the stop bit , when stop = '0' , error = '1'.
if there is no error , then data_valid = '1
1|Page
VHDL Project
entity sdr is
Port ( din,start,stop,clk: in STD_LOGIC;
data_valid: out STD_LOGIC);
end sdr ;
architecture Behavioral of sdr is
signal p : std_logic_vector (5 downto 0) ;
signal dout: std_logic_vector (6 downto 0) := "0000000" ;
--Initializing
--Data shifting
dout(6)<= din ;
end if ;
end if;
end process;
2|Page
VHDL Project
--Error checking
--Parity checking
end Behavioral;
3|Page
VHDL Project
Schematics
Top-level Block
4|Page
VHDL Project
Simulation
5|Page
VHDL Project
entity basic is
Port ( data_in : in STD_LOGIC;
data_out : out STD_LOGIC_VECTOR (6 downto 0);
err : out STD_LOGIC;
clk : in STD_LOGIC;
data_valid : out STD_LOGIC);
end basic;
6|Page
VHDL Project
begin
process(clk)
begin
if(clk='1' and clk'event) then
if ( counter=0 and data_in = '1') then
counter <= counter+1;
elsif(temp(8)=(temp(7) xor temp(6) xor temp(5) xor temp(4) xor temp(3) xor
temp(2) xor temp(1)) and temp(9)='1') then
data_out <= temp ( 7 downto 1 );
counter <=0 ;
data_valid <='1';
err <='0';
else
counter <=0;
data_valid <='0';
err <='1';
end if;
end if;
end process;
end Behavioral;
7|Page
VHDL Project
Schematic
8|Page
VHDL Project
Simulation
9|Page