SURF  1.0
RawEthFramerPkg.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : RawEthFramerPkg.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2016-05-25
5 -- Last update: 2016-05-26
6 -------------------------------------------------------------------------------
7 -- Description: Raw L2 Ethernet Framer Package File
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_unsigned.all;
21 use ieee.std_logic_arith.all;
22 
23 use work.StdRtlPkg.all;
24 use work.AxiStreamPkg.all;
25 use work.SsiPkg.all;
26 
27 package RawEthFramerPkg is
28 --! @file
29  --! @ingroup ethernet_RawEthFramer
30 
31  -- Ethernet Broadcast Frame
32  constant ETH_BCF_C : integer := 2;
33 
34  -- dataBytes = 8
35  -- tKeepMode = TKEEP_COMP_C;
36  -- tUserMode = TUSER_FIRST_LAST_C;
37  -- tDestBits = 8
38  -- tUserBits = 3
39  constant RAW_ETH_CONFIG_INIT_C : AxiStreamConfigType := ssiAxiStreamConfig(8, TKEEP_COMP_C, TUSER_FIRST_LAST_C, 8, 3);
40 
41  function ssiGetUserBcf (
42  axisConfig : AxiStreamConfigType;
43  axisMaster : AxiStreamMasterType)
44  return sl;
45 
46  procedure ssiSetUserBcf (
47  axisConfig : in AxiStreamConfigType;
48  axisMaster : inout AxiStreamMasterType;
49  bcf : in sl);
50 
51 end package RawEthFramerPkg;
52 
53 package body RawEthFramerPkg is
54 
55  function ssiGetUserBcf (
56  axisConfig : AxiStreamConfigType;
57  axisMaster : AxiStreamMasterType)
58  return sl is
59  variable ret : sl;
60  begin
61  ret := axiStreamGetUserBit(axisConfig, axisMaster, ETH_BCF_C, 0);
62  return ret;
63  end function;
64 
65  procedure ssiSetUserBcf (
66  axisConfig : in AxiStreamConfigType;
67  axisMaster : inout AxiStreamMasterType;
68  bcf : in sl) is
69  begin
70  axiStreamSetUserBit(axisConfig, axisMaster, ETH_BCF_C, bcf, 0);
71  end procedure;
72 
73 end package body RawEthFramerPkg;
AxiStreamConfigType := ssiAxiStreamConfig( 8, TKEEP_COMP_C, TUSER_FIRST_LAST_C, 8, 3) RAW_ETH_CONFIG_INIT_C
sl ssiGetUserBcfaxisConfig,axisMaster,
std_logic sl
Definition: StdRtlPkg.vhd:28
ssiSetUserBcfaxisConfig,axisMaster,bcf,
integer := 2 ETH_BCF_C
_library_ ieeeieee