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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [rtl/] [tsu/] [ptp_parser.v] - Diff between revs 52 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 52 Rev 56
Line 33... Line 33...
 
 
  output reg        ptp_found,
  output reg        ptp_found,
  output reg [31:0] ptp_infor
  output reg [31:0] ptp_infor
);
);
 
 
 
parameter c_vlan_tpid_1 = 16'h8100;
 
parameter c_vlan_tpid_2 = 16'h88a8;
 
parameter c_vlan_tpid_3 = 16'h9100;
 
 
reg [31:0] int_data_d1;
reg [31:0] int_data_d1;
always @(posedge rst or posedge clk) begin
always @(posedge rst or posedge clk) begin
  if (rst) begin
  if (rst) begin
    int_data_d1  <= 32'h00000000;
    int_data_d1  <= 32'h00000000;
  end
  end
Line 109... Line 113...
    ptp_l4    <= 1'b0;
    ptp_l4    <= 1'b0;
    ptp_event <= 1'b0;
    ptp_event <= 1'b0;
  end
  end
  else begin
  else begin
    // bypass vlan
    // bypass vlan
    if      (int_valid && int_cnt==10'd4 && int_data[31:16]==16'h8100)  // ether_type == cvlan
    if      (int_valid && int_cnt==10'd4 && (int_data[31:16]==c_vlan_tpid_1 || int_data[31:16]==c_vlan_tpid_2 || int_data[31:16]==c_vlan_tpid_3))  // ether_type == vlan
      bypass_vlan <= 1'b1;
 
    else if (int_valid && int_cnt==10'd4 && int_data[31:16]==16'h9100)  // ether_type == svlan
 
      bypass_vlan <= 1'b1;
      bypass_vlan <= 1'b1;
    else if (int_valid && int_cnt==10'd5 && int_data[31:16]==16'h8100 && bypass_vlan)  // svlan_type == cvlan
    else if (int_valid && int_cnt==10'd5 && (int_data[31:16]==c_vlan_tpid_1 || int_data[31:16]==c_vlan_tpid_2 || int_data[31:16]==c_vlan_tpid_3) && bypass_vlan)  // vlan_type == vlan
      bypass_vlan <= 1'b1;
      bypass_vlan <= 1'b1;
    else if (int_valid && bypass_vlan)
    else if (int_valid && bypass_vlan)
      bypass_vlan <= 1'b0;
      bypass_vlan <= 1'b0;
 
 
    // bypass mpls
    // bypass mpls

powered by: WebSVN 2.1.0

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