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

Subversion Repositories lxp32

[/] [lxp32/] [trunk/] [rtl/] [lxp32c_top.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 ring0_mipt
---------------------------------------------------------------------
2
-- LXP32C CPU top-level module (C-series, with instruction cache)
3
--
4
-- Part of the LXP32 CPU
5
--
6
-- Copyright (c) 2016 by Alex I. Kuznetsov
7
--
8
-- This version uses Wishbone B3 interface for the instruction bus
9
-- (IBUS). It is designed for high-latency program memory, such as
10
-- external SDRAM chips.
11
--
12
-- Parameters:
13
--     DBUS_RMW:           Use RMW cycle instead of SEL_O() signal
14
--                         for byte-granular access to data bus
15
--     DIVIDER_EN:         enable divider
16
--     IBUS_BURST_SIZE:    size of the burst
17
--     IBUS_PREFETCH_SIZE: initiate read burst if number of words
18
--                         left in the buffer is less than specified
19
--     MUL_ARCH:           multiplier architecture ("dsp", "opt"
20
--                         or "seq")
21
--     START_ADDR:         address in program memory where execution
22
--                         starts
23
---------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
 
28
entity lxp32c_top is
29
        generic(
30
                DBUS_RMW: boolean:=false;
31
                DIVIDER_EN: boolean:=true;
32
                IBUS_BURST_SIZE: integer:=16;
33
                IBUS_PREFETCH_SIZE: integer:=32;
34
                MUL_ARCH: string:="dsp";
35
                START_ADDR: std_logic_vector(31 downto 0):=(others=>'0')
36
        );
37
        port(
38
                clk_i: in std_logic;
39
                rst_i: in std_logic;
40
 
41
                ibus_cyc_o: out std_logic;
42
                ibus_stb_o: out std_logic;
43
                ibus_cti_o: out std_logic_vector(2 downto 0);
44
                ibus_bte_o: out std_logic_vector(1 downto 0);
45
                ibus_ack_i: in std_logic;
46
                ibus_adr_o: out std_logic_vector(29 downto 0);
47
                ibus_dat_i: in std_logic_vector(31 downto 0);
48
 
49
                dbus_cyc_o: out std_logic;
50
                dbus_stb_o: out std_logic;
51
                dbus_we_o: out std_logic;
52
                dbus_sel_o: out std_logic_vector(3 downto 0);
53
                dbus_ack_i: in std_logic;
54
                dbus_adr_o: out std_logic_vector(31 downto 2);
55
                dbus_dat_o: out std_logic_vector(31 downto 0);
56
                dbus_dat_i: in std_logic_vector(31 downto 0);
57
 
58
                irq_i: in std_logic_vector(7 downto 0)
59
        );
60
end entity;
61
 
62
architecture rtl of lxp32c_top is
63
 
64
signal lli_re: std_logic;
65
signal lli_adr: std_logic_vector(29 downto 0);
66
signal lli_dat: std_logic_vector(31 downto 0);
67
signal lli_busy: std_logic;
68
 
69
begin
70
 
71
cpu_inst: entity work.lxp32_cpu(rtl)
72
        generic map(
73
                DBUS_RMW=>DBUS_RMW,
74
                DIVIDER_EN=>DIVIDER_EN,
75
                MUL_ARCH=>MUL_ARCH,
76
                START_ADDR=>START_ADDR
77
        )
78
        port map(
79
                clk_i=>clk_i,
80
                rst_i=>rst_i,
81
 
82
                lli_re_o=>lli_re,
83
                lli_adr_o=>lli_adr,
84
                lli_dat_i=>lli_dat,
85
                lli_busy_i=>lli_busy,
86
 
87
                dbus_cyc_o=>dbus_cyc_o,
88
                dbus_stb_o=>dbus_stb_o,
89
                dbus_we_o=>dbus_we_o,
90
                dbus_sel_o=>dbus_sel_o,
91
                dbus_ack_i=>dbus_ack_i,
92
                dbus_adr_o=>dbus_adr_o,
93
                dbus_dat_o=>dbus_dat_o,
94
                dbus_dat_i=>dbus_dat_i,
95
 
96
                irq_i=>irq_i
97
        );
98
 
99
icache_inst: entity work.lxp32_icache(rtl)
100
        generic map(
101
                BURST_SIZE=>IBUS_BURST_SIZE,
102
                PREFETCH_SIZE=>IBUS_PREFETCH_SIZE
103
        )
104
        port map(
105
                clk_i=>clk_i,
106
                rst_i=>rst_i,
107
 
108
                lli_re_i=>lli_re,
109
                lli_adr_i=>lli_adr,
110
                lli_dat_o=>lli_dat,
111
                lli_busy_o=>lli_busy,
112
 
113
                wbm_cyc_o=>ibus_cyc_o,
114
                wbm_stb_o=>ibus_stb_o,
115
                wbm_cti_o=>ibus_cti_o,
116
                wbm_bte_o=>ibus_bte_o,
117
                wbm_ack_i=>ibus_ack_i,
118
                wbm_adr_o=>ibus_adr_o,
119
                wbm_dat_i=>ibus_dat_i
120
        );
121
 
122
end architecture;

powered by: WebSVN 2.1.0

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