Line 805... |
Line 805... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
use ieee.numeric_std.all;
|
use ieee.numeric_std.all;
|
use work.rio_common.all;
|
use work.rio_common.all;
|
use work.rio_serial_common.all;
|
|
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- Entity for RioTransmitterCore.
|
-- Entity for RioTransmitterCore.
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
entity RioTransmitterCore is
|
entity RioTransmitterCore is
|
Line 962... |
Line 961... |
begin
|
begin
|
|
|
linkInitialized_o <= operational_i;
|
linkInitialized_o <= operational_i;
|
|
|
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
|
-- Assign control symbol from fifo signals.
|
|
-----------------------------------------------------------------------------
|
|
|
|
txControlStype0 <= txControlSymbol_i(12 downto 10);
|
|
txControlParameter0 <= txControlSymbol_i(9 downto 5);
|
|
txControlParameter1 <= txControlSymbol_i(4 downto 0);
|
|
|
|
rxControlStype0 <= rxControlSymbol_i(12 downto 10);
|
|
rxControlParameter0 <= rxControlSymbol_i(9 downto 5);
|
|
rxControlParameter1 <= rxControlSymbol_i(4 downto 0);
|
|
|
|
-----------------------------------------------------------------------------
|
-- N-3
|
-- N-3
|
-- Receive stuff from link-partner and timeout supervision.
|
-- Receive stuff from link-partner and timeout supervision.
|
-- Input: ackId, ackIdWindow, timeoutExpired
|
-- Input: ackId, ackIdWindow, timeoutExpired
|
-- Output: sendLinkRequest, sendRestartFromRetry, ackId,
|
-- Output: sendLinkRequest, sendRestartFromRetry, ackId,
|
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
Line 985... |
Line 996... |
sendLinkRequest <= sendLinkRequestOut;
|
sendLinkRequest <= sendLinkRequestOut;
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
-- REMARK: Reset statusReceived at startup...
|
-- REMARK: Reset statusReceived at startup...
|
process(outputErrorStopped_i, recoverActive_i, recoverCounter_i, ackId_i, bufferStatus_i,
|
process(outputErrorStopped_i, recoverActive_i, recoverCounter_i,
|
statusReceived_i, numberSentLinkRequests_i)
|
ackId_i, bufferStatus_i, statusReceived_i,
|
|
numberSentLinkRequests_i,
|
|
txFull_i, operational_i,
|
|
txControlEmpty_i, txControlStype0,
|
|
txControlParameter0, txControlParameter1)
|
begin
|
begin
|
txControlUpdate_o <= '0';
|
txControlUpdate_o <= '0';
|
outputErrorStopped_o <= outputErrorStopped_i;
|
outputErrorStopped_o <= outputErrorStopped_i;
|
recoverActive_o <= recoverActive_i;
|
recoverActive_o <= recoverActive_i;
|
recoverCounter_o <= recoverCounter_i;
|
recoverCounter_o <= recoverCounter_i;
|
ackId_o <= ackId_i;
|
ackId_o <= ackId_i;
|
bufferStatus_o <= bufferStatus_i;
|
bufferStatus_o <= bufferStatus_i;
|
statusReceived_o <= statusReceived_i;
|
statusReceived_o <= statusReceived_i;
|
numberSentLinkRequests_o <= numberSentLinkRequests_i;
|
numberSentLinkRequests_o <= numberSentLinkRequests_i;
|
|
|
|
readFrame_o <= '0';
|
|
|
sendRestartFromRetryOut <= '0';
|
sendRestartFromRetryOut <= '0';
|
sendLinkRequestOut <= '0';
|
sendLinkRequestOut <= '0';
|
|
|
if (recoverActive_i = '1') then
|
if (recoverActive_i = '1') then
|
if (ackId_i /= recoverCounter_i) then
|
if (ackId_i /= recoverCounter_i) then
|
Line 1197... |
Line 1214... |
end if;
|
end if;
|
end process;
|
end process;
|
|
|
-- This process decide which stype1-part of a control symbols to send as well
|
-- This process decide which stype1-part of a control symbols to send as well
|
-- as all data symbols.
|
-- as all data symbols.
|
process(frameState_i, ackIdWindow_i, timeCurrent_i, sendRestartFromRetry, sendLinkRequest)
|
process(frameState_i, frameWordCounter_i, frameContent_i, ackIdWindow_i, timeCurrent_i,
|
|
sendRestartFromRetry, sendLinkRequest)
|
begin
|
begin
|
readFrame_o <= '0';
|
readFrame_o <= '0';
|
readFrameRestart_o <= '0';
|
readFrameRestart_o <= '0';
|
readWindowReset_o <= '0';
|
readWindowReset_o <= '0';
|
readWindowNext_o <= '0';
|
readWindowNext_o <= '0';
|
readContent_o <= '0';
|
readContent_o <= '0';
|
|
|
frameState_o <= frameState_i;
|
frameState_o <= frameState_i;
|
|
frameWordCounter_o <= frameWordCounter_i;
|
|
frameContent_o <= frameContent_i;
|
ackIdWindow_o <= ackIdWindow_i;
|
ackIdWindow_o <= ackIdWindow_i;
|
|
|
timeSentWrite_o <= '0';
|
timeSentWrite_o <= '0';
|
timeSentWriteAddress_o <= ackIdWindow_i;
|
timeSentWriteAddress_o <= ackIdWindow_i;
|
timeSentWriteData_o <= timeCurrent_i;
|
timeSentWriteData_o <= timeCurrent_i;
|
Line 1511... |
Line 1531... |
process(txFull_i, linkInitialized_i, ackIdStatus_i, portInitialized_i,
|
process(txFull_i, linkInitialized_i, ackIdStatus_i, portInitialized_i,
|
operational_i, counter_i, statusReceived_i, symbolsTransmitted_i)
|
operational_i, counter_i, statusReceived_i, symbolsTransmitted_i)
|
begin
|
begin
|
operational_o <= operational_i;
|
operational_o <= operational_i;
|
counter_o <= counter_i;
|
counter_o <= counter_i;
|
|
symbolsTransmitted_o <= symbolsTransmitted_i;
|
|
rxControlUpdate_o <= '0';
|
|
|
controlValidOut <= '0';
|
controlValidOut <= '0';
|
stype0Out <= STYPE0_STATUS;
|
stype0Out <= STYPE0_STATUS;
|
parameter0Out <= ackIdStatus_i;
|
parameter0Out <= ackIdStatus_i;
|
parameter1Out <= "11111";
|
parameter1Out <= "11111";
|