tag build-TargetTemplate-0x00000030-20181008085119-mdewart Tagger: Mitch D'Ewart Date: Mon Oct 8 09:43:09 2018 -0700 PROJECT: TargetTemplate FW_VERSION: 0x00000030 BUILD_STRING: TargetTemplate: Vivado v2018.2, pc95590 (x86_64), Built Mon Oct 8 08:51:19 PDT 2018 by mdewart commit 566bd7c034a9209070c42092f9344cf9408f83f8 Author: Mitch D'Ewart Date: Mon Oct 8 08:50:49 2018 -0700 Build with RtmDigitalDebugV2, connect output triggers diff --git a/firmware/common/CommonTemplate/rtl/AppCore.vhd b/firmware/common/CommonTemplate/rtl/AppCore.vhd index 787aeb6..37748ee 100644 --- a/firmware/common/CommonTemplate/rtl/AppCore.vhd +++ b/firmware/common/CommonTemplate/rtl/AppCore.vhd @@ -181,6 +181,8 @@ architecture mapping of AppCore is signal ckFb : slv(1 downto 0); + signal triggers : slv(7 downto 0); + begin dacValids <= locDacValids; @@ -190,52 +192,52 @@ begin debugValues <= locDebugValues; - ------------------------------ - -- Generate diagnostic messages - ------------------------------ - comb : process (axilRst, r) is - variable v : RegType; - variable i : natural; - begin - -- Latch the current value - v := r; - - -- Reset strobes - v.diagnosticBus.strobe := '0'; - - -- Increment the counter - v.cnt := r.cnt + 1; - - -- Check the counter - if (r.cnt = MAX_CNT_C) then - -- Reset the counter - v.cnt := 0; - -- Set the flag - v.diagnosticBus.strobe := '1'; - -- Increment the counter - v.data := r.data + 1; - -- Load dummy diagnostic data - for i in 31 downto 0 loop - v.diagnosticBus.data(i) := r.data; - end loop; - end if; - - -- Synchronous Reset - if (axilRst = '1') then - v := REG_INIT_C; - end if; - - -- Register the variable for next clock cycle - rin <= v; - - end process comb; - - seq : process (axilClk) is - begin - if (rising_edge(axilClk)) then - r <= rin after TPD_G; - end if; - end process seq; +-- ------------------------------ +-- -- Generate diagnostic messages +-- ------------------------------ +-- comb : process (axilRst, r) is +-- variable v : RegType; +-- variable i : natural; +-- begin +-- -- Latch the current value +-- v := r; +-- +-- -- Reset strobes +-- v.diagnosticBus.strobe := '0'; +-- +-- -- Increment the counter +-- v.cnt := r.cnt + 1; +-- +-- -- Check the counter +-- if (r.cnt = MAX_CNT_C) then +-- -- Reset the counter +-- v.cnt := 0; +-- -- Set the flag +-- v.diagnosticBus.strobe := '1'; +-- -- Increment the counter +-- v.data := r.data + 1; +-- -- Load dummy diagnostic data +-- for i in 31 downto 0 loop +-- v.diagnosticBus.data(i) := r.data; +-- end loop; +-- end if; +-- +-- -- Synchronous Reset +-- if (axilRst = '1') then +-- v := REG_INIT_C; +-- end if; +-- +-- -- Register the variable for next clock cycle +-- rin <= v; +-- +-- end process comb; +-- +-- seq : process (axilClk) is +-- begin +-- if (rising_edge(axilClk)) then +-- r <= rin after TPD_G; +-- end if; +-- end process seq; diagnosticClk <= axilClk; diagnosticRst <= axilRst; @@ -342,13 +344,27 @@ begin ---------------- -- RTM Interface ---------------- - U_Rtm : entity work.RtmMpsLinkNode + U_RTM : entity work.RtmDigitalDebugV2 generic map ( - TPD_G => TPD_G) + TPD_G => TPD_G, + REG_DOUT_EN_G => x"FF", -- '1' = registered, '0' = unregistered + REG_DOUT_MODE_G => x"00", -- If registered enabled, '1' = clk output, '0' = data output + DIVCLK_DIVIDE_G => 1, + CLKFBOUT_MULT_G => 6, + CLKOUT0_DIVIDE_G => 6, + CLKOUT1_DIVIDE_G => 3) -- drives the RTM's jitter clean input clock port port map ( - -- Digital I/O Interface - dout => x"00", + -- Digital I/O interface + dout => triggers, + cout => triggers, din => open, + -- Clock jitter cleaner + recClkIn => timingClk, + recRstIn => timingRst, + recClkOut => open, + recRstOut => open, + cleanClkOut => open, + cleanClkLocked => open, -- AXI-Lite Interface axilClk => axilClk, axilRst => axilRst, @@ -358,12 +374,16 @@ begin axilWriteSlave => axilWriteSlaves(RTM_INDEX_C), ----------------------- -- Application Ports -- - ----------------------- + ----------------------- -- RTM's Low Speed Ports rtmLsP => rtmLsP, rtmLsN => rtmLsN, - -- RTM's Clock Reference + -- RTM's Clock Reference genClkP => genClkP, genClkN => genClkN); + GEN_TRIG : for i in 7 downto 0 generate + triggers(i) <= timingTrig.trigPulse(i); + end generate; + end mapping; diff --git a/firmware/targets/TargetTemplate/Makefile b/firmware/targets/TargetTemplate/Makefile index 7c265e6..9776fc2 100644 --- a/firmware/targets/TargetTemplate/Makefile +++ b/firmware/targets/TargetTemplate/Makefile @@ -46,7 +46,7 @@ export AMC_TYPE_BAY1 = AmcGenericAdcDac export AMC_INTF_BAY1 = # RTM_TYPE & RTM_INTF are defined by application -export RTM_TYPE = RtmMpsLinkNode +export RTM_TYPE = RtmDigitalDebug export RTM_INTF = Version2 ##########################################################################################