Go to the documentation of this file. 1 ------------------------------------------------------------------------------- 2 -- File : SsiCmdMasterPulser.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-01-30 5 -- Last update: 2014-05-15 6 ------------------------------------------------------------------------------- 7 -- Description: SSI Command Master Pulser Module 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.numeric_std.
all;
23 use work.SsiCmdMasterPkg.
all;
26 --! @ingroup protocols_ssi 27 entity SsiCmdMasterPulser
is 29 TPD_G : := 1 ns;
-- Simulation FF output delay 30 OUT_POLARITY_G : sl := '1';
31 PULSE_WIDTH_G : positive := 1);
33 -- Local command signal 34 cmdSlaveOut : in SsiCmdMasterType;
36 opCode : in slv(7 downto 0);
37 -- output pulse to sync module 39 -- Local clock and reset 42 end SsiCmdMasterPulser;
44 architecture rtl
of SsiCmdMasterPulser is
46 signal pulse : sl := '0';
47 signal cnt : positive range 1 to (PULSE_WIDTH_G+1) := 1;
55 if rising_edge(locClk) then 57 pulse <= not(OUT_POLARITY_G) after TPD_G;
60 if pulse = OUT_POLARITY_G then 61 cnt <= cnt + 1 after TPD_G;
62 if cnt = PULSE_WIDTH_G then 63 pulse <= not(OUT_POLARITY_G) after TPD_G;
66 elsif cmdSlaveOut.valid = '1' then 67 if cmdSlaveOut.opCode = opCode then 68 pulse <= OUT_POLARITY_G after TPD_G;