OpenCores
URL https://opencores.org/ocsvn/ourisc/ourisc/trunk

Subversion Repositories ourisc

[/] [ourisc/] [trunk/] [rtl/] [pc_adder.vhd] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 joaocarlos
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.std_logic_arith.all;
4
use ieee.std_logic_unsigned.all;
5
 
6
entity pc_adder is
7
        generic (
8
            DATA_WIDTH : integer := 16;
9
            INC_PLUS : integer := 1
10
        );
11
        port (
12
                sink_pc : in std_logic_vector(DATA_WIDTH-1 downto 0);
13
                src_pc : out std_logic_vector(DATA_WIDTH-1 downto 0)
14
        );
15
 
16
end pc_adder;
17
 
18
architecture behavioral of pc_adder is
19
begin
20
        process(sink_pc)
21
                variable counter : std_logic_vector(DATA_WIDTH-1 downto 0) := conv_std_logic_vector(0,DATA_WIDTH); -- verify if it is necessary
22
        begin
23
                counter := sink_pc + INC_PLUS;
24
                src_pc <= counter;
25
        end process;
26
end behavioral;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.