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

Subversion Repositories loadbalancer

[/] [loadbalancer/] [trunk/] [ethernet_parser.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 atalla
///////////////////////////////////////////////////////////////////////////////
2
// $Id: ethernet_parser.v 1976 2007-07-20 00:59:57Z grg $
3
//
4
// Module: ethernet_parser.v
5
// Project: NF2.1
6
// Description: parses the Ethernet header for a 32 or 64 bit datapath
7
//
8
///////////////////////////////////////////////////////////////////////////////
9
`timescale 1ns/1ps
10
  module ethernet_parser
11
    #(parameter DATA_WIDTH = 64,
12
      parameter CTRL_WIDTH=DATA_WIDTH/8,
13
      parameter NUM_IQ_BITS = 3,
14
      parameter INPUT_ARBITER_STAGE_NUM = 2
15
      )
16
   (// --- Interface to the previous stage
17
    input  [DATA_WIDTH-1:0]            in_data,
18
    input  [CTRL_WIDTH-1:0]            in_ctrl,
19
    input                              in_wr,
20
 
21
    // --- Interface to output_port_lookup
22
 
23
    output                             eth_done,
24
    output [NUM_IQ_BITS-1:0]           src_port,
25
 
26
    // --- Misc
27
 
28
    input                              reset,
29
    input                              clk
30
   );
31
 
32
   generate
33
   genvar i;
34
   if(DATA_WIDTH==64) begin: eth_parser_64bit
35
      ethernet_parser_64bit
36
        #(
37
          .NUM_IQ_BITS(NUM_IQ_BITS),
38
          .INPUT_ARBITER_STAGE_NUM(INPUT_ARBITER_STAGE_NUM))
39
         eth_parser
40
           (.in_data(in_data),
41
            .in_ctrl(in_ctrl),
42
            .in_wr(in_wr),
43
            .eth_done (eth_done),
44
            .src_port(src_port),
45
            .reset(reset),
46
            .clk(clk));
47
   end // block: eth_parser_64bit
48
   else if(DATA_WIDTH==32) begin: eth_parser_32bit
49
      ethernet_parser_32bit
50
        #(
51
          .NUM_IQ_BITS(NUM_IQ_BITS),
52
          .INPUT_ARBITER_STAGE_NUM(INPUT_ARBITER_STAGE_NUM))
53
         eth_parser
54
           (.in_data(in_data),
55
            .in_ctrl(in_ctrl),
56
            .in_wr(in_wr),
57
            .dst_mac (dst_mac),
58
            .src_mac(src_mac),
59
            .ethertype (ethertype),
60
            .eth_done (eth_done),
61
            .src_port(src_port),
62
            .reset(reset),
63
            .clk(clk));
64
   end // block: eth_parser_32bit
65
   endgenerate
66
 
67
 
68
 
69
endmodule // ethernet_parser_64bit

powered by: WebSVN 2.1.0

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