SURF  1.0
EthMacRxShift.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : EthMacRxShift.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2016-09-08
5 -- Last update: 2016-09-14
6 -------------------------------------------------------------------------------
7 -- Description: Ethernet MAC's RX byte Shifting 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 -------------------------------------------------------------------------------
17 
18 library ieee;
19 use ieee.std_logic_1164.all;
20 use ieee.std_logic_arith.all;
21 use ieee.std_logic_unsigned.all;
22 
23 use work.AxiStreamPkg.all;
24 use work.StdRtlPkg.all;
25 use work.EthMacPkg.all;
26 
27 --! @see entity
28  --! @ingroup ethernet_EthMacCore
29 entity EthMacRxShift is
30  generic (
31  TPD_G : time := 1 ns;
32  SHIFT_EN_G : boolean := false);
33  port (
34  -- Clock and Reset
35  ethClk : in sl;
36  ethRst : in sl;
37  -- AXIS Interface
40  -- Configuration
41  rxShift : in slv(3 downto 0));
42 end EthMacRxShift;
43 
44 architecture mapping of EthMacRxShift is
45 
46 begin
47 
48  U_RxShiftEnGen : if (SHIFT_EN_G = true) generate
49  -- Shift inbound data n bytes to the left.
50  -- This adds bytes of data at start of the packet.
51  U_RxShift : entity work.AxiStreamShift
52  generic map (
53  TPD_G => TPD_G,
55  ADD_VALID_EN_G => true)
56  port map (
57  axisClk => ethClk,
58  axisRst => ethRst,
59  axiStart => '1',
60  axiShiftDir => '0', -- 0 = left (lsb to msb)
63  sAxisSlave => open,
66  end generate;
67 
68  U_RxShiftDisGen : if (SHIFT_EN_G = false) generate
70  end generate;
71 
72 end mapping;
_library_ ieeeieee
out sAxisSlaveAxiStreamSlaveType
std_logic sl
Definition: StdRtlPkg.vhd:28
ADD_VALID_EN_Gboolean := false
SHIFT_EN_Gboolean := false
in sAxisMasterAxiStreamMasterType
in axiShiftCntslv( 3 downto 0)
TPD_Gtime := 1 ns
in sAxisMasterAxiStreamMasterType
out mAxisMasterAxiStreamMasterType
out mAxisMasterAxiStreamMasterType
TPD_Gtime := 1 ns
in rxShiftslv( 3 downto 0)
in mAxisSlaveAxiStreamSlaveType
AxiStreamSlaveType :=(tReady => '1') AXI_STREAM_SLAVE_FORCE_C
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
AxiStreamConfigType :=(TSTRB_EN_C => false,TDATA_BYTES_C => 16,TDEST_BITS_C => 8,TID_BITS_C => 0,TKEEP_MODE_C => TKEEP_COMP_C,TUSER_BITS_C => 4,TUSER_MODE_C => TUSER_FIRST_LAST_C) EMAC_AXIS_CONFIG_C
Definition: EthMacPkg.vhd:58
std_logic_vector slv
Definition: StdRtlPkg.vhd:29