Skip to content

Commit

Permalink
Merge pull request #688 from slaclab/pre-release
Browse files Browse the repository at this point in the history
Release Candidate v2.6.0
  • Loading branch information
ruck314 authored Jun 15, 2020
2 parents 5cbe2c5 + d6c05d9 commit be45f97
Show file tree
Hide file tree
Showing 29 changed files with 2,256 additions and 300 deletions.
21 changes: 13 additions & 8 deletions axi/axi-stream/rtl/AxiStreamScatterGather.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ begin

comb : process (axiRst, axilReadMaster, axilWriteMaster, r, sSsiMaster, txFifoRdData,
txFifoValid, txRamRdData) is
variable v : RegType;
variable mDataLow : integer;
variable mDataHigh : integer;
variable axilStatus : AxiLiteStatusType;
variable v : RegType;
variable mDataLow : integer;
variable mDataHigh : integer;
variable axilWriteResp : slv(1 downto 0);
variable axilReadResp : slv(1 downto 0);
variable axilStatus : AxiLiteStatusType;
begin
v := r;

Expand Down Expand Up @@ -305,8 +307,11 @@ begin
----------------------------------------------------------------------------------------------
axiSlaveWaitTxn(axilWriteMaster, axilReadMaster, v.axilWriteSlave, v.axilReadSlave, axilStatus);

axilWriteResp := ite(axilWriteMaster.awaddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_RESP_DECERR_C);
axilReadResp := ite(axilReadMaster.araddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_RESP_DECERR_C);

if (axilStatus.writeEnable = '1') then
axiSlaveWriteResponse(v.axilWriteSlave);
axiSlaveWriteResponse(v.axilWriteSlave, AXI_RESP_DECERR_C);
end if;

