Line 3... |
Line 3... |
-- Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
|
-- Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
|
|
|
use work.pp_types.all;
|
|
|
--! @brief The Potato Processor.
|
--! @brief The Potato Processor.
|
--! This file provides a Wishbone-compatible interface to the Potato processor.
|
--! This file provides a Wishbone-compatible interface to the Potato processor.
|
entity pp_potato is
|
entity pp_potato is
|
generic(
|
generic(
|
PROCESSOR_ID : std_logic_vector(31 downto 0) := x"00000000"; --! Processor ID.
|
PROCESSOR_ID : std_logic_vector(31 downto 0) := x"00000000"; --! Processor ID.
|
Line 52... |
Line 54... |
signal dmem_read_req : std_logic;
|
signal dmem_read_req : std_logic;
|
signal dmem_read_ack : std_logic;
|
signal dmem_read_ack : std_logic;
|
signal dmem_write_req : std_logic;
|
signal dmem_write_req : std_logic;
|
signal dmem_write_ack : std_logic;
|
signal dmem_write_ack : std_logic;
|
|
|
|
-- Wishbone signals:
|
|
signal icache_inputs, dmem_if_inputs : wishbone_master_inputs;
|
|
signal icache_outputs, dmem_if_outputs : wishbone_master_outputs;
|
|
|
begin
|
begin
|
processor: entity work.pp_core
|
processor: entity work.pp_core
|
generic map(
|
generic map(
|
PROCESSOR_ID => PROCESSOR_ID,
|
PROCESSOR_ID => PROCESSOR_ID,
|
RESET_ADDRESS => RESET_ADDRESS
|
RESET_ADDRESS => RESET_ADDRESS
|
Line 80... |
Line 86... |
tohost_data => tohost_data,
|
tohost_data => tohost_data,
|
tohost_write_en => tohost_updated,
|
tohost_write_en => tohost_updated,
|
irq => irq
|
irq => irq
|
);
|
);
|
|
|
wb_if: entity work.pp_wb_adapter
|
icache: entity work.pp_icache
|
|
generic map(
|
|
LINE_SIZE => 4,
|
|
NUM_LINES => 128
|
|
) port map(
|
|
clk => clk,
|
|
reset => reset,
|
|
cache_enable => '1',
|
|
cache_flush => '0',
|
|
cached_areas => (others => '1'),
|
|
mem_address_in => imem_address,
|
|
mem_data_out => imem_data,
|
|
mem_data_in => (others => '0'),
|
|
mem_data_size => b"00",
|
|
mem_read_req => imem_req,
|
|
mem_read_ack => imem_ack,
|
|
mem_write_req => '0',
|
|
mem_write_ack => open,
|
|
wb_inputs => icache_inputs,
|
|
wb_outputs => icache_outputs
|
|
);
|
|
|
|
dmem_if: entity work.pp_wb_adapter
|
port map(
|
port map(
|
clk => clk,
|
clk => clk,
|
reset => reset,
|
reset => reset,
|
imem_address => imem_address,
|
|
imem_data_out => imem_data,
|
|
imem_read_req => imem_req,
|
|
imem_read_ack => imem_ack,
|
|
dmem_address => dmem_address,
|
dmem_address => dmem_address,
|
dmem_data_in => dmem_data_out,
|
dmem_data_in => dmem_data_out,
|
dmem_data_out => dmem_data_in,
|
dmem_data_out => dmem_data_in,
|
dmem_data_size => dmem_data_size,
|
dmem_data_size => dmem_data_size,
|
dmem_read_req => dmem_read_req,
|
dmem_read_req => dmem_read_req,
|
dmem_write_req => dmem_write_req,
|
|
dmem_read_ack => dmem_read_ack,
|
dmem_read_ack => dmem_read_ack,
|
|
dmem_write_req => dmem_write_req,
|
dmem_write_ack => dmem_write_ack,
|
dmem_write_ack => dmem_write_ack,
|
|
wb_inputs => dmem_if_inputs,
|
|
wb_outputs => dmem_if_outputs
|
|
);
|
|
|
|
arbiter: entity work.pp_wb_arbiter
|
|
port map(
|
|
clk => clk,
|
|
reset => reset,
|
|
--m1_inputs => dmem_if_inputs,
|
|
--m1_outputs => dmem_if_outputs,
|
|
m1_inputs => icache_inputs,
|
|
m1_outputs => icache_outputs,
|
|
m2_inputs => dmem_if_inputs,
|
|
m2_outputs => dmem_if_outputs,
|
wb_adr_out => wb_adr_out,
|
wb_adr_out => wb_adr_out,
|
wb_sel_out => wb_sel_out,
|
wb_sel_out => wb_sel_out,
|
wb_cyc_out => wb_cyc_out,
|
wb_cyc_out => wb_cyc_out,
|
wb_stb_out => wb_stb_out,
|
wb_stb_out => wb_stb_out,
|
wb_we_out => wb_we_out,
|
wb_we_out => wb_we_out,
|