Skip to content

Commit

Permalink
adding ackN/seqN to AXI-Lite for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Oct 22, 2024
1 parent a55ff2c commit 3acd592
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
9 changes: 9 additions & 0 deletions protocols/rssi/v1/rtl/RssiAxiLiteRegItf.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ entity RssiAxiLiteRegItf is
negRssiParam_i : in RssiParamType;

-- Status (RO)
txLastAckN_i : in slv(7 downto 0);
rxSeqN_i : in slv(7 downto 0);
rxAckN_i : in slv(7 downto 0);
rxLastSeqN_i : in slv(7 downto 0);
txTspState_i : in slv(7 downto 0);
txAppState_i : in slv(3 downto 0);
txAckState_i : in slv(3 downto 0);
Expand Down Expand Up @@ -335,6 +339,11 @@ begin
v.axilReadSlave.rdata(19 downto 16) := rxTspState_i;
v.axilReadSlave.rdata(23 downto 20) := rxAppState_i;
v.axilReadSlave.rdata(27 downto 24) := connState_i;
when 16#1C# =>
v.axilReadSlave.rdata(7 downto 0) := txLastAckN_i;
v.axilReadSlave.rdata(15 downto 8) := rxSeqN_i;
v.axilReadSlave.rdata(23 downto 16) := rxAckN_i;
v.axilReadSlave.rdata(31 downto 24) := rxLastSeqN_i;
when others =>
axilReadResp := AXI_RESP_DECERR_C;
end case;
Expand Down
4 changes: 4 additions & 0 deletions protocols/rssi/v1/rtl/RssiCore.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ begin
injectFault_o => s_injectFaultReg,

-- Status (RO)
txLastAckN_i => s_rxLastAckN,
rxSeqN_i => s_rxLastSeqN,
rxAckN_i => s_rxAckN,
rxLastSeqN_i => s_rxLastSeqN,
txTspState_i => s_txTspState,
txAppState_i => s_txAppState,
txAckState_i => s_txAckState,
Expand Down
44 changes: 44 additions & 0 deletions python/surf/protocols/rssi/_RssiCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,50 @@ def __init__(self, **kwargs):
},
))

self.add(pr.RemoteVariable(
name = 'TxLastAckN',
description = 'Last acknowledged Sequence number connected to TX module',
offset = 0x70,
bitSize = 8,
bitOffset = 0,
mode = 'RO',
disp = '{:d}',
pollInterval = 1,
))

self.add(pr.RemoteVariable(
name = 'RxSeqN',
description = 'Current received seqN',
offset = 0x70,
bitSize = 8,
bitOffset = 8,
mode = 'RO',
disp = '{:d}',
pollInterval = 1,
))

self.add(pr.RemoteVariable(
name = 'RxAckN',
description = 'Current received ackN',
offset = 0x70,
bitSize = 8,
bitOffset = 16,
mode = 'RO',
disp = '{:d}',
pollInterval = 1,
))

self.add(pr.RemoteVariable(
name = 'RxLastSeqN',
description = 'Last seqN received and sent to application (this is the ackN transmitted)',
offset = 0x70,
bitSize = 8,
bitOffset = 24,
mode = 'RO',
disp = '{:d}',
pollInterval = 1,
))

##############################
# Commands
##############################
Expand Down

0 comments on commit 3acd592

Please sign in to comment.