if (axilStatus.readEnable = '1') then
Expand Down Expand Up @@ -337,10 +342,10 @@ begin
v.axilReadSlave.rdata(r.badWords'range) := r.badWords;
when X"28" =>
v.axilReadSlave.rdata(r.badWordCount'range) := r.badWordCount;

when others => null;
when others =>
axilReadResp := AXI_RESP_DECERR_C;
end case;
axiSlaveReadResponse(v.axilReadSlave);
axiSlaveReadResponse(v.axilReadSlave, axilReadResp);
end if;

----------------------------------------------------------------------------------------------
Expand Down
21 changes: 11 additions & 10 deletions axi/dma/rtl/v1/AxiStreamDma.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,20 @@ begin
-- Local Register Space
-------------------------------------
process (axiRst, ib, intReadMasters, intWriteMasters, ob, popFifoValid, r) is
variable v : RegType;
variable axiStatus : AxiLiteStatusType;
variable v : RegType;
variable axiWriteResp : slv(1 downto 0);
variable axiReadResp : slv(1 downto 0);
variable axiStatus : AxiLiteStatusType;
begin
v := r;

v.intAck := '0';

axiSlaveWaitTxn(intWriteMasters(0), intReadMasters(0), v.axiWriteSlave, v.axiReadSlave, axiStatus);

axiWriteResp := ite(intWriteMasters(0).awaddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_RESP_DECERR_C);
axiReadResp := ite(intReadMasters(0).araddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_RESP_DECERR_C);

-- Write
if (axiStatus.writeEnable = '1') then

Expand All @@ -328,10 +333,9 @@ begin
when x"20" =>
v.swCache := intWriteMasters(0).wdata(3 downto 0);
when others =>
null;
axiWriteResp := AXI_RESP_DECERR_C;
end case;

axiSlaveWriteResponse(v.axiWriteSlave);
axiSlaveWriteResponse(v.axiWriteSlave, axiWriteResp);
end if;

-- Read
Expand Down Expand Up @@ -361,12 +365,9 @@ begin
when x"20" =>
v.axiReadSlave.rdata(3 downto 0) := r.swCache;
when others =>
null;
axiReadResp := AXI_RESP_DECERR_C;
end case;

-- Send Axi Response
axiSlaveReadResponse(v.axiReadSlave);

axiSlaveReadResponse(v.axiReadSlave, axiReadResp);
end if;

v.interrupt := (ib.intPending or ob.intPending) and r.intEnable;
Expand Down
19 changes: 16 additions & 3 deletions axi/dma/rtl/v2/AxiStreamDmaV2Desc.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ architecture rtl of AxiStreamDmaV2Desc is
intReqCount : slv(31 downto 0);
interrupt : sl;

intHoldoff : slv(15 downto 0);
intHoldoffCount : slv(15 downto 0);

end record RegType;

constant REG_INIT_C : RegType := (
Expand Down Expand Up @@ -235,7 +238,9 @@ architecture rtl of AxiStreamDmaV2Desc is
rdMemAddr => (others => '0'),
intReqEn => '0',
intReqCount => (others => '0'),
interrupt => '0');
interrupt => '0',
intHoldoff => toSlv(10000,16), -- ~20 kHz
intHoldoffCount => (others => '0') );

signal r : RegType := REG_INIT_C;
signal rin : RegType;
Expand Down Expand Up @@ -378,7 +383,7 @@ begin
axiSlaveRegister(regCon, x"000", 0, v.enable);
axiSlaveRegisterR(regCon, x"000", 8, r.enableCnt); -- Count the number of times enable transitions from 0->1
axiSlaveRegisterR(regCon, x"000", 16, '1'); -- Legacy DESC_128_EN_C constant (always 0x1 now)
axiSlaveRegisterR(regCon, x"000", 24, toSlv(2, 8)); -- Version 2 = 2, Version1 = 0
axiSlaveRegisterR(regCon, x"000", 24, toSlv(3, 8)); -- Version Number for aes-stream-driver to case on
axiSlaveRegister(regCon, x"004", 0, v.intEnable);
axiSlaveRegister(regCon, x"008", 0, v.contEn);
axiSlaveRegister(regCon, x"00C", 0, v.dropEn);
Expand Down Expand Up @@ -429,6 +434,8 @@ begin

axiSlaveRegister(regCon, x"080", 0, v.forceInt);

axiSlaveRegister(regCon, x"084", 0, v.intHoldoff);

-- End transaction block
axiSlaveDefault(regCon, v.axilWriteSlave, v.axilReadSlave, AXI_RESP_DECERR_C);

Expand Down Expand Up @@ -688,7 +695,7 @@ begin
end loop;

-- Drive interrupt, avoid false firings during ack
if (r.intReqCount /= 0 or r.forceInt = '1') and r.intSwAckReq = '0' then
if ((r.intReqCount /= 0 and r.intHoldoffCount > r.intHoldoff) or r.forceInt = '1') and r.intSwAckReq = '0' then
v.interrupt := r.intEnable;
else
v.interrupt := '0';
Expand Down Expand Up @@ -724,6 +731,12 @@ begin
v.forceInt := '0';
end if;

if r.intSwAckReq = '1' then
v.intHoldoffCount := (others=>'0');
elsif uAnd(r.intHoldoffCount)='0' then
v.intHoldoffCount := r.intHoldoffCount+1;
end if;

----------------------------------------------------------
-- Read Descriptor Requests
----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions protocols/jesd204b/rtl/JesdRxReg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ begin
when others =>
axilWriteResp := AXI_RESP_DECERR_C;
end case;
axiSlaveWriteResponse(v.axilWriteSlave);
axiSlaveWriteResponse(v.axilWriteSlave, axilWriteResp);
end if;

if (axilStatus.readEnable = '1') then
Expand Down Expand Up @@ -288,7 +288,7 @@ begin
when others =>
axilReadResp := AXI_RESP_DECERR_C;
end case;
axiSlaveReadResponse(v.axilReadSlave);
axiSlaveReadResponse(v.axilReadSlave, axilReadResp);
end if;

-- Reset
Expand Down
4 changes: 2 additions & 2 deletions protocols/jesd204b/rtl/JesdTxReg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ begin
when others =>
axilWriteResp := AXI_RESP_DECERR_C;
end case;
axiSlaveWriteResponse(v.axilWriteSlave);
axiSlaveWriteResponse(v.axilWriteSlave, axilWriteResp);
end if;

if (axilStatus.readEnable = '1') then
Expand Down Expand Up @@ -321,7 +321,7 @@ begin
when others =>
axilReadResp := AXI_RESP_DECERR_C;
end case;
axiSlaveReadResponse(v.axilReadSlave);
axiSlaveReadResponse(v.axilReadSlave, axilReadResp);
end if;

-- Reset
Expand Down
35 changes: 28 additions & 7 deletions protocols/line-codes/rtl/Code10b12bPkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,41 @@ use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;


library surf;
use surf.StdRtlPkg.all;
--use surf.TextUtilPkg.all;

package Code10b12bPkg is

-- Delcare input constants for commas and other important K_CODES
constant K_28_3_C : slv(9 downto 0) := "0001111100"; -- 0x07C -> 0x8FC, 0x703
constant K_28_11_C : slv(9 downto 0) := "0101111100"; -- 0x17C -> 0x2FC, 0xD03
constant K_28_19_C : slv(9 downto 0) := "1001111100"; -- 0x27C -> 0x4FC, 0xB03
-------------------------------------------------------------------------------------------------
-- Control Symbols Constants
-------------------------------------------------------------------------------------------------
-- These symbols are commas, sequences that can be used for word alignment
constant K_28_3_C : slv(9 downto 0) := b"00011_11100"; -- 0x07C -> 0x8FC, 0x703
constant K_28_11_C : slv(9 downto 0) := b"01011_11100"; -- 0x17C -> 0x2FC, 0xD03
constant K_28_19_C : slv(9 downto 0) := b"10011_11100"; -- 0x27C -> 0x4FC, 0xB03

-- These symbols are not commas but can be used for control sequences
-- Technically any K.28.x character is a valid k-char but these are preffered
constant K_28_5_C : slv(9 downto 0) := b"00101_11100"; -- 0x0BC -> 0x683, 0x97C
constant K_28_6_C : slv(9 downto 0) := b"00110_11100"; -- 0x0DC -> 0x643, 0x9BC
constant K_28_9_C : slv(9 downto 0) := b"01001_11100"; -- 0x13C -> 0x583, 0xA7C
constant K_28_10_C : slv(9 downto 0) := b"01010_11100"; -- 0x15C -> 0xABC, 0x543
constant K_28_12_C : slv(9 downto 0) := b"01100_11100"; -- 0x19C -> 0x4C3, 0xB3C
constant K_28_13_C : slv(9 downto 0) := b"01101_11100"; -- 0x1BC -> 0x37C, 0xC83
constant K_28_14_C : slv(9 downto 0) := b"01110_11100"; -- 0x1DC -> 0x3BC, 0xC43
constant K_28_17_C : slv(9 downto 0) := b"10001_11100"; -- 0x23C -> 0x383, 0xC7C
constant K_28_18_C : slv(9 downto 0) := b"10010_11100"; -- 0x25C -> 0x343, 0xCBC
constant K_28_20_C : slv(9 downto 0) := b"10100_11100"; -- 0x29C -> 0x2C3, 0xD3C
constant K_28_21_C : slv(9 downto 0) := b"10101_11100"; -- 0x2BC -> 0x57C, 0xA83
constant K_28_22_C : slv(9 downto 0) := b"10110_11100"; -- 0x2DC -> 0x5BC, 0xA43
constant K_28_25_C : slv(9 downto 0) := b"11001_11100"; -- 0x33C -> 0x67C, 0x983
constant K_28_26_C : slv(9 downto 0) := b"11010_11100"; -- 0x35C -> 0x6BC, 0x943

constant K_28_10_C : slv(9 downto 0) := "0101011100"; -- 0x15C -> 0xABC, 0x543
constant K_28_21_C : slv(9 downto 0) := "1010111100"; -- 0x2BC -> 0x57C, 0xA83
-------------------------------------------------------------------------------------------------
-- D.7.7 constant helpful for testing
-------------------------------------------------------------------------------------------------
constant D_7_7_C : slv(9 downto 0) := b"00111_00111"; -- 0x0E7 -> 0x1C7, 0x1C7

-------------------------------------------------------------------------------------------------
-- Disparity types and helper functions
Expand Down
24 changes: 13 additions & 11 deletions protocols/pgp/pgp2b/core/rtl/Pgp2bAxi.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -618,13 +618,18 @@ begin

-- Async
process (axilRst, axilReadMaster, axilWriteMaster, r, rxStatusSync, txStatusSync) is
variable v : RegType;
variable axiStatus : AxiLiteStatusType;
variable v : RegType;
variable axiStatus : AxiLiteStatusType;
variable axilWriteResp : slv(1 downto 0);
variable axilReadResp : slv(1 downto 0);
begin
v := r;

axiSlaveWaitTxn(axilWriteMaster, axilReadMaster, v.axilWriteSlave, v.axilReadSlave, axiStatus);

axilWriteResp := ite(axilWriteMaster.awaddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_RESP_DECERR_C);
axilReadResp := ite(axilReadMaster.araddr(1 downto 0) = "00", AXI_RESP_OK_C, AXI_RESP_DECERR_C);

-- Write
if (axiStatus.writeEnable = '1') then

Expand All @@ -647,11 +652,10 @@ begin
v.autoStatus := axilWriteMaster.wdata(0);
when X"18" =>
v.flowCntlDis := ite(WRITE_EN_G, axilWriteMaster.wdata(0), '0');
when others => null;
when others =>
axilWriteResp := AXI_RESP_DECERR_C;
end case;

-- Send Axi response
axiSlaveWriteResponse(v.axilWriteSlave);
axiSlaveWriteResponse(v.axilWriteSlave, axilWriteResp);
end if;

-- Read
Expand Down Expand Up @@ -734,12 +738,10 @@ begin
v.axilReadSlave.rdata(ERROR_CNT_WIDTH_G-1 downto 0) := rxStatusSync.rxOpCodeCount;
when X"80" =>
v.axilReadSlave.rdata(ERROR_CNT_WIDTH_G-1 downto 0) := rxStatusSync.remLinkReadyCnt;

when others => null;
when others =>
axilReadResp := AXI_RESP_DECERR_C;
end case;

-- Send Axi Response
axiSlaveReadResponse(v.axilReadSlave);
axiSlaveReadResponse(v.axilReadSlave, axilReadResp);
end if;

-- Reset
Expand Down
4 changes: 2 additions & 2 deletions protocols/rssi/v1/rtl/RssiAxiLiteRegItf.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ begin
when others =>
axilWriteResp := AXI_RESP_DECERR_C;
end case;
axiSlaveWriteResponse(v.axilWriteSlave);
axiSlaveWriteResponse(v.axilWriteSlave, axilWriteResp);
end if;

if (axilStatus.readEnable = '1') then
Expand Down Expand Up @@ -314,7 +314,7 @@ begin
when others =>
axilReadResp := AXI_RESP_DECERR_C;
end case;
axiSlaveReadResponse(v.axilReadSlave);
axiSlaveReadResponse(v.axilReadSlave, axilReadResp);
end if;

-- Map to chksumEn
Expand Down
Loading

0 comments on commit be45f97

Please sign in to comment.