OpenCores
URL https://opencores.org/ocsvn/gbiteth/gbiteth/trunk

Subversion Repositories gbiteth

[/] [gbiteth/] [trunk/] [rtl/] [rgmii/] [rgmii_tx_top.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 axuan25268
-------------------------------------------------------------------------------
2
-- Title      : 
3
-- Project    : 
4
-------------------------------------------------------------------------------
5
-- File       : rgmii_tx_top.vhd
6
-- Author     : liyi  <alxiuyain@foxmail.com>
7
-- Company    : OE@HUST
8
-- Created    : 2013-05-10
9
-- Last update: 2013-05-20
10
-- Platform   : 
11
-- Standard   : VHDL'93/02
12
-------------------------------------------------------------------------------
13
-- Description: 
14
-------------------------------------------------------------------------------
15
-- Copyright (c) 2013 OE@HUST
16
-------------------------------------------------------------------------------
17
-- Revisions  :
18
-- Date        Version  Author  Description
19
-- 2013-05-10  1.0      liyi    Created
20
-------------------------------------------------------------------------------
21
LIBRARY ieee;
22
USE ieee.std_logic_1164.ALL;
23
USE ieee.numeric_std.ALL;
24
USE work.de2_pkg.ALL;
25
-------------------------------------------------------------------------------
26
ENTITY rgmii_tx_top IS
27
  GENERIC (
28
    IN_SIMULATION : BOOLEAN := FALSE);
29
  PORT (
30
    iWbClk  : IN STD_LOGIC;
31
    iEthClk : IN STD_LOGIC;
32
    iRst_n  : IN STD_LOGIC;
33
 
34
    iWbS2M      : IN  wbSlaveToMasterIF_t;
35
    oWbM2S      : OUT wbMasterToSlaveIF_t;
36
    -- synthesis translate_off
37
    oWbM2S_addr : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
38
    oWbM2S_sel  : OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
39
    oWbM2S_cyc  : OUT STD_LOGIC;
40
    oWbM2S_stb  : OUT STD_LOGIC;
41
    oWbM2S_we   : OUT STD_LOGIC;
42
    oWbM2S_cti  : OUT STD_LOGIC_VECTOR(2 DOWNTO 0);
43
    oWbM2S_bte  : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
44
    iWbS2M_ack  : IN  STD_LOGIC;
45
    iWbS2M_dat  : IN  STD_LOGIC_VECTOR(31 DOWNTO 0);
46
    -- synthesis translate_on
47
 
48
    oEnetTxData : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
49
    oEnetTxEn   : OUT STD_LOGIC;
50
    oEnetTxErr  : OUT STD_LOGIC;
51
 
52
    iWbTxEn       : IN  STD_LOGIC;      -- tx module enable
53
    iWbTxIntEn    : IN  STD_LOGIC;      -- interrupt enable
54
    iWbTxIntClr   : IN  STD_LOGIC;      -- clear interrupt SIGNAL
55
    oWbTxIntInfo  : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
56
    iWbTxDescData : IN  STD_LOGIC_VECTOR(31 DOWNTO 0);
57
    oWbTxDescData : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);
58
    iWbTxDescWr   : IN  STD_LOGIC;
59
    iWbTxDescAddr : IN  STD_LOGIC_VECTOR(8 DOWNTO 2);
60
 
61
    iCheckSumIPGen   : IN STD_LOGIC;
62
    iCheckSumTCPGen  : IN STD_LOGIC;
63
    iCheckSumUDPGen  : IN STD_LOGIC;
64
    iCheckSumICMPGen : IN STD_LOGIC;
65
 
66
    oWbTxInt : OUT STD_LOGIC
67
    );
68
 
69
END ENTITY rgmii_tx_top;
70
-------------------------------------------------------------------------------
71
ARCHITECTURE rtl OF rgmii_tx_top IS
72
  SIGNAL tx_done_info  : STD_LOGIC_VECTOR(31 DOWNTO 0);
73
  SIGNAL tx_data_32    : STD_LOGIC_VECTOR(31 DOWNTO 0);
74
  SIGNAL tx_data_32_wr : STD_LOGIC;
75
  SIGNAL tx_info_32    : STD_LOGIC_VECTOR(31 DOWNTO 0);
76
  SIGNAL tx_info_32_wr : STD_LOGIC;
