Skip to content
Snippets Groups Projects
Select Git revision
  • 12507e1d5c6a06ac5b5b5ebb87da3ae4ddfd56a4
  • master default
  • Stable
  • superescalar
  • Original
5 results

add_pc.vhd

Blame
  • Forked from Darci Luiz Tomasi Junior / scMIPS
    10 commits ahead of the upstream repository.
    Strozzi's avatar
    Strozzi authored
    73de7bc5
    History
    add_pc.vhd 1.35 KiB
    -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    --  complete implementation of patterson and hennessy single cycle mips processor
    --  copyright (c) 2015  darci luiz tomasi junior
    --
    --  this program is free software: you can redistribute it and/or modify
    --  it under the terms of the gnu general public license as published by
    --  the free software foundation, version 3.
    --
    --  this program is distributed in the hope that it will be useful,
    --  but without any warranty; without even the implied warranty of
    --  merchantability or fitness for a particular purpose.  see the
    --  gnu general public license for more details.
    --
    --  you should have received a copy of the gnu general public license
    --  along with this program.  if not, see <http://www.gnu.org/licenses/>.
    --
    --  engineer: 	darci luiz tomasi junior
    --	 e-mail: 	dltj007@gmail.com
    --  date :    	01/07/2015 - 20:00
    -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    library ieee;
    use ieee.std_logic_1164.all;
    use ieee.numeric_std.all;
    
    entity add_pc is
    	port(
    		in_a :		in 		std_logic_vector(31 downto 0);
    		out_a :		out		std_logic_vector(31 downto 0)
    	);
    end add_pc;
    
    architecture arc_add_pc of add_pc is
    	constant pc_increment :			unsigned(31 downto 0):= x"00000004";
    
    begin
    	out_a <= std_logic_vector(unsigned(in_a) + pc_increment);
    
    end arc_add_pc;