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

Subversion Repositories fade_ether_protocol

[/] [fade_ether_protocol/] [trunk/] [stable_jumbo_frames_version/] [fpga/] [src/] [AFCK/] [AFCK_fade_top_4ch.vhd] - Blame information for rev 42

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 wzab
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.numeric_std.all;
4
use work.pkt_ack_pkg.all;
5
use work.desc_mgr_pkg.all;
6
library unisim;
7
use unisim.vcomponents.all;
8 41 wzab
library work;
9 32 wzab
 
10
entity afck_10g_2 is
11
 
12
  port (
13
    gtx10g_txn      : out std_logic_vector(3 downto 0);
14
    gtx10g_txp      : out std_logic_vector(3 downto 0);
15
    gtx10g_rxn      : in  std_logic_vector(3 downto 0);
16
    gtx10g_rxp      : in  std_logic_vector(3 downto 0);
17
    gtx_refclk_n    : in  std_logic;
18
    gtx_refclk_p    : in  std_logic;
19
    gtx_sfp_disable : out std_logic_vector(3 downto 0);
20 36 wzab
    gtx_rate_sel    : out std_logic_vector(3 downto 0);
21 42 wzab
    si570_oe        : out std_logic;
22 32 wzab
    clk_2_n         : in  std_logic;
23
    clk_2_p         : in  std_logic
24
    );
25
 
26
end afck_10g_2;
27
 
28
architecture beh1 of afck_10g_2 is
29
 
30
  constant N_OF_LINKS : integer := 4;
31 42 wzab
 
32 32 wzab
  signal heart_bit : integer := 0;
33
 
34
  signal refclk_p                 : std_logic := '0';
35
  signal refclk_n                 : std_logic := '0';
36
  signal reset                    : std_logic := '0';
37
  signal clk_rst_buf, clk_rst_156 : std_logic := '1';  -- generated reset
38
  signal rst_p                    : std_logic := '1';  -- generated reset
39
  signal rst_cnt                  : integer   := 200000000;
40
 
41
 
42
  signal s_resetdone     : std_logic := '0';
43
  signal core_clk156_out : std_logic := '0';
44
 
45
 
46
  type T_MAC_TABLE is array (0 to N_OF_LINKS-1) of std_logic_vector(47 downto 0);
47
  constant mac_table : T_MAC_TABLE := (
48
 
49
    1 => x"de_ad_fa_de_01_e2",
50
    2 => x"de_ad_fa_de_02_e2",
51
    3 => x"de_ad_fa_de_03_e2"
52
    );
53
 
54
  signal s_txusrclk_out         : std_logic                               := '0';
55
  signal s_txusrclk2_out        : std_logic                               := '0';
56
  signal areset_clk156_out      : std_logic                               := '0';
57
  signal gttxreset_out          : std_logic                               := '0';
58
  signal gtrxreset_out          : std_logic                               := '0';
59
  signal txuserrdy_out          : std_logic                               := '0';
60
  signal reset_counter_done_out : std_logic                               := '0';
61
  signal qplllock_out           : std_logic                               := '0';
62
  signal qplloutclk_out         : std_logic                               := '0';
63
  signal qplloutrefclk_out      : std_logic                               := '0';
64
  type T_XGMII_XD is array (0 to N_OF_LINKS-1) of std_logic_vector(63 downto 0);
65
  signal xgmii_txd              : T_XGMII_XD                              := (others => (others => '0'));
66
  type T_XGMII_XC is array (0 to N_OF_LINKS-1) of std_logic_vector(7 downto 0);
67
  signal xgmii_txc              : T_XGMII_XC                              := (others => (others => '0'));
68
  signal xgmii_rxd              : T_XGMII_XD                              := (others => (others => '0'));
69
  signal xgmii_rxc              : T_XGMII_XC                              := (others => (others => '0'));
70
  signal configuration_vector   : std_logic_vector(535 downto 0)          := (others => '0');
71
  type T_STATUS_VEC is array (0 to N_OF_LINKS-1) of std_logic_vector(447 downto 0);
72
  signal status_vector          : T_STATUS_VEC                            := (others => (others => '0'));
73
  type T_CORE_STATUS is array (0 to N_OF_LINKS-1) of std_logic_vector(7 downto 0);
74
  signal core_status            : T_CORE_STATUS                           := (others => (others => '0'));
75
  signal signal_detect          : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
76
  signal tx_fault               : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
77
  signal drp_req                : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
78
  signal drp_gnt                : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
79
  signal drp_den_o              : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
80
  signal drp_dwe_o              : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
81
  type T_DRP_V16 is array (0 to N_OF_LINKS-1) of std_logic_vector(15 downto 0);
82
  signal drp_daddr_o            : T_DRP_V16                               := (others => (others => '0'));
83
  signal drp_di_o               : T_DRP_V16                               := (others => (others => '0'));
84
  signal drp_drdy_o             : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
85
  signal drp_drpdo_o            : T_DRP_V16                               := (others => (others => '0'));
86
  signal drp_den_i              : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
87
  signal drp_dwe_i              : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
88
 
89
  signal drp_daddr_i : T_DRP_V16                               := (others => (others => '0'));
90
  signal drp_di_i    : T_DRP_V16                               := (others => (others => '0'));
91
  signal drp_drdy_i  : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
92
  signal drp_drpdo_i : T_DRP_V16                               := (others => (others => '0'));
93
  signal tx_disable  : std_logic_vector(N_OF_LINKS-1 downto 0) := (others => '0');
94
 
95
  --signal counter              : integer   := 0;
96
  --signal probe2               : std_logic_vector(2 downto 0);
97
  --signal trig_in, trig_in_ack : std_logic := '0';
98
  signal rst_n      : std_logic := '0';
99
  signal rst1, clk1 : std_logic := '0';
100
  signal hb_led     : std_logic := '0';
101
  signal clk_user   : std_logic;
102
 
103
  component ten_gig_eth_pcs_pma_0 is
104
    port (
105
      dclk                   : in  std_logic;
106 41 wzab
      rxrecclk_out           : out std_logic;
107 32 wzab
      refclk_p               : in  std_logic;
108
      refclk_n               : in  std_logic;
109
      sim_speedup_control    : in  std_logic;
110 41 wzab
      coreclk_out            : out std_logic;
111 32 wzab
      qplloutclk_out         : out std_logic;
112
      qplloutrefclk_out      : out std_logic;
113
      qplllock_out           : out std_logic;
114
      txusrclk_out           : out std_logic;
115
      txusrclk2_out          : out std_logic;
116 42 wzab
      areset_datapathclk_out : out std_logic;
117 32 wzab
      gttxreset_out          : out std_logic;
118
      gtrxreset_out          : out std_logic;
119
      txuserrdy_out          : out std_logic;
120
      reset_counter_done_out : out std_logic;
121
      reset                  : in  std_logic;
122
      gt0_eyescanreset       : in  std_logic;
123
      gt0_eyescantrigger     : in  std_logic;
124
      gt0_rxcdrhold          : in  std_logic;
125
      gt0_txprbsforceerr     : in  std_logic;
126
      gt0_txpolarity         : in  std_logic;
127
      gt0_rxpolarity         : in  std_logic;
128
      gt0_rxrate             : in  std_logic_vector (2 downto 0);
129
      gt0_txpmareset         : in  std_logic;
130
      gt0_rxpmareset         : in  std_logic;
131
      gt0_rxdfelpmreset      : in  std_logic;
132
      gt0_txprecursor        : in  std_logic_vector (4 downto 0);
133
      gt0_txpostcursor       : in  std_logic_vector (4 downto 0);
134
      gt0_txdiffctrl         : in  std_logic_vector (3 downto 0);
135
      gt0_rxlpmen            : in  std_logic;
136
      gt0_eyescandataerror   : out std_logic;
137
      gt0_txbufstatus        : out std_logic_vector (1 downto 0);
138
      gt0_txresetdone        : out std_logic;
139
      gt0_rxresetdone        : out std_logic;
140
      gt0_rxbufstatus        : out std_logic_vector (2 downto 0);
141
      gt0_rxprbserr          : out std_logic;
142
      gt0_dmonitorout        : out std_logic_vector (7 downto 0);
143
      xgmii_txd              : in  std_logic_vector (63 downto 0);
144
      xgmii_txc              : in  std_logic_vector (7 downto 0);
145
      xgmii_rxd              : out std_logic_vector (63 downto 0);
146
      xgmii_rxc              : out std_logic_vector (7 downto 0);
147
      txp                    : out std_logic;
148
      txn                    : out std_logic;
149
      rxp                    : in  std_logic;
150
      rxn                    : in  std_logic;
151
      configuration_vector   : in  std_logic_vector (535 downto 0);
152
      status_vector          : out std_logic_vector (447 downto 0);
153
      core_status            : out std_logic_vector (7 downto 0);
154 41 wzab
      resetdone_out          : out std_logic;
155 32 wzab
      signal_detect          : in  std_logic;
156
      tx_fault               : in  std_logic;
157
      drp_req                : out std_logic;
158
      drp_gnt                : in  std_logic;
159
      drp_den_o              : out std_logic;
160
      drp_dwe_o              : out std_logic;
161
      drp_daddr_o            : out std_logic_vector (15 downto 0);
162
      drp_di_o               : out std_logic_vector (15 downto 0);
163
      drp_drdy_i             : in  std_logic;
164
      drp_drpdo_i            : in  std_logic_vector (15 downto 0);
165
      drp_den_i              : in  std_logic;
166
      drp_dwe_i              : in  std_logic;
167
      drp_daddr_i            : in  std_logic_vector (15 downto 0);
168
      drp_di_i               : in  std_logic_vector (15 downto 0);
169
      drp_drdy_o             : out std_logic;
170
      drp_drpdo_o            : out std_logic_vector (15 downto 0);
171
      pma_pmd_type           : in  std_logic_vector (2 downto 0);
172
      tx_disable             : out std_logic);
173
  end component ten_gig_eth_pcs_pma_0;
174
 
175
  component ten_gig_eth_pcs_pma_1 is
176
    port (
177
      dclk                 : in  std_logic;
178 42 wzab
      rxrecclk_out         : out std_logic;
179
      coreclk              : in  std_logic;
180 32 wzab
      txusrclk             : in  std_logic;
181
      txusrclk2            : in  std_logic;
182 41 wzab
      txoutclk             : out std_logic;
183 32 wzab
      areset               : in  std_logic;
184 42 wzab
      areset_coreclk       : in  std_logic;
185 32 wzab
      gttxreset            : in  std_logic;
186
      gtrxreset            : in  std_logic;
187
      sim_speedup_control  : in  std_logic;
188
      txuserrdy            : in  std_logic;
189
      qplllock             : in  std_logic;
190
      qplloutclk           : in  std_logic;
191
      qplloutrefclk        : in  std_logic;
192
      reset_counter_done   : in  std_logic;
193
      gt0_eyescanreset     : in  std_logic;
194
      gt0_eyescantrigger   : in  std_logic;
195
      gt0_rxcdrhold        : in  std_logic;
196
      gt0_txprbsforceerr   : in  std_logic;
197
      gt0_txpolarity       : in  std_logic;
198
      gt0_rxpolarity       : in  std_logic;
199
      gt0_rxrate           : in  std_logic_vector (2 downto 0);
200
      gt0_txpmareset       : in  std_logic;
201
      gt0_rxpmareset       : in  std_logic;
202
      gt0_rxdfelpmreset    : in  std_logic;
203
      gt0_txprecursor      : in  std_logic_vector (4 downto 0);
204
      gt0_txpostcursor     : in  std_logic_vector (4 downto 0);
205
      gt0_txdiffctrl       : in  std_logic_vector (3 downto 0);
206
      gt0_rxlpmen          : in  std_logic;
207
      gt0_eyescandataerror : out std_logic;
208
      gt0_txbufstatus      : out std_logic_vector (1 downto 0);
209
      gt0_txresetdone      : out std_logic;
210
      gt0_rxresetdone      : out std_logic;
211
      gt0_rxbufstatus      : out std_logic_vector (2 downto 0);
212
      gt0_rxprbserr        : out std_logic;
213
      gt0_dmonitorout      : out std_logic_vector (7 downto 0);
214
      xgmii_txd            : in  std_logic_vector (63 downto 0);
215
      xgmii_txc            : in  std_logic_vector (7 downto 0);
216
      xgmii_rxd            : out std_logic_vector (63 downto 0);
217
      xgmii_rxc            : out std_logic_vector (7 downto 0);
218
      txp                  : out std_logic;
219
      txn                  : out std_logic;
220
      rxp                  : in  std_logic;
221
      rxn                  : in  std_logic;
222
      configuration_vector : in  std_logic_vector (535 downto 0);
223
      status_vector        : out std_logic_vector (447 downto 0);
224
      core_status          : out std_logic_vector (7 downto 0);
225
      tx_resetdone         : out std_logic;
226
      rx_resetdone         : out std_logic;
227
      signal_detect        : in  std_logic;
228
      tx_fault             : in  std_logic;
229
      drp_req              : out std_logic;
230
      drp_gnt              : in  std_logic;
231
      drp_den_o            : out std_logic;
232
      drp_dwe_o            : out std_logic;
233
      drp_daddr_o          : out std_logic_vector (15 downto 0);
234
      drp_di_o             : out std_logic_vector (15 downto 0);
235
      drp_drdy_i           : in  std_logic;
236
      drp_drpdo_i          : in  std_logic_vector (15 downto 0);
237
      drp_den_i            : in  std_logic;
238
      drp_dwe_i            : in  std_logic;
239
      drp_daddr_i          : in  std_logic_vector (15 downto 0);
240
      drp_di_i             : in  std_logic_vector (15 downto 0);
241
      drp_drdy_o           : out std_logic;
242
      drp_drpdo_o          : out std_logic_vector (15 downto 0);
243
      pma_pmd_type         : in  std_logic_vector (2 downto 0);
244
      tx_disable           : out std_logic);
245
  end component ten_gig_eth_pcs_pma_1;
246
 
247
  component fade_one_channel is
248
    generic (
249
      my_mac : std_logic_vector(47 downto 0));
250
    port (
251
      xgmii_txd : out std_logic_vector(63 downto 0);
252
      xgmii_txc : out std_logic_vector(7 downto 0);
253
      xgmii_rxd : in  std_logic_vector(63 downto 0);
254
      xgmii_rxc : in  std_logic_vector(7 downto 0);
255
      rst_n     : in  std_logic;
256
      clk_user  : in  std_logic);
257
  end component fade_one_channel;
258
 
259
begin  -- beh1
260 42 wzab
  si570_oe                  <= '1';
261 32 wzab
  -- Initialization vector
262
  configuration_vector(33)  <= '1';     -- training
263
  configuration_vector(284) <= '1';     -- auto negotiation
264
 
265 42 wzab
  gtx_rate_sel    <= (others => '1');
266 32 wzab
  signal_detect   <= (others => '1');   -- allow transmission!
267
  gtx_sfp_disable <= (others => '0');
268
 
269
  -- Reset generator
270
  process (clk_rst_156) is
271
  begin  -- process
272
    if clk_rst_156'event and clk_rst_156 = '1' then  -- rising clock edge
273
      if rst_cnt > 0 then
274
        rst_cnt <= rst_cnt - 1;
275
      else
276
        rst_p <= '0';
277
      end if;
278
    end if;
279
  end process;
280
 
281
  cmp_gtp_dedicated_clk_buf : IBUFDS_GTE2
282
    -- generic map(
283
    -- DIFF_TERM    => true,
284
    -- IBUF_LOW_PWR => true,
285
    -- IOSTANDARD   => "DEFAULT")
286
    port map (
287
      O     => clk_rst_buf,
288
      ODIV2 => open,
289
      CEB   => '0',
290
      I     => clk_2_p,
291
      IB    => clk_2_n
292
      );
293
 
294
  cmp_clk_ref_buf : BUFG
295
    port map (
296
      O => clk_rst_156,
297
      I => clk_rst_buf);
298
 
299
  rst_n    <= not rst_p;
300
  refclk_n <= gtx_refclk_n;
301
  refclk_p <= gtx_refclk_p;
302
  reset    <= not rst_n;
303
 
304
  --trig_in <= '1' when xgmii_rxc /= x"ff" else '0';
305
  gl1 : for n in 0 to N_OF_LINKS-1 generate
306
 
307
    il1 : if n = 0 generate
308
      ten_gig_eth_pcs_pma_0_1 : ten_gig_eth_pcs_pma_0
309
        port map (
310
          dclk                   => clk_user,
311 42 wzab
          rxrecclk_out           => open,  --??
312 32 wzab
          refclk_p               => refclk_p,
313
          refclk_n               => refclk_n,
314 41 wzab
          sim_speedup_control    => '0',
315 42 wzab
          coreclk_out            => core_clk156_out,
316 41 wzab
          qplloutclk_out         => qplloutclk_out,
317
          qplloutrefclk_out      => qplloutrefclk_out,
318
          qplllock_out           => qplllock_out,
319 32 wzab
          txusrclk_out           => s_txusrclk_out,
320
          txusrclk2_out          => s_txusrclk2_out,
321 42 wzab
          areset_datapathclk_out => areset_clk156_out,
322 32 wzab
          gttxreset_out          => gttxreset_out,
323
          gtrxreset_out          => gtrxreset_out,
324
          txuserrdy_out          => txuserrdy_out,
325
          reset_counter_done_out => reset_counter_done_out,
326 41 wzab
          reset                  => reset,
327
          gt0_eyescanreset       => '0',
328
          gt0_eyescantrigger     => '0',
329
          gt0_rxcdrhold          => '0',
330
          gt0_txprbsforceerr     => '0',
331
          gt0_txpolarity         => '0',
332
          gt0_rxpolarity         => '0',
333
          gt0_rxrate             => (others => '0'),
334
          gt0_txpmareset         => '0',
335
          gt0_rxpmareset         => '0',
336
          gt0_rxdfelpmreset      => '0',
337
          gt0_txprecursor        => (others => '0'),
338
          gt0_txpostcursor       => (others => '0'),
339
          gt0_txdiffctrl         => "1110",
340
          gt0_rxlpmen            => '0',
341
          gt0_eyescandataerror   => open,
342
          gt0_txbufstatus        => open,
343
          gt0_txresetdone        => open,
344
          gt0_rxresetdone        => open,
345
          gt0_rxbufstatus        => open,
346
          gt0_rxprbserr          => open,
347
          gt0_dmonitorout        => open,
348 32 wzab
          xgmii_txd              => xgmii_txd(n),
349
          xgmii_txc              => xgmii_txc(n),
350
          xgmii_rxd              => xgmii_rxd(n),
351
          xgmii_rxc              => xgmii_rxc(n),
352 41 wzab
          txp                    => gtx10g_txp(n),
353
          txn                    => gtx10g_txn(n),
354
          rxp                    => gtx10g_rxp(n),
355
          rxn                    => gtx10g_rxn(n),
356 32 wzab
          configuration_vector   => configuration_vector,
357
          status_vector          => status_vector(n),
358
          core_status            => core_status(n),
359 41 wzab
          resetdone_out          => s_resetdone,
360 32 wzab
          signal_detect          => signal_detect(n),
361
          tx_fault               => tx_fault(n),
362
          drp_req                => drp_req(n),
363
          drp_gnt                => drp_gnt(n),
364
          drp_den_o              => drp_den_o(n),
365
          drp_dwe_o              => drp_dwe_o(n),
366
          drp_daddr_o            => drp_daddr_o(n),
367
          drp_di_o               => drp_di_o(n),
368 41 wzab
          drp_drdy_i             => drp_drdy_i(n),
369
          drp_drpdo_i            => drp_drpdo_i(n),
370 32 wzab
          drp_den_i              => drp_den_i(n),
371
          drp_dwe_i              => drp_dwe_i(n),
372
          drp_daddr_i            => drp_daddr_i(n),
373
          drp_di_i               => drp_di_i(n),
374 41 wzab
          drp_drdy_o             => drp_drdy_o(n),
375
          drp_drpdo_o            => drp_drpdo_o(n),
376 32 wzab
          pma_pmd_type           => "111",
377 41 wzab
          tx_disable             => tx_disable(n)
378 32 wzab
          );
379
 
380
    end generate il1;
381
    il2 : if n /= 0 generate
382 41 wzab
      ten_gig_eth_pcs_pma_1_1 : ten_gig_eth_pcs_pma_1
383 32 wzab
        port map (
384
          dclk                 => clk_user,
385 42 wzab
          rxrecclk_out         => open,  --??
386
          coreclk              => core_clk156_out,
387 32 wzab
          txusrclk             => s_txusrclk_out,
388
          txusrclk2            => s_txusrclk2_out,
389 42 wzab
          txoutclk             => open,
390 32 wzab
          areset               => reset,
391 42 wzab
          areset_coreclk       => areset_clk156_out,
392 32 wzab
          gttxreset            => gttxreset_out,
393
          gtrxreset            => gtrxreset_out,
394
          sim_speedup_control  => '0',
395
          txuserrdy            => txuserrdy_out,
396
          qplllock             => qplllock_out,
397
          qplloutclk           => qplloutclk_out,
398
          qplloutrefclk        => qplloutrefclk_out,
399
          reset_counter_done   => reset_counter_done_out,
400
          gt0_eyescanreset     => '0',
401
          gt0_eyescantrigger   => '0',
402
          gt0_rxcdrhold        => '0',
403
          gt0_txprbsforceerr   => '0',
404
          gt0_txpolarity       => '0',
405
          gt0_rxpolarity       => '0',
406
          gt0_rxrate           => (others => '0'),
407
          gt0_txpmareset       => '0',
408
          gt0_rxpmareset       => '0',
409
          gt0_rxdfelpmreset    => '0',
410
          gt0_txprecursor      => (others => '0'),
411
          gt0_txpostcursor     => (others => '0'),
412
          gt0_txdiffctrl       => "1110",
413
          gt0_rxlpmen          => '0',
414
          gt0_eyescandataerror => open,
415
          gt0_txbufstatus      => open,
416
          gt0_txresetdone      => open,
417
          gt0_rxresetdone      => open,
418
          gt0_rxbufstatus      => open,
419
          gt0_rxprbserr        => open,
420
          gt0_dmonitorout      => open,
421
          xgmii_txd            => xgmii_txd(n),
422
          xgmii_txc            => xgmii_txc(n),
423
          xgmii_rxd            => xgmii_rxd(n),
424
          xgmii_rxc            => xgmii_rxc(n),
425
          txp                  => gtx10g_txp(n),
426
          txn                  => gtx10g_txn(n),
427
          rxp                  => gtx10g_rxp(n),
428
          rxn                  => gtx10g_rxn(n),
429
          configuration_vector => configuration_vector,
430
          status_vector        => status_vector(n),
431
          core_status          => core_status(n),
432
          tx_resetdone         => open,
433
          rx_resetdone         => open,
434
          signal_detect        => signal_detect(n),
435
          tx_fault             => tx_fault(n),
436
          drp_req              => drp_req(n),
437
          drp_gnt              => drp_gnt(n),
438
          drp_den_o            => drp_den_o(n),
439
          drp_dwe_o            => drp_dwe_o(n),
440
          drp_daddr_o          => drp_daddr_o(n),
441
          drp_di_o             => drp_di_o(n),
442
          drp_drdy_i           => drp_drdy_i(n),
443
          drp_drpdo_i          => drp_drpdo_i(n),
444
          drp_den_i            => drp_den_i(n),
445
          drp_dwe_i            => drp_dwe_i(n),
446
          drp_daddr_i          => drp_daddr_i(n),
447
          drp_di_i             => drp_di_i(n),
448
          drp_drdy_o           => drp_drdy_o(n),
449
          drp_drpdo_o          => drp_drpdo_o(n),
450
          pma_pmd_type         => "111",
451
          tx_disable           => tx_disable(n));
452
    end generate il2;
453
 
454
    drp_gnt(n)     <= drp_req(n);
455
    drp_den_i(n)   <= drp_den_o(n);
456
    drp_dwe_i(n)   <= drp_dwe_o(n);
457
    drp_daddr_i(n) <= drp_daddr_o(n);
458
    drp_di_i(n)    <= drp_di_o(n);
459
    drp_drpdo_i(n) <= drp_drpdo_o(n);
460
 
461
    fade_one_channel_1 : entity work.fade_one_channel
462
      generic map (
463
        my_mac => mac_table(n))
464
      port map (
465
        xgmii_txd => xgmii_txd(n),
466
        xgmii_txc => xgmii_txc(n),
467
        xgmii_rxd => xgmii_rxd(n),
468
        xgmii_rxc => xgmii_rxc(n),
469
        rst_n     => rst_n,
470
        clk_user  => clk_user);
471
 
472
 
473
 
474
  end generate gl1;
475
 
476
  rst1     <= core_status(0)(0);
477
  --core_ready <= core_status(0);
478
  clk1     <= core_clk156_out;
479
  clk_user <= core_clk156_out;
480
 
481
  p1 : process (clk1, rst_n)
482
  begin  -- process p1
483
    if rst_n = '0' then                   -- asynchronous reset (active low)
484
      heart_bit <= 0;
485
    elsif clk1'event and clk1 = '1' then  -- rising clock edge
486
      if heart_bit < 80000000 then
487
        heart_bit <= heart_bit + 1;
488
      else
489
        heart_bit <= 0;
490
        hb_led    <= not hb_led;
491
      end if;
492
    end if;
493
  end process p1;
494
 
495
 
496
end beh1;

powered by: WebSVN 2.1.0

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