Lab 4:
Xilinx Vivado
Version: 2015.4 WebPACK
Last modified: 03-29-2016
In this lab,
you will create a 4-bit adder with carry input and output along with a clock
enable by using the Xilinx CORE Generator and instantiate the Adder
After completing this lab, you will be able to:
· Generate a CORE Generator macro
· Synthesize the VHDL and black-box instantiations through synthesis
· Implement a synthesized design through the Xilinx implementation tools
Use the CORE Generator to create
a 4-bit adder that has the following characteristics:
· Two input data width of 4-bits of unsigned data
· Carry in and out.
· Clock enable
· Asynchronous output data width of 4 bits.
Note: For your reference,
your code should be similar to
library IEEE;
use
IEEE.STD_LOGIC_1164.ALL;
use
IEEE.STD_LOGIC_UNSIGNED.ALL;
entity adder_top is
Port ( a_in : in STD_LOGIC_VECTOR
(3 downto 0);
b_in : in
STD_LOGIC_VECTOR (3 downto 0);
clk : in
STD_LOGIC;
clk_en :
in STD_LOGIC;
carry_in :
in STD_LOGIC;
carry_out
: out STD_LOGIC;
c_out :
out STD_LOGIC_VECTOR (3 downto 0));
end adder_top;
architecture
Behavioral of adder_top is
COMPONENT c_addsub_0
PORT (
A : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
B : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
CLK : IN STD_LOGIC;
C_IN : IN STD_LOGIC;
CE : IN STD_LOGIC;
C_OUT : OUT STD_LOGIC;
S : OUT STD_LOGIC_VECTOR(3 DOWNTO 0)
);
END COMPONENT;
begin
inst_1: c_addsub_0
port map
(
A => a_in,
B => b_in,
CLK => clk,
C_IN => carry_in,
CE => clk_en,
C_OUT => carry_out,
S => c_out
);
end Behavioral;
You learned the basic design flow for taking a VHDL design with IP CORE Generator macros through the design process, which includes the following:
· Understanding the basics for generating a IP CORE Generator macro
· Knowing how to synthesize a design containing IP CORE Generator macros through synthesis.
Implement this design on to your board.