SURF  1.0
RawEthFramerWrapper.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : RawEthFramerWrapper.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2016-05-23
5 -- Last update: 2016-05-26
6 -------------------------------------------------------------------------------
7 -- Description: Wrapper for RawEthFramer 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_unsigned.all;
21 use ieee.std_logic_arith.all;
22 
23 use work.StdRtlPkg.all;
24 use work.AxiLitePkg.all;
25 use work.AxiStreamPkg.all;
26 
27 --! @see entity
28  --! @ingroup ethernet_RawEthFramer
30  generic (
31  TPD_G : time := 1 ns;
32  ETH_TYPE_G : slv(15 downto 0) := x"0010"; -- 0x1000 (big-Endian configuration)
34  port (
35  -- Local Configurations
36  localMac : in slv(47 downto 0); -- big-Endian configuration
37  -- Interface to Ethernet Media Access Controller (MAC)
42  -- Interface to Application engine(s)
47  -- AXI-Lite Interface
52  -- Clock and Reset
53  clk : in sl;
54  rst : in sl);
55 end RawEthFramerWrapper;
56 
57 architecture mapping of RawEthFramerWrapper is
58 
59  signal tDest : slv(7 downto 0);
60  signal remoteMac : slv(47 downto 0);
61 
62 begin
63 
64  -----------------------------
65  -- Raw Ethernet Framer Engine
66  -----------------------------
67  U_Core : entity work.RawEthFramer
68  generic map (
69  TPD_G => TPD_G,
71  port map (
72  -- Local Configurations
73  localMac => localMac,
75  tDest => tDest,
76  -- Interface to Ethernet Media Access Controller (MAC)
81  -- Interface to Application engine(s)
86  -- Clock and Reset
87  clk => clk,
88  rst => rst);
89 
90  -----------------
91  -- Remote MAC LUT
92  -----------------
93  U_RemoteMacLut : entity work.AxiDualPortRam
94  generic map (
95  TPD_G => TPD_G,
96  BRAM_EN_G => true,
97  REG_EN_G => false,
98  MODE_G => "read-first",
99  AXI_WR_EN_G => true,
100  SYS_WR_EN_G => false,
101  SYS_BYTE_WR_EN_G => false,
102  COMMON_CLK_G => true,
103  ADDR_WIDTH_G => 8,
104  DATA_WIDTH_G => 48,
105  INIT_G => "0",
107  port map (
108  -- AXI-Lite Interface
109  axiClk => clk,
110  axiRst => rst,
115  -- Standard Port
116  clk => clk,
117  rst => rst,
118  addr => tDest,
119  dout => remoteMac);
120 
121 end mapping;
in axilReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
out obAppSlaveAxiStreamSlaveType
in addrslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
SYS_BYTE_WR_EN_Gboolean := false
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
in ibAppSlaveAxiStreamSlaveType
out obMacSlaveAxiStreamSlaveType
TPD_Gtime := 1 ns
in obAppMasterAxiStreamMasterType
out doutslv( DATA_WIDTH_G- 1 downto 0)
DATA_WIDTH_Ginteger := 32
INIT_Gslv := "0"
out obAppSlaveAxiStreamSlaveType
TPD_Gtime := 1 ns
in obAppMasterAxiStreamMasterType
out ibAppMasterAxiStreamMasterType
out axiReadSlaveAxiLiteReadSlaveType
out ibMacMasterAxiStreamMasterType
in ibMacSlaveAxiStreamSlaveType
slv( 1 downto 0) := "11" AXI_RESP_DECERR_C
Definition: AxiLitePkg.vhd:49
in clksl := '0'
in axiWriteMasterAxiLiteWriteMasterType
COMMON_CLK_Gboolean := false
in ibMacSlaveAxiStreamSlaveType
in localMacslv( 47 downto 0)
SYS_WR_EN_Gboolean := false
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
in obMacMasterAxiStreamMasterType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_DECERR_C
in ibAppSlaveAxiStreamSlaveType
in obMacMasterAxiStreamMasterType
in localMacslv( 47 downto 0)
out axilWriteSlaveAxiLiteWriteSlaveType
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
Definition: AxiLitePkg.vhd:69
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
in rstsl := '0'
in axiReadMasterAxiLiteReadMasterType
out ibAppMasterAxiStreamMasterType
AxiLiteWriteMasterType :=(awaddr =>( others => '0'),awprot =>( others => '0'),awvalid => '0',wdata =>( others => '0'),wstrb =>( others => '1'),wvalid => '0',bready => '1') AXI_LITE_WRITE_MASTER_INIT_C
Definition: AxiLitePkg.vhd:125
out axiWriteSlaveAxiLiteWriteSlaveType
BRAM_EN_Gboolean := false
out obMacSlaveAxiStreamSlaveType
out ibMacMasterAxiStreamMasterType
in remoteMacslv( 47 downto 0)
_library_ ieeeieee
ETH_TYPE_Gslv( 15 downto 0) := x"0010"
MODE_Gstring := "read-first"
ADDR_WIDTH_Ginteger range 1 to ( 2** 24):= 5
REG_EN_Gboolean := true
in axilWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
ETH_TYPE_Gslv( 15 downto 0) := x"0010"
out tDestslv( 7 downto 0)
AXI_WR_EN_Gboolean := true
out axilReadSlaveAxiLiteReadSlaveType
std_logic_vector slv
Definition: StdRtlPkg.vhd:29