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

Subversion Repositories hicovec

[/] [hicovec/] [trunk/] [cpu/] [groups/] [addressgroup.vhd] - Blame information for rev 5

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

Line No. Rev Author Line
1 2 hmanske
------------------------------------------------------------------
2 4 hmanske
-- PROJECT:     HiCoVec (highly configurable vector processor)
3 2 hmanske
--
4
-- ENTITY:      addressgroup
5
--
6
-- PURPOSE:     consists of and connects components
7
--              used for adressing the memory interface
8
--
9
-- AUTHOR:      harald manske, haraldmanske@gmx.de
10
--
11
-- VERSION:     1.0
12
------------------------------------------------------------------
13
 
14
library ieee;
15
use ieee.std_logic_1164.all;
16
use ieee.std_logic_unsigned.all;
17
 
18
entity addressgroup is
19
    port(   -- clock
20
            clk:            in std_logic;
21
 
22
            -- data inputs
23
            address_in:     in std_logic_vector(31 downto 0);
24
 
25
            -- data outputs
26
            address_out:    out std_logic_vector(31 downto 0);
27
            ic_out:         out std_logic_vector(31 downto 0);
28
 
29
            -- control signals
30
            sel_source:     in std_logic; -- c1
31
            inc:            in std_logic;
32
            load_ic:        in std_logic;
33
            reset_ic:       in std_logic
34
         );
35
end addressgroup;
36
 
37
architecture rtl of addressgroup is
38
    component instructioncounter
39
        port(   clk:        in std_logic;
40
                load:       in std_logic;
41
                inc:        in std_logic;
42
                reset:      in std_logic;
43
                data_in:    in std_logic_vector(31 downto 0);
44
                data_out:   out std_logic_vector(31 downto 0)
45
            );
46
    end component;
47
 
48
    component multiplexer2
49
        generic (
50
            w : positive -- word width
51
        );
52
        port (
53
            selector:   in std_logic;
54
            data_in_0:  in std_logic_vector(w-1 downto 0);
55
            data_in_1:  in std_logic_vector(w-1 downto 0);
56
            data_out:   out std_logic_vector(w-1 downto 0)
57
        );
58
    end component;
59
 
60
 
61
    for ic: instructioncounter use entity work.instructioncounter(rtl);
62
    for mux: multiplexer2 use entity work.multiplexer2(rtl);
63
 
64
 
65
    signal instruction:    std_logic_vector(31 downto 0);
66
 
67
    begin
68
        ic: instructioncounter port map (
69
            clk => clk,
70
            load => load_ic,
71
            inc => inc,
72
            reset => reset_ic,
73
            data_in => address_in,
74
            data_out => instruction
75
        );
76
 
77
        mux: multiplexer2
78
            generic map (
79
                w => 32
80
            )
81
            port map (
82
                selector => sel_source,
83
                data_in_0 => instruction,
84
                data_in_1 => address_in,
85
                data_out => address_out
86
            );
87
 
88
        ic_out <= instruction;
89
end rtl;

powered by: WebSVN 2.1.0

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