77
  SIGNAL tx_data_addr  : UNSIGNED(10 DOWNTO 0);
78
 
79
  SIGNAL sof, eof     : STD_LOGIC;
80
  SIGNAL cTxData      : STD_LOGIC_VECTOR(7 DOWNTO 0);
81
  SIGNAL cGenFrame    : STD_LOGIC;
82
  SIGNAL cGenFrameAck : STD_LOGIC;
83
BEGIN  -- ARCHITECTURE rtl
84
 
85
  rgmii_tx_1 : ENTITY work.rgmii_tx
86
    PORT MAP (
87
      iClk         => iEthClk,
88
      iRst_n       => iRst_n,
89
      iTxData      => cTxData,
90
      oSOF         => sof,
91
      iEOF         => eof,
92
      iGenFrame    => cGenFrame,
93
      oGenFrameAck => cGenFrameAck,
94
      oTxData      => oEnetTxData,
95
      oTxEn        => oEnetTxEn,
96
      oTxErr       => oEnetTxErr);
97
 
98
  rgmii_tx_buf_1 : ENTITY work.rgmii_tx_buf
99
    PORT MAP (
100
      iEthClk => iEthClk,
101
      iWbClk  => iWbClk,
102
      iRst_n  => iRst_n,
103
 
104
      oEthTxData      => cTxData,
105
      iEthSOF         => sof,
106
      oEthEOF         => eof,
107
      oEthGenFrame    => cGenFrame,
108
      iEthGenFrameAck => cGenFrameAck,
109
      iWbTxData       => tx_data_32,
110
      iWbTxAddr       => tx_data_addr,
111
      iWbTxDataWr     => tx_data_32_wr,
112
      iWbTxInfo       => tx_info_32,
113
      iWbTxInfoWr     => tx_info_32_wr,
114
      iWbIntEn        => '0',
115
      iWbIntClr       => '0',
116
      oWbInt          => OPEN,
117
      oWbTxInfo       => tx_done_info);
118
 
119
  rgmii_tx_wbm_1 : ENTITY work.rgmii_tx_wbm
120
    GENERIC MAP (
121
      IN_SIMULATION => IN_SIMULATION)
122
    PORT MAP (
123
      iWbClk => iWbClk,
124
      iRst_n => iRst_n,
125
 
126
      oWbM2S      => oWbM2S,
127
      iWbS2M      => iWbS2M,
128
      -- synthesis translate_off
129
      oWbM2S_addr => oWbM2S_addr,
130
      oWbM2S_sel  => oWbM2S_sel,
131
      oWbM2S_cyc  => oWbM2S_cyc,
132
      oWbM2S_stb  => oWbM2S_stb,
133
      oWbM2S_we   => oWbM2S_we,
134
      oWbM2S_cti  => oWbM2S_cti,
135
      oWbM2S_bte  => oWbM2S_bte,
136
      iWbS2M_ack  => iWbS2M_ack,
137
      iWbS2M_dat  => iWbS2M_dat,
138
      -- synthesis translate_on
139
 
140
      iTxDone     => '0',
141
      oTxDoneClr  => OPEN,
142
      iTxDoneInfo => tx_done_info,
143
      oTxData     => tx_data_32,
144
      oTxAddr     => tx_data_addr,
145
      oTxDataWr   => tx_data_32_wr,
146
      oTxInfo     => tx_info_32,
147
      oTxInfoWr   => tx_info_32_wr,
148
 
149
      iCheckSumIPGen   => iCheckSumIPGen,
150
      iCheckSumTCPGen  => iCheckSumTCPGen,
151
      iCheckSumUDPGen  => iCheckSumUDPGen,
152
      iCheckSumICMPGen => iCheckSumICMPGen,
153
 
154
      iWbTxEnable  => iWbTxEn,
155
      oWbTxInt     => oWbTxInt,
156
      iWbTxIntClr  => iWbTxIntClr,
157
      iWbTxIntEn   => iWbTxIntEn,
158
      iWbTxAddr    => iWbTxDescAddr,
159
      iWbTxWE      => iWbTxDescWr,
160
      iWbTxData    => iWbTxDescData,
161
      oWbTxData    => oWbTxDescData,
162
      oWbTxIntInfo => oWbTxIntInfo);
163
 
164
END ARCHITECTURE rtl;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.