You are on page 1of 11

ECE 462 MIPS Project SPRING 2020

32-bit Adder
The object of this project to implement 32-bit adder in FPGA and simulate

1- Implementation

1.1 New Project

1.2 RTL Project

`
ECE 462 MIPS Project SPRING 2020

1.3 Choose Device

`
ECE 462 MIPS Project SPRING 2020

1.4 Port definition

1.5 Adder code

library IEEE;
use IEEE.std_logic_1164.all;
Ctrl+ C
use IEEE.std_logic_arith.all;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity adder_32 is
port (
x,y: in std_logic_vector(31 downto 0);
z: out std_logic_vector(31 downto 0)
);
end entity;

architecture beh of adder_32 is


begin
z <= x+y;
end beh;

`
ECE 462 MIPS Project SPRING 2020

CTRL+V

1.6 SYNTHESIS

`
ECE 462 MIPS Project SPRING 2020

`
ECE 462 MIPS Project SPRING 2020

1.7 RTL ANALYSIS

1.8 Adder Implementation in FPGA

`
ECE 462 MIPS Project SPRING 2020

1.9 Project summary

1.10 POWER

2. Simulation

`
ECE 462 MIPS Project SPRING 2020

2.1 Add Simulation to project

`
ECE 462 MIPS Project SPRING 2020

2.2 Simulation Code

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.Numeric_STD.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity adder_32_tb is
end;
architecture bench of adder_32_tb is
component adder_32 is
port (x,y: in std_logic_vector(31 downto 0);
z: out std_logic_vector(31 downto 0)
);
end component;
signal x : STD_LOGIC_vector(31 downto 0);
signal y : STD_LOGIC_vector(31 downto 0);
signal z : STD_LOGIC_vector(31 downto 0);
begin
uut: adder_32 port map( x => x, y => y, z => z);
stimulus : process
begin
x <= "00000000000000000000000000000000";
y <= "00000000000000000000000000000000";
wait for 10 ns;
x <= "00000000000000000000000011111111";
y <= "00000000000000000000000000000000";
wait for 10 ns;
x <= "00000000000000000000000011101001";
y <= "00000000000000000000000010111011";
wait for 10 ns;
x <= "00000000000000000000000011111110";
y <= "00000000000000000000000011011101";
wait;
end process;
end;

`
ECE 462 MIPS Project SPRING 2020

2.3 Run Simulation

`
ECE 462 MIPS Project SPRING 2020

code Submission due


Adder.vhd 15-4-2020
Alu.vhd
alu_control.vhd
Control.vhd
instruction_memory.vhd 6-5-2020
Instructions.txt
Main.vhd
memory.vhd 22-4-2020
mux,vhd
pc.vhd
registers.vhd 29-4-2020
Shifter.vhd
sign_extend.vhd

You might also like