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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [rtl/] [tsu/] [tsu.v] - Diff between revs 43 and 44

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

Rev 43 Rev 44
Line 111... Line 111...
    ts_ack_d1 <= ts_ack;
    ts_ack_d1 <= ts_ack;
    ts_ack_d2 <= ts_ack_d1;
    ts_ack_d2 <= ts_ack_d1;
    ts_ack_d3 <= ts_ack_d2;
    ts_ack_d3 <= ts_ack_d2;
  end
  end
end
end
reg [79:0] gmii_time_stamp;
reg [79:0] tsu_time_stamp;
always @(posedge rst or posedge gmii_clk) begin
always @(posedge rst or posedge gmii_clk) begin
  if (rst) begin
  if (rst) begin
    gmii_time_stamp <= 80'd0;
    tsu_time_stamp <= 80'd0;
    ts_ack_clr      <= 1'b0;
    ts_ack_clr      <= 1'b0;
  end
  end
  else begin
  else begin
    if (ts_ack_d2 & !ts_ack_d3) begin
    if (ts_ack_d2 & !ts_ack_d3) begin
      gmii_time_stamp <= rtc_time_stamp;
      tsu_time_stamp <= rtc_time_stamp;
      ts_ack_clr      <= 1'b1;
      ts_ack_clr      <= 1'b1;
    end
    end
    else begin
    else begin
      gmii_time_stamp <= gmii_time_stamp;
      tsu_time_stamp <= tsu_time_stamp;
      ts_ack_clr      <= 1'b0;
      ts_ack_clr      <= 1'b0;
    end
    end
  end
  end
end
end
 
 
Line 224... Line 224...
);
);
 
 
// ptp time stamp dcfifo
// ptp time stamp dcfifo
wire q_wr_clk = gmii_clk;
wire q_wr_clk = gmii_clk;
wire q_wr_en = ptp_found && int_eop_d1;
wire q_wr_en = ptp_found && int_eop_d1;
wire [127:0] q_wr_data = {16'd0, gmii_time_stamp, ptp_infor};  // 16+80+32 bit
wire [127:0] q_wr_data = {16'd0, tsu_time_stamp, ptp_infor};  // 16+80+32 bit
wire [3:0] q_wrusedw;
wire [3:0] q_wrusedw;
wire [3:0] q_rdusedw;
wire [3:0] q_rdusedw;
 
 
ptp_queue queue(
ptp_queue queue(
  .aclr(q_rst),
  .aclr(q_rst),

powered by: WebSVN 2.1.0

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