Line 4... |
Line 4... |
--
|
--
|
-- This file is part of the RapidIO IP library project
|
-- This file is part of the RapidIO IP library project
|
-- http://www.opencores.org/cores/rio/
|
-- http://www.opencores.org/cores/rio/
|
--
|
--
|
-- Description
|
-- Description
|
-- Contains a platform to build endpoints on.
|
-- Contains a converter of RapidIO maintenance packets into a Wishbone similar
|
|
-- access. It relies on the Maintenance-packet modules from
|
|
-- RioLogicalPackets.vhd to function.
|
--
|
--
|
-- To Do:
|
-- To Do:
|
-- - Clean up the code for reading. Works but messy.
|
-- - Clean up the code for reading. Works but it is messy.
|
--
|
--
|
-- Author(s):
|
-- Author(s):
|
-- - Magnus Rosenius, magro732@opencores.org
|
-- - Magnus Rosenius, magro732@opencores.org
|
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
Line 144... |
Line 146... |
case state is
|
case state is
|
when IDLE =>
|
when IDLE =>
|
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
--
|
--
|
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
|
payloadIndex <= (others=>'0');
|
done_o <= '0';
|
done_o <= '0';
|
if (readRequestReady_i = '1') then
|
if (readRequestReady_i = '1') then
|
state <= CONFIG_READ_START;
|
state <= CONFIG_READ_START;
|
elsif (writeRequestReady_i = '1') then
|
elsif (writeRequestReady_i = '1') then
|
state <= CONFIG_WRITE_START;
|
state <= CONFIG_WRITE_START;
|
Line 327... |
Line 330... |
-- Unallowed packet.
|
-- Unallowed packet.
|
-- Send write-response with status indicating error.
|
-- Send write-response with status indicating error.
|
status_o <= "0111";
|
status_o <= "0111";
|
state <= CONFIG_WRITE_RESPONSE;
|
state <= CONFIG_WRITE_RESPONSE;
|
end if;
|
end if;
|
payloadIndex <= "0001";
|
payloadIndex <= std_logic_vector(unsigned(payloadIndex) + 1);
|
|
|
when CONFIG_WRITE =>
|
when CONFIG_WRITE =>
|
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
--
|
--
|
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|