tag build-Lcls2PrlSlave-0x00000004-20190206141637-charliex Tagger: Charlie Xu Date: Wed Feb 6 14:36:20 2019 -0800 PROJECT: Lcls2PrlSlave FW_VERSION: 0x00000004 BUILD_STRING: Lcls2PrlSlave: Vivado v2016.4, rdsrv222 (x86_64), Built Wed Feb 6 14:16:37 PST 2019 by charliex commit bef443aa7c144b4e1ec8718c8df4f608e29f20c1 Author: Larry Ruckman Date: Tue Feb 5 15:06:35 2019 -0800 AxiRingBufferCtrl FW module and adding 2 more buffers in FW/SW diff --git a/firmware/common/python/common/_axiRingBufferCtrl.py b/firmware/common/python/common/_axiRingBufferCtrl.py index a3bf213..bc629e4 100644 --- a/firmware/common/python/common/_axiRingBufferCtrl.py +++ b/firmware/common/python/common/_axiRingBufferCtrl.py @@ -59,52 +59,10 @@ class AxiRingBufferCtrl(pr.Device): )) self.add(pr.RemoteVariable( - name = 'RedCnt', - description = 'Increments every time there is a 0->1 transition of RED', + name = 'PostTrigDelay', + description = 'Sets the number of samples to log after the trigger', offset = 0x10, - bitSize = 32, - mode = 'RO', - pollInterval = 1, - )) - - self.add(pr.RemoteVariable( - name = 'GreenCnt', - description = 'Increments every time there is a 0->1 transition of GREEN', - offset = 0x14, - bitSize = 32, - mode = 'RO', - pollInterval = 1, - )) - - self.add(pr.RemoteVariable( - name = 'BlueCnt', - description = 'Increments every time there is a 0->1 transition of BLUE', - offset = 0x18, - bitSize = 32, - mode = 'RO', - pollInterval = 1, - )) - - self.add(pr.RemoteVariable( - name = 'PhaseError', - description = 'Current value of phase error', - offset = 0x80, - bitSize = 18, - bitOffset = 0, - mode = 'RO', - pollInterval = 1, - )) - - self.add(pr.RemoteVariable( - name = 'RGB', - description = 'Red Green Blue (RGB) Value', - offset = 0x80, - bitSize = 3, - bitOffset = 29, - mode = 'RO', - pollInterval = 1, - )) - - def countReset(self): - self._rawWrite(0xFC,1) + bitSize = 10, + mode = 'RW', + )) \ No newline at end of file diff --git a/firmware/common/python/common/_top.py b/firmware/common/python/common/_top.py index 1d54cf9..304282a 100644 --- a/firmware/common/python/common/_top.py +++ b/firmware/common/python/common/_top.py @@ -64,7 +64,9 @@ class Top(pyrogue.Device): self.add(lcls_timing_dsp_core.Core(memBase=srp, offset=0x00000000, expand=False)) self.add(pc_261_100_56.AnalogBoard(memBase=srp, offset=0x80000000, expand=False)) self.add(common.HwComm( memBase=srp, offset=0x80200000, expand=True)) - self.add(common.AxiRingBufferCtrl( memBase=srp, offset=0x80300000, expand=True)) + self.add(common.AxiRingBufferCtrl( memBase=srp, offset=0x80300000, expand=True, name='Ring[0]')) + self.add(common.AxiRingBufferCtrl( memBase=srp, offset=0x80400000, expand=True, name='Ring[1]')) + self.add(common.AxiRingBufferCtrl( memBase=srp, offset=0x80500000, expand=True, name='Ring[2]')) if ( sysgen == 'CastMaster' ): self.add(common.CastMaster(memBase=srp, offset=0x80100000, expand=True)) diff --git a/firmware/common/rtl/AxiRingBufferCtrl.vhd b/firmware/common/rtl/AxiRingBufferCtrl.vhd index 8822532..2ae36b3 100644 --- a/firmware/common/rtl/AxiRingBufferCtrl.vhd +++ b/firmware/common/rtl/AxiRingBufferCtrl.vhd @@ -27,12 +27,10 @@ entity AxiRingBufferCtrl is NUM_RING_BUFF_G : positive := 1; RING_BUFF_ADDR_WIDTH_G : positive := 10); port ( - -- System Generator Interface - rgbStatus : in slv(2 downto 0); - phaseError : in slv(17 downto 0); + -- External Trigger Interface + extTrig : in sl; -- Ring Buffer Interface dataValid : out sl; - dataValue : out Slv32Array(NUM_RING_BUFF_G-1 downto 0); bufferEnable : out sl; bufferClear : out sl; -- AXI-Lite Interface @@ -48,43 +46,38 @@ architecture rtl of AxiRingBufferCtrl is type StateType is ( IDLE_S, - LOG_S); + LOG_S, + POST_DLY_S); type RegType is record + extTrig : sl; + dlyCnt : slv(RING_BUFF_ADDR_WIDTH_G-1 downto 0); logCnt : slv(RING_BUFF_ADDR_WIDTH_G-1 downto 0); dataValid : sl; - dataValue : Slv32Array(NUM_RING_BUFF_G-1 downto 0); bufferEnable : sl; bufferClear : sl; start : sl; stop : sl; stopEvent : sl; - rstCnt : sl; decimateSize : slv(31 downto 0); decimateCnt : slv(31 downto 0); - redCnt : slv(31 downto 0); - grnCnt : slv(31 downto 0); - blueCnt : slv(31 downto 0); axilReadSlave : AxiLiteReadSlaveType; axilWriteSlave : AxiLiteWriteSlaveType; state : StateType; end record RegType; constant REG_INIT_C : RegType := ( + extTrig => '0', + dlyCnt => toSlv(2**(RING_BUFF_ADDR_WIDTH_G-1), RING_BUFF_ADDR_WIDTH_G), logCnt => (others => '0'), dataValid => '0', - dataValue => (others => toSlv(0, 32)), bufferEnable => '0', bufferClear => '0', start => '0', stop => '0', stopEvent => '0', - rstCnt => '0', decimateSize => toSlv((100/5)-1, 32), -- Default: 5 MHz decimateCnt => (others => '0'), - redCnt => (others => '0'), - grnCnt => (others => '0'), - blueCnt => (others => '0'), axilReadSlave => AXI_LITE_READ_SLAVE_INIT_C, axilWriteSlave => AXI_LITE_WRITE_SLAVE_INIT_C, state => IDLE_S); @@ -94,8 +87,7 @@ architecture rtl of AxiRingBufferCtrl is begin - comb : process (axilReadMaster, axilRst, axilWriteMaster, phaseError, r, - rgbStatus) is + comb : process (axilReadMaster, axilRst, axilWriteMaster, extTrig, r) is variable v : RegType; variable axilEp : AxiLiteEndpointType; begin @@ -107,7 +99,6 @@ begin v.bufferClear := '0'; v.start := '0'; v.stop := '0'; - v.rstCnt := '0'; -------------------------------------------------------------------------------------------- -- AXI-Lite Transactions @@ -118,42 +109,19 @@ begin axiSlaveRegister (axilEp, x"04", 0, v.start); axiSlaveRegister (axilEp, x"08", 0, v.stop); axiSlaveRegisterR(axilEp, x"0C", 0, ite(r.state = LOG_S, '1', '0')); - axiSlaveRegisterR(axilEp, x"10", 0, r.redCnt); - axiSlaveRegisterR(axilEp, x"14", 0, r.grnCnt); - axiSlaveRegisterR(axilEp, x"18", 0, r.blueCnt); - axiSlaveRegisterR(axilEp, x"80", 0, r.dataValue(0)); - axiSlaveRegister (axilEp, x"FC", 0, v.rstCnt); + axiSlaveRegister (axilEp, x"10", 0, v.dlyCnt); axiSlaveDefault(axilEp, v.axilWriteSlave, v.axilReadSlave, AXI_RESP_DECERR_C); -------------------------------------------------------------------------------------------- - -- Count all 0->1 RED LED transitions - if (r.dataValue(0)(29) = '0') and (rgbStatus(0) = '1') then - v.redCnt := r.redCnt + 1; - end if; - - -- Count all 0->1 GREEN LED transitions - if (r.dataValue(0)(30) = '0') and (rgbStatus(1) = '1') then - v.grnCnt := r.grnCnt + 1; - end if; - - -- Count all 0->1 BLUE LED transitions - if (r.dataValue(0)(31) = '0') and (rgbStatus(2) = '1') then - v.blueCnt := r.blueCnt + 1; - end if; - - -- Check if need to reset the status counters - if (r.rstCnt = '1') then - v.redCnt := (others => '0'); - v.grnCnt := (others => '0'); - v.blueCnt := (others => '0'); - end if; + -- Keep delay copy of trigger + v.extTrig := extTrig; -- Check for a SW stop command if (r.stop = '1') then v.stopEvent := '1'; - -- Check for a 0->1 RED LED transitions - elsif (r.dataValue(0)(29) = '0') and (rgbStatus(0) = '1') then + -- Check for 0->1 extTrig transitions + elsif (r.extTrig = '0') and (extTrig = '1') then v.stopEvent := '1'; end if; @@ -199,26 +167,38 @@ begin if r.logCnt = 0 then -- Check for stop logging event if (r.stopEvent = '1') then + -- Preset the counter + v.logCnt := r.dlyCnt; -- Next state - v.state := IDLE_S; + v.state := POST_DLY_S; end if; else -- Decrement the counter v.logCnt := r.logCnt - 1; end if; end if; + ---------------------------------------------------------------------- + when POST_DLY_S => + -- Check for decimation strobe + if (v.dataValid = '1') then + -- Enable the data logging + v.bufferEnable := '1'; + -- Check for timeout + if r.logCnt = 0 then + -- Next state + v.state := IDLE_S; + else + -- Decrement the counter + v.logCnt := r.logCnt - 1; + end if; + end if; ---------------------------------------------------------------------- end case; - -- Map the waveform capture bits - v.dataValue(0)(17 downto 0) := phaseError; - v.dataValue(0)(31 downto 29) := rgbStatus; - -- Outputs axilReadSlave <= r.axilReadSlave; axilWriteSlave <= r.axilWriteSlave; dataValid <= r.dataValid; - dataValue <= r.dataValue; bufferEnable <= r.bufferEnable; bufferClear <= r.bufferClear; diff --git a/firmware/common/rtl/AxiRingBufferWrapper.vhd b/firmware/common/rtl/AxiRingBufferWrapper.vhd new file mode 100644 index 0000000..8ac052b --- /dev/null +++ b/firmware/common/rtl/AxiRingBufferWrapper.vhd @@ -0,0 +1,131 @@ +------------------------------------------------------------------------------- +-- File : AxiRingBufferWrapper.vhd +-- Company : SLAC National Accelerator Laboratory +------------------------------------------------------------------------------- +-- Description: AXI-Lite Ring Buffer Controller Module +------------------------------------------------------------------------------- +-- This file is part of 'LCLS2-PRL'. +-- It is subject to the license terms in the LICENSE.txt file found in the +-- top-level directory of this distribution and at: +-- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. +-- No part of 'LCLS2-PRL', including this file, +-- may be copied, modified, propagated, or distributed except according to +-- the terms contained in the LICENSE.txt file. +------------------------------------------------------------------------------- + +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; + +use work.StdRtlPkg.all; +use work.AxiLitePkg.all; + +entity AxiRingBufferWrapper is + generic ( + TPD_G : time := 1 ns; + NUM_RING_BUFF_G : positive := 1; + RING_BUFF_ADDR_WIDTH_G : positive := 10; + AXI_BASE_ADDR_G : slv(31 downto 0) := x"0000_0000"); + port ( + dspClk : in sl; + dspRst : in sl; + -- Trigger and Data + extTrig : in sl; + monitor : in Slv32Array(NUM_RING_BUFF_G-1 downto 0); + -- AXI-Lite Interface + axilReadMaster : in AxiLiteReadMasterType; + axilReadSlave : out AxiLiteReadSlaveType; + axilWriteMaster : in AxiLiteWriteMasterType; + axilWriteSlave : out AxiLiteWriteSlaveType); +end AxiRingBufferWrapper; + +architecture rtl of AxiRingBufferWrapper is + + constant NUM_AXIL_MASTERS_C : positive := 1+NUM_RING_BUFF_G; + + constant AXIL_CONFIG_C : AxiLiteCrossbarMasterConfigArray(NUM_AXIL_MASTERS_C-1 downto 0) := genAxiLiteConfig(NUM_AXIL_MASTERS_C, AXI_BASE_ADDR_G, 20, 16); + + signal axilWriteMasters : AxiLiteWriteMasterArray(NUM_AXIL_MASTERS_C-1 downto 0); + signal axilWriteSlaves : AxiLiteWriteSlaveArray(NUM_AXIL_MASTERS_C-1 downto 0); + signal axilReadMasters : AxiLiteReadMasterArray(NUM_AXIL_MASTERS_C-1 downto 0); + signal axilReadSlaves : AxiLiteReadSlaveArray(NUM_AXIL_MASTERS_C-1 downto 0); + + signal dataValid : sl; + signal bufferEnable : sl; + signal bufferClear : sl; + +begin + + -------------------------- + -- AXI-Lite: Crossbar Core + -------------------------- + U_XBAR : entity work.AxiLiteCrossbar + generic map ( + TPD_G => TPD_G, + NUM_SLAVE_SLOTS_G => 1, + NUM_MASTER_SLOTS_G => NUM_AXIL_MASTERS_C, + MASTERS_CONFIG_G => AXIL_CONFIG_C) + port map ( + axiClk => dspClk, + axiClkRst => dspRst, + sAxiWriteMasters(0) => axilWriteMaster, + sAxiWriteSlaves(0) => axilWriteSlave, + sAxiReadMasters(0) => axilReadMaster, + sAxiReadSlaves(0) => axilReadSlave, + mAxiWriteMasters => axilWriteMasters, + mAxiWriteSlaves => axilWriteSlaves, + mAxiReadMasters => axilReadMasters, + mAxiReadSlaves => axilReadSlaves); + + -------------------------------------------- + -- AXI-Lite: AXI-Lite Ring Buffer Controller + -------------------------------------------- + U_RingBufferCtrl : entity work.AxiRingBufferCtrl + generic map ( + TPD_G => TPD_G, + NUM_RING_BUFF_G => NUM_RING_BUFF_G, + RING_BUFF_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_G) + port map ( + -- External Trigger Interface + extTrig => extTrig, + -- Ring Buffer Interface + dataValid => dataValid, + bufferEnable => bufferEnable, + bufferClear => bufferClear, + -- AXI-Lite Interface + axilClk => dspClk, + axilRst => dspRst, + axilReadMaster => axilReadMasters(0), + axilReadSlave => axilReadSlaves(0), + axilWriteMaster => axilWriteMasters(0), + axilWriteSlave => axilWriteSlaves(0)); + + ----------------------------------------- + -- AXI-Lite: AXI-Lite Ring Buffer Modules + ----------------------------------------- + GEN_RING_BUF : for i in NUM_RING_BUFF_G-1 downto 0 generate + U_AxiLiteRingBuffer : entity work.AxiLiteRingBuffer + generic map ( + TPD_G => TPD_G, + -- EXT_CTRL_ONLY_G => true, + DATA_WIDTH_G => 32, + RAM_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_G) + port map ( + -- Data to store in ring buffer + dataClk => dspClk, + dataRst => dspRst, + dataValid => dataValid, + dataValue => monitor(i), + bufferEnable => bufferEnable, + bufferClear => bufferClear, + -- AXI-Lite interface for readout + axilClk => dspClk, + axilRst => dspRst, + axilReadMaster => axilReadMasters(1+i), + axilReadSlave => axilReadSlaves(1+i), + axilWriteMaster => axilWriteMasters(1+i), + axilWriteSlave => axilWriteSlaves(1+i)); + end generate GEN_RING_BUF; + +end rtl; diff --git a/firmware/common/rtl/HwToHwComm.vhd b/firmware/common/rtl/HwToHwComm.vhd index 6c82432..7141dc5 100644 --- a/firmware/common/rtl/HwToHwComm.vhd +++ b/firmware/common/rtl/HwToHwComm.vhd @@ -270,7 +270,7 @@ begin -- Send the data packet v.ibMasters(i).tValid := '1'; v.ibMasters(i).tLast := '1'; - v.ibMasters(i).tData := hwTxData(i); + v.ibMasters(i).tData(127 downto 0) := hwTxData(i); ssiSetUserSof(EMAC_AXIS_CONFIG_C, v.ibMasters(i), '1'); -- Insert the sequence counter @@ -304,7 +304,7 @@ begin -- Forward the data to the sysgen module v.hwRxValid(i) := '1'; - v.hwRxData(i) := obMasters(i).tData; + v.hwRxData(i) := obMasters(i).tData(127 downto 0); -- Check for incorrect sequence counter value if (r.rxSeqCnt(i) /= obMasters(i).tData(31 downto 18)) then diff --git a/firmware/common/rtl/LclsTimingDspApp.vhd b/firmware/common/rtl/LclsTimingDspApp.vhd index 1bf6651..9424de5 100644 --- a/firmware/common/rtl/LclsTimingDspApp.vhd +++ b/firmware/common/rtl/LclsTimingDspApp.vhd @@ -84,16 +84,16 @@ architecture mapping of LclsTimingDspApp is constant AXI_BASE_ADDR_C : slv(31 downto 0) := (others => '0'); - constant NUM_RING_BUFF_G : positive := 1; - constant RING_BUFF_ADDR_WIDTH_G : positive := 10; + constant RING_BUFF_ADDR_WIDTH_C : positive := 10; - constant NUM_AXI_MASTERS_C : positive := 4+NUM_RING_BUFF_G; + constant NUM_AXI_MASTERS_C : positive := 6; constant ANALOG_BOARD_INDEX_C : natural := 0; constant SYSGEN_INDEX_C : natural := 1; constant HW_COMM_INDEX_C : natural := 2; - constant BUFF_CTRL_INDEX_C : natural := 3; - constant RING_BUFF_INDEX_C : natural := 4; + constant RING0_INDEX_C : natural := 3; + constant RING1_INDEX_C : natural := 4; + constant RING2_INDEX_C : natural := 5; constant AXIL_CROSSBAR_CONFIG_C : AxiLiteCrossbarMasterConfigArray(NUM_AXI_MASTERS_C-1 downto 0) := genAxiLiteConfig(NUM_AXI_MASTERS_C, x"80000000", 24, 20); @@ -126,11 +126,6 @@ architecture mapping of LclsTimingDspApp is signal rgbStatus : slv(2 downto 0); signal phaseError : slv(17 downto 0); - signal dataValid : sl; - signal dataValue : Slv32Array(NUM_RING_BUFF_G-1 downto 0); - signal bufferEnable : sl; - signal bufferClear : sl; - begin ------------------ @@ -307,56 +302,76 @@ begin hwObMasters => hwObMasters, hwObSlaves => hwObSlaves); - -------------------------------------------- - -- AXI-Lite: AXI-Lite Ring Buffer Controller - -------------------------------------------- - U_RingBufferCtrl : entity work.AxiRingBufferCtrl + + ------------------------------------ + -- AXI-Lite: AXI-Lite Ring Buffer[0] + ------------------------------------ + U_RingBuffer0 : entity work.AxiRingBufferWrapper generic map ( TPD_G => TPD_G, - NUM_RING_BUFF_G => NUM_RING_BUFF_G, - RING_BUFF_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_G) + NUM_RING_BUFF_G => 1, + RING_BUFF_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_C, + AXI_BASE_ADDR_G => AXIL_CROSSBAR_CONFIG_C(RING0_INDEX_C).baseAddr) port map ( - -- System Generator Interface - rgbStatus => rgbStatus, - phaseError => phaseError, - -- Ring Buffer Interface - dataValid => dataValid, - dataValue => dataValue, - bufferEnable => bufferEnable, - bufferClear => bufferClear, + dspClk => dspClk, + dspRst => dspRst, + -- Trigger and Data + extTrig => rgbStatus(0), -- RED Led + monitor(0)(17 downto 0) => phaseError, + monitor(0)(28 downto 18) => (others => '0'), + monitor(0)(31 downto 29) => rgbStatus, -- AXI-Lite Interface - axilClk => dspClk, - axilRst => dspRst, - axilReadMaster => axilReadMasters(BUFF_CTRL_INDEX_C), - axilReadSlave => axilReadSlaves(BUFF_CTRL_INDEX_C), - axilWriteMaster => axilWriteMasters(BUFF_CTRL_INDEX_C), - axilWriteSlave => axilWriteSlaves(BUFF_CTRL_INDEX_C)); + axilReadMaster => axilReadMasters(RING0_INDEX_C), + axilReadSlave => axilReadSlaves(RING0_INDEX_C), + axilWriteMaster => axilWriteMasters(RING0_INDEX_C), + axilWriteSlave => axilWriteSlaves(RING0_INDEX_C)); - ----------------------------------------- - -- AXI-Lite: AXI-Lite Ring Buffer Modules - ----------------------------------------- - GEN_RING_BUF : for i in NUM_RING_BUFF_G-1 downto 0 generate - U_AxiLiteRingBuffer : entity work.AxiLiteRingBuffer - generic map ( - TPD_G => TPD_G, - DATA_WIDTH_G => 32, - RAM_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_G) - port map ( - -- Data to store in ring buffer - dataClk => dspClk, - dataRst => dspRst, - dataValid => dataValid, - dataValue => dataValue(i), - bufferEnable => bufferEnable, - bufferClear => bufferClear, - -- AXI-Lite interface for readout - axilClk => dspClk, - axilRst => dspRst, - axilReadMaster => axilReadMasters(RING_BUFF_INDEX_C+i), - axilReadSlave => axilReadSlaves(RING_BUFF_INDEX_C+i), - axilWriteMaster => axilWriteMasters(RING_BUFF_INDEX_C+i), - axilWriteSlave => axilWriteSlaves(RING_BUFF_INDEX_C+i)); - end generate GEN_RING_BUF; + ------------------------------------ + -- AXI-Lite: AXI-Lite Ring Buffer[1] + ------------------------------------ + U_RingBuffer1 : entity work.AxiRingBufferWrapper + generic map ( + TPD_G => TPD_G, + NUM_RING_BUFF_G => 1, + RING_BUFF_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_C, + AXI_BASE_ADDR_G => AXIL_CROSSBAR_CONFIG_C(RING1_INDEX_C).baseAddr) + port map ( + dspClk => dspClk, + dspRst => dspRst, + -- Trigger and Data + extTrig => '0', -- Software Trigger only + monitor(0)(17 downto 0) => phaseError, + monitor(0)(28 downto 18) => (others => '0'), + monitor(0)(31 downto 29) => rgbStatus, + -- AXI-Lite Interface + axilReadMaster => axilReadMasters(RING1_INDEX_C), + axilReadSlave => axilReadSlaves(RING1_INDEX_C), + axilWriteMaster => axilWriteMasters(RING1_INDEX_C), + axilWriteSlave => axilWriteSlaves(RING1_INDEX_C)); + + ------------------------------------ + -- AXI-Lite: AXI-Lite Ring Buffer[2] + ------------------------------------ + U_RingBuffer2 : entity work.AxiRingBufferWrapper + generic map ( + TPD_G => TPD_G, + NUM_RING_BUFF_G => 2, + RING_BUFF_ADDR_WIDTH_G => RING_BUFF_ADDR_WIDTH_C, + AXI_BASE_ADDR_G => AXIL_CROSSBAR_CONFIG_C(RING2_INDEX_C).baseAddr) + port map ( + dspClk => dspClk, + dspRst => dspRst, + -- Trigger and Data + extTrig => '0', -- Software Trigger only + monitor(0)(15 downto 0) => adcData(0), + monitor(0)(31 downto 16) => adcData(1), + monitor(1)(15 downto 0) => adcData(2), + monitor(1)(31 downto 16) => adcData(3), + -- AXI-Lite Interface + axilReadMaster => axilReadMasters(RING2_INDEX_C), + axilReadSlave => axilReadSlaves(RING2_INDEX_C), + axilWriteMaster => axilWriteMasters(RING2_INDEX_C), + axilWriteSlave => axilWriteSlaves(RING2_INDEX_C)); --------------- -- Unused Ports diff --git a/firmware/common/yaml/AxiRingBufferCtrl.yaml b/firmware/common/yaml/AxiRingBufferCtrl.yaml index 38d638b..0a97145 100644 --- a/firmware/common/yaml/AxiRingBufferCtrl.yaml +++ b/firmware/common/yaml/AxiRingBufferCtrl.yaml @@ -54,59 +54,12 @@ AxiRingBufferCtrl: &AxiRingBufferCtrl sizeBits: 1 description: Logging Status (0 = not logging, 1 = logging) ######################################################### - RedCnt: + PostTrigDelay: at: offset: 0x10 class: IntField - name: RedCnt - mode: RO - sizeBits: 32 - description: Increments every time there's a 0->1 transition of RED - ######################################################### - GreenCnt: - at: - offset: 0x14 - class: IntField - name: GreenCnt - mode: RO - sizeBits: 32 - description: Increments every time there's a 0->1 transition of GREEN - ######################################################### - BlueCnt: - at: - offset: 0x18 - class: IntField - name: BlueCnt - mode: RO - sizeBits: 32 - description: Increments every time there's a 0->1 transition of BLUE - ######################################################### - PhaseError: - at: - offset: 0x80 - class: IntField - name: PhaseError - mode: RO - sizeBits: 18 - lsBit: 0 - description: Current value of phase error - ######################################################### - RGB: - at: - offset: 0x83 - class: IntField - name: RGB - mode: RO - sizeBits: 3 - lsBit: 5 - description: Red Green Blue (RGB) Value - ######################################################### - ResetStatusCnt: - at: - offset: 0xFC - class: IntField - name: ResetStatusCnt - mode: WO - sizeBits: 1 - description: Reset the status counters + name: PostTrigDelay + mode: RW + sizeBits: 10 + description: Sets the number of samples to log after the trigger ######################################################### diff --git a/firmware/targets/Lcls2PrlMaster/yaml/000TopLevel.yaml b/firmware/targets/Lcls2PrlMaster/yaml/000TopLevel.yaml index d6da13e..29f561e 100644 --- a/firmware/targets/Lcls2PrlMaster/yaml/000TopLevel.yaml +++ b/firmware/targets/Lcls2PrlMaster/yaml/000TopLevel.yaml @@ -36,10 +36,18 @@ mmio: &mmio <<: *HwComm at: offset: 0x80200000 - AxiRingBufferCtrl: + Ring0: <<: *AxiRingBufferCtrl at: - offset: 0x80300000 + offset: 0x80300000 + Ring1: + <<: *AxiRingBufferCtrl + at: + offset: 0x80400000 + Ring2: + <<: *AxiRingBufferCtrl + at: + offset: 0x80500000 NetIODev: ipAddr: 192.168.1.10