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

Subversion Repositories potato

[/] [potato/] [trunk/] [src/] [pp_potato.vhd] - Blame information for rev 44

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

Line No. Rev Author Line
1 2 skordal
-- The Potato Processor - A simple processor for FPGAs
2
-- (c) Kristian Klomsten Skordal 2014 - 2015 <kristian.skordal@wafflemail.net>
3 3 skordal
-- Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
4 2 skordal
 
5
library ieee;
6
use ieee.std_logic_1164.all;
7
 
8
--! @brief The Potato Processor.
9
--! This file provides a Wishbone-compatible interface to the Potato processor.
10
entity pp_potato is
11
        generic(
12
                PROCESSOR_ID           : std_logic_vector(31 downto 0) := x"00000000"; --! Processor ID.
13
                RESET_ADDRESS          : std_logic_vector(31 downto 0) := x"00000000"  --! Address of the first instruction to execute.
14
        );
15
        port(
16
                clk   : in std_logic;
17
                reset : in std_logic;
18
 
19
                -- Interrupts:
20
                irq : in std_logic_vector(7 downto 0);
21
 
22
                -- Host/Target interface:
23
                fromhost_data    : in std_logic_vector(31 downto 0);
24
                fromhost_updated : in std_logic;
25
                tohost_data      : out std_logic_vector(31 downto 0);
26
                tohost_updated   : out std_logic;
27
 
28
                -- Wishbone interface:
29
                wb_adr_out : out std_logic_vector(31 downto 0);
30
                wb_sel_out : out std_logic_vector( 3 downto 0);
31
                wb_cyc_out : out std_logic;
32
                wb_stb_out : out std_logic;
33
                wb_we_out  : out std_logic;
34
                wb_dat_out : out std_logic_vector(31 downto 0);
35
                wb_dat_in  : in  std_logic_vector(31 downto 0);
36
                wb_ack_in  : in  std_logic
37
        );
38
end entity pp_potato;
39
 
40
architecture behaviour of pp_potato is
41
 
42
        -- Instruction memory signals:
43
        signal imem_address : std_logic_vector(31 downto 0);
44
        signal imem_data    : std_logic_vector(31 downto 0);
45
        signal imem_req, imem_ack : std_logic;
46
 
47
        -- Data memory signals:
48
        signal dmem_address   : std_logic_vector(31 downto 0);
49
        signal dmem_data_in   : std_logic_vector(31 downto 0);
50
        signal dmem_data_out  : std_logic_vector(31 downto 0);
51
        signal dmem_data_size : std_logic_vector( 1 downto 0);
52
        signal dmem_read_req  : std_logic;
53
        signal dmem_read_ack  : std_logic;
54
        signal dmem_write_req : std_logic;
55
        signal dmem_write_ack : std_logic;
56
 
57
begin
58
        processor: entity work.pp_core
59
                generic map(
60
                        PROCESSOR_ID => PROCESSOR_ID,
61
                        RESET_ADDRESS => RESET_ADDRESS
62
                ) port map(
63
                        clk => clk,
64
                        reset => reset,
65
                        timer_clk => clk,
66
                        imem_address => imem_address,
67
                        imem_data_in => imem_data,
68
                        imem_req => imem_req,
69
                        imem_ack => imem_ack,
70
                        dmem_address => dmem_address,
71
                        dmem_data_in => dmem_data_in,
72
                        dmem_data_out => dmem_data_out,
73
                        dmem_data_size => dmem_data_size,
74
                        dmem_read_req => dmem_read_req,
75
                        dmem_read_ack => dmem_read_ack,
76
                        dmem_write_req => dmem_write_req,
77
                        dmem_write_ack => dmem_write_ack,
78
                        fromhost_data => fromhost_data,
79
                        fromhost_write_en => fromhost_updated,
80
                        tohost_data => tohost_data,
81
                        tohost_write_en => tohost_updated,
82
                        irq => irq
83
                );
84
 
85
        wb_if: entity work.pp_wb_adapter
86
                port map(
87
                        clk => clk,
88
                        reset => reset,
89
                        imem_address => imem_address,
90
                        imem_data_out => imem_data,
91
                        imem_read_req => imem_req,
92
                        imem_read_ack => imem_ack,
93
                        dmem_address => dmem_address,
94
                        dmem_data_in => dmem_data_out,
95
                        dmem_data_out => dmem_data_in,
96
                        dmem_data_size => dmem_data_size,
97
                        dmem_read_req => dmem_read_req,
98
                        dmem_write_req => dmem_write_req,
99
                        dmem_read_ack => dmem_read_ack,
100
                        dmem_write_ack => dmem_write_ack,
101
                        wb_adr_out => wb_adr_out,
102
                        wb_sel_out => wb_sel_out,
103
                        wb_cyc_out => wb_cyc_out,
104
                        wb_stb_out => wb_stb_out,
105
                        wb_we_out => wb_we_out,
106
                        wb_dat_out => wb_dat_out,
107
                        wb_dat_in => wb_dat_in,
108
                        wb_ack_in => wb_ack_in
109
                );
110
 
111
end architecture behaviour;

powered by: WebSVN 2.1.0

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