Line 8... |
Line 8... |
-- Description
|
-- Description
|
-- Containing a bridge between a RapidIO network and a Wishbone bus. Packets
|
-- Containing a bridge between a RapidIO network and a Wishbone bus. Packets
|
-- NWRITE, NWRITER and NREAD are currently supported.
|
-- NWRITE, NWRITER and NREAD are currently supported.
|
--
|
--
|
-- To Do:
|
-- To Do:
|
-- - Move packet handlers to RioLogicalPackets.
|
-- - Move packet handlers to RioLogicalPackets and make them symetrical.
|
-- - Move component declarations to riocommon.
|
-- - Add support for addressing to implementation defined config space by
|
-- - Update the Maintenance handler to the new interface. It currently does not
|
-- adding interface to top entity.
|
-- compile.
|
|
-- - Set the stb_o to '0' in between read accesses to conform better to a
|
-- - Set the stb_o to '0' in between read accesses to conform better to a
|
-- block transfer in the Wishbone standard.
|
-- block transfer in the Wishbone standard.
|
-- - Clean up cyc-signals, only stb-signals are needed (between
|
-- - Clean up cyc-signals, only stb-signals are needed (between
|
-- RioLogicalCommon and the packet handlers).
|
-- RioLogicalCommon and the packet handlers).
|
-- - Add support for the lock_o to be sure to transfer all the packet
|
-- - Add support for the lock_o to be sure to transfer all the packet
|
-- content atomically?
|
-- content atomically?
|
-- - Add support for EXTENDED_ADDRESS.
|
-- - Add support for EXTENDED_ADDRESS.
|
-- - Add support for addressing to implementation defined config space by
|
|
-- adding interface to top entity.
|
|
-- - Use the baseDeviceId when sending packets? Currently, all responses
|
-- - Use the baseDeviceId when sending packets? Currently, all responses
|
-- are sent with destination<->source exchanged so the baseDeviceId is not
|
-- are sent with destination<->source exchanged so the baseDeviceId is not
|
-- needed.
|
-- needed.
|
-- - Support inbound data with full bandwidth, not just half, applies to
|
-- - Support inbound data with full bandwidth, not just half, applies to
|
-- RioLogicalCommon and the packet handlers.
|
-- RioLogicalCommon and the packet handlers.
|
Line 273... |
Line 270... |
signal crfInbound : std_logic;
|
signal crfInbound : std_logic;
|
signal prioInbound : std_logic_vector(1 downto 0);
|
signal prioInbound : std_logic_vector(1 downto 0);
|
signal ttInbound : std_logic_vector(1 downto 0);
|
signal ttInbound : std_logic_vector(1 downto 0);
|
signal dstIdInbound : std_logic_vector(31 downto 0);
|
signal dstIdInbound : std_logic_vector(31 downto 0);
|
signal srcIdInbound : std_logic_vector(31 downto 0);
|
signal srcIdInbound : std_logic_vector(31 downto 0);
|
|
signal sizeInbound : std_logic_vector(3 downto 0);
|
signal tidInbound : std_logic_vector(7 downto 0);
|
signal tidInbound : std_logic_vector(7 downto 0);
|
signal offsetInbound : std_logic_vector(20 downto 0);
|
signal offsetInbound : std_logic_vector(20 downto 0);
|
signal wdptrInbound : std_logic;
|
signal wdptrInbound : std_logic;
|
signal payloadLengthInbound : std_logic_vector(3 downto 0);
|
signal payloadLengthInbound : std_logic_vector(2 downto 0);
|
signal payloadInbound : std_logic_vector(31 downto 0);
|
signal payloadInbound : std_logic_vector(63 downto 0);
|
|
|
signal readResponseMaint : std_logic;
|
signal readResponseMaint : std_logic;
|
signal writeResponseMaint : std_logic;
|
signal writeResponseMaint : std_logic;
|
signal wdptrMaint : std_logic;
|
signal statusMaint : std_logic_vector(3 downto 0);
|
signal payloadLengthMaint : std_logic_vector(3 downto 0);
|
signal payloadLengthMaint : std_logic_vector(2 downto 0);
|
signal payloadIndexMaint : std_logic_vector(3 downto 0);
|
signal payloadIndexMaint : std_logic_vector(2 downto 0);
|
signal payloadMaint : std_logic_vector(31 downto 0);
|
signal payloadMaint : std_logic_vector(63 downto 0);
|
signal doneMaint : std_logic;
|
signal doneMaint : std_logic;
|
|
|
signal payloadIndexOutbound : std_logic_vector(3 downto 0);
|
signal payloadIndexOutbound : std_logic_vector(2 downto 0);
|
signal doneOutbound : std_logic;
|
signal doneOutbound : std_logic;
|
|
|
signal configStb : std_logic;
|
signal configStb : std_logic;
|
signal configWe : std_logic;
|
signal configWe : std_logic;
|
signal configAdr : std_logic_vector(21 downto 0);
|
signal configAdr : std_logic_vector(21 downto 0);
|
Line 570... |
Line 568... |
crf_o=>crfInbound,
|
crf_o=>crfInbound,
|
prio_o=>prioInbound,
|
prio_o=>prioInbound,
|
tt_o=>ttInbound,
|
tt_o=>ttInbound,
|
dstid_o=>dstIdInbound,
|
dstid_o=>dstIdInbound,
|
srcid_o=>srcIdInbound,
|
srcid_o=>srcIdInbound,
|
|
size_o=>sizeInbound,
|
|
status_o=>open,
|
tid_o=>tidInbound,
|
tid_o=>tidInbound,
|
hop_o=>open,
|
hop_o=>open,
|
offset_o=>offsetInbound,
|
offset_o=>offsetInbound,
|
wdptr_o=>wdptrInbound,
|
wdptr_o=>wdptrInbound,
|
payloadLength_o=>payloadLengthInbound,
|
payloadLength_o=>payloadLengthInbound,
|
Line 598... |
Line 598... |
crf_i=>crfInbound,
|
crf_i=>crfInbound,
|
prio_i=>prioInbound,
|
prio_i=>prioInbound,
|
tt_i=>ttInbound,
|
tt_i=>ttInbound,
|
dstid_i=>srcIdInbound,
|
dstid_i=>srcIdInbound,
|
srcid_i=>dstIdInbound,
|
srcid_i=>dstIdInbound,
|
status_i=>"0000",
|
size_i=>(others=>'0'),
|
|
status_i=>statusMaint,
|
tid_i=>tidInbound,
|
tid_i=>tidInbound,
|
hop_i=>x"ff",
|
hop_i=>x"ff",
|
offset_i=>(others=>'0'),
|
offset_i=>(others=>'0'),
|
wdptr_i=>wdptrMaint,
|
wdptr_i=>'0',
|
payloadLength_i=>payloadLengthMaint,
|
payloadLength_i=>payloadLengthMaint,
|
payloadIndex_o=>payloadIndexOutbound,
|
payloadIndex_o=>payloadIndexOutbound,
|
payload_i=>payloadMaint,
|
payload_i=>payloadMaint,
|
done_o=>doneOutbound,
|
done_o=>doneOutbound,
|
outboundCyc_o=>outboundCyc(1),
|
outboundCyc_o=>outboundCyc(1),
|
Line 617... |
Line 618... |
MaintenanceBridge: RioLogicalMaintenance
|
MaintenanceBridge: RioLogicalMaintenance
|
port map(
|
port map(
|
clk=>clk, areset_n=>areset_n, enable=>enable,
|
clk=>clk, areset_n=>areset_n, enable=>enable,
|
readRequestReady_i=>readRequestInbound,
|
readRequestReady_i=>readRequestInbound,
|
writeRequestReady_i=>writeRequestInbound,
|
writeRequestReady_i=>writeRequestInbound,
|
|
size_i=>sizeInbound,
|
offset_i=>offsetInbound,
|
offset_i=>offsetInbound,
|
wdptr_i=>wdptrInbound,
|
wdptr_i=>wdptrInbound,
|
payloadLength_i=>payloadLengthInbound,
|
payloadLength_i=>payloadLengthInbound,
|
payloadIndex_o=>payloadIndexMaint,
|
payloadIndex_o=>payloadIndexMaint,
|
payload_i=>payloadInbound,
|
payload_i=>payloadInbound,
|
done_o=>doneMaint,
|
done_o=>doneMaint,
|
readResponseReady_o=>readResponseMaint,
|
readResponseReady_o=>readResponseMaint,
|
writeResponseReady_o=>writeResponseMaint,
|
writeResponseReady_o=>writeResponseMaint,
|
wdptr_o=>wdptrMaint,
|
status_o=>statusMaint,
|
payloadLength_o=>payloadLengthMaint,
|
payloadLength_o=>payloadLengthMaint,
|
payloadIndex_i=>payloadIndexOutbound,
|
payloadIndex_i=>payloadIndexOutbound,
|
payload_o=>payloadMaint,
|
payload_o=>payloadMaint,
|
done_i=>doneOutbound,
|
done_i=>doneOutbound,
|
configStb_o=>configStb,
|
configStb_o=>configStb,
|
Line 1149... |
Line 1151... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
architecture WriteClassInbound of WriteClassInbound is
|
architecture WriteClassInbound of WriteClassInbound is
|
component MemorySimpleDualPort
|
|
generic(
|
|
ADDRESS_WIDTH : natural := 1;
|
|
DATA_WIDTH : natural := 1);
|
|
port(
|
|
clkA_i : in std_logic;
|
|
enableA_i : in std_logic;
|
|
addressA_i : in std_logic_vector(ADDRESS_WIDTH-1 downto 0);
|
|
dataA_i : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
|
|
|
clkB_i : in std_logic;
|
|
enableB_i : in std_logic;
|
|
addressB_i : in std_logic_vector(ADDRESS_WIDTH-1 downto 0);
|
|
dataB_o : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
|
end component;
|
|
|
|
type StateType is (RECEIVE_PACKET, READY);
|
type StateType is (RECEIVE_PACKET, READY);
|
signal state : StateType;
|
signal state : StateType;
|
|
|
signal wdptr : std_logic;
|
signal wdptr : std_logic;
|
signal wrsize : std_logic_vector(3 downto 0);
|
signal wrsize : std_logic_vector(3 downto 0);
|
Line 1480... |
Line 1466... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
architecture ResponseClassOutbound of ResponseClassOutbound is
|
architecture ResponseClassOutbound of ResponseClassOutbound is
|
component MemorySimpleDualPort
|
|
generic(
|
|
ADDRESS_WIDTH : natural := 1;
|
|
DATA_WIDTH : natural := 1);
|
|
port(
|
|
clkA_i : in std_logic;
|
|
enableA_i : in std_logic;
|
|
addressA_i : in std_logic_vector(ADDRESS_WIDTH-1 downto 0);
|
|
dataA_i : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
|
|
|
clkB_i : in std_logic;
|
|
enableB_i : in std_logic;
|
|
addressB_i : in std_logic_vector(ADDRESS_WIDTH-1 downto 0);
|
|
dataB_o : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
|
end component;
|
|
|
|
signal header : std_logic_vector(31 downto 0);
|
signal header : std_logic_vector(31 downto 0);
|
|
|
type StateType is (WAIT_PACKET, SEND_RESPONSE,
|
type StateType is (WAIT_PACKET, SEND_RESPONSE,
|
WAIT_COMPLETE, RESPONSE_DONE);
|
WAIT_COMPLETE, RESPONSE_DONE);
|
signal state : StateType;
|
signal state : StateType;
|