Académique Documents
Professionnel Documents
Culture Documents
IN
VLSI DESIGN
26th 30th December 2011
Getting Started with Xilinx software and writing a VHDL code for Full adder
checking its syntax, simulation and viewing RTL Schematic
Close the previous project if anything is open earlier
Page 2
Page 3
Page 4
Page 5
Page 6
The parameters (Family, Device, package and speed) are to be set here depending on the
parameters of the FPGA kit to which you want to burn the program. If you dont want to
burn any FPGA kit you can leave it as it is.
Page 7
Page 8
Page 9
Press next
Page 10
Press next
Page 11
Page 12
Check here about the pins you added are correct or not else back it and reassign the pins
Page 13
Page 14
Page 15
Page 16
Page 17
After clicking finish button in the last step one fa.vhd file will be created. Open the
fa.vhd tab
Page 18
Page 19
Page 20
Page 21
Page 22
The syntax was checked successfully, if it fails then check for syntax
Page 23
Page 24
Page 25
Double click inside the module (green box) to see what are there inside it. Double click
outside the box to come to upper level
Page 26
Page 27
Page 28
Page 29
Page 30
Page 31
Page 32
Page 33
Page 34
Page 35
Page 36
Page 37
Page 38
Page 39
Page 40
Click on the plus sign near fatest inside the red circle
Page 41
Page 42
Page 43
Page 44
Page 45
Page 46
Page 47
Page 48
Give the name of the Implementation Constraint File. This will come in the .ucf format
Page 49
Finish it.
Page 50
Page 51
You should confirm that the .ucf file is coming under the .vhd file. If it has not come just
refresh it by pressing F5 key. Otherwise add the .ucf file once again.
Page 52
Page 53
Page 54
Page 55
Page 56
The program written above indicates that the port a is mapped to P71 location of the kit.
(p71 location of the kit means the address of one input switch. This address you can get
from the manual given with the kit.) similarly the other ports are linked to the other
location of the kit.
Page 57
Right click on the top module & changes its property to the property of the kit
Page 58
Page 59
Click on the .vhd file. Then double click on the implementation Design
Page 60
Page 61
Page 62
Page 63
Page 64
Finish it.
Page 65
Page 66
Page 67
Cancel it
Page 68
Page 69
Page 70
Press ok
Page 71
Programming is going on
Page 72
Page 73
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity counter is
port(C, CLR : in std_logic;
Q : out std_logic_vector(3 downto 0));
end counter;
architecture Behavioral of counter is
signal tmp: std_logic_vector(3 downto 0);
begin
process (C, CLR)
begin
if (CLR='1') then
tmp <= "0000";
elsif (C'event and C='1') then
tmp <= tmp + 1;
end if;
end process;
Q <= tmp;
end Behavioral;
2. Vhdl Code For Prbs
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
--library UNISIM;
--use UNISIM.VComponents.all;
entity prbs is
Port ( CLK : in std_logic;
RSTn : in std_logic;
data_out : out std_logic_vector(15 downto 0));
end prbs;
architecture Behavioral of prbs is
component dff
Port ( CLK : in std_logic;
RSTn : in std_logic;
Page 74
Page 75
Page 76
Page 77