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

Subversion Repositories ha1588

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 8 to Rev 9
    Reverse comparison

Rev 8 → Rev 9

/ha1588/trunk/rtl/tsu/ptp_parser.v
7,10 → 7,10
input ptp_sop,
input ptp_eop,
input [ 1:0] ptp_mod,
input [29:0] ptp_time,
input [31:0] ptp_time,
 
output reg ptp_found,
output reg [41:0] ptp_infor
output reg [51:0] ptp_infor
);
 
reg [31:0] ptp_data_d1;
94,19 → 94,19
always @(posedge rst or posedge clk) begin
if (rst) begin
ptp_found <= 1'b0;
ptp_infor <= 48'd0;
ptp_infor <= 52'd0;
end
else if (ptp_valid_d1 && ptp_sop_d1) begin
ptp_found <= 1'b0;
ptp_infor <= 48'd0;
ptp_infor <= 52'd0;
end
else if (ptp_valid_d1 && ptp_eop_d1) begin
ptp_found <= ptp_event;
ptp_infor <= {ptp_seqid, ptp_msgid[1:0], ptp_time};
ptp_infor <= {ptp_seqid, ptp_msgid, ptp_time}; // 16+4+32
end
else begin
ptp_found <= 1'b0;
ptp_infor <= 48'd0;
ptp_infor <= 52'd0;
end
end
 
/ha1588/trunk/rtl/tsu/tsu_queue.v
8,13 → 8,13
input [7:0] gmii_data,
input rtc_timer_clk,
input [29:0] rtc_timer_in,
input [31:0] rtc_timer_in,
 
input q_rst,
input q_rd_clk,
input q_rd_en,
output [ 7:0] q_rd_stat,
output [47:0] q_rd_data
output [55:0] q_rd_data
);
 
// buffer gmii input
60,10 → 60,10
ts_req_d3 <= ts_req_d2;
end
end
reg [29:0] rtc_time_stamp;
reg [31:0] rtc_time_stamp;
always @(posedge rst or posedge rtc_timer_clk) begin
if (rst)
rtc_time_stamp <= 30'd0;
rtc_time_stamp <= 32'd0;
else
if (ts_req_d2 & !ts_req_d3)
rtc_time_stamp <= rtc_timer_in;
90,10 → 90,10
ts_ack_d3 <= ts_ack_d2;
end
end
reg [29:0] gmii_time_stamp;
reg [31:0] gmii_time_stamp;
always @(posedge rst or posedge gmii_clk) begin
if (rst) begin
gmii_time_stamp <= 30'd0;
gmii_time_stamp <= 32'd0;
ts_ack_clr <= 1'b0;
end
else begin
162,7 → 162,7
// ptp packet parser here
// works at 1/4 gmii_clk frequency, needs multicycle timing constraint
wire ptp_found;
wire [41:0] ptp_infor;
wire [51:0] ptp_infor;
ptp_parser parser(
.clk(gmii_clk),
.rst(rst),
179,7 → 179,7
// ptp time stamp dcfifo
wire q_wr_clk = gmii_clk;
wire q_wr_en = ptp_found;
wire [47:0] q_wr_data = ptp_infor;
wire [55:0] q_wr_data = {4'd0, ptp_infor};
wire [3:0] q_wrusedw;
wire [3:0] q_rdusedw;
 
/ha1588/trunk/rtl/tsu/ptp_queue.v
48,12 → 48,12
wrusedw);
 
input aclr;
input [47:0] data;
input [55:0] data;
input rdclk;
input rdreq;
input wrclk;
input wrreq;
output [47:0] q;
output [55:0] q;
output [3:0] rdusedw;
output [3:0] wrusedw;
`ifndef ALTERA_RESERVED_QIS
64,10 → 64,10
// synopsys translate_on
`endif
 
wire [47:0] sub_wire0;
wire [55:0] sub_wire0;
wire [3:0] sub_wire1;
wire [3:0] sub_wire2;
wire [47:0] q = sub_wire0[47:0];
wire [55:0] q = sub_wire0[55:0];
wire [3:0] wrusedw = sub_wire1[3:0];
wire [3:0] rdusedw = sub_wire2[3:0];
 
90,7 → 90,7
dcfifo_component.lpm_numwords = 16,
dcfifo_component.lpm_showahead = "OFF",
dcfifo_component.lpm_type = "dcfifo",
dcfifo_component.lpm_width = 48,
dcfifo_component.lpm_width = 56,
dcfifo_component.lpm_widthu = 4,
dcfifo_component.overflow_checking = "ON",
dcfifo_component.rdsync_delaypipe = 4,
124,11 → 124,11
// Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
// Retrieval info: PRIVATE: UNDERFLOW_CHECKING NUMERIC "0"
// Retrieval info: PRIVATE: UsedW NUMERIC "1"
// Retrieval info: PRIVATE: Width NUMERIC "48"
// Retrieval info: PRIVATE: Width NUMERIC "56"
// Retrieval info: PRIVATE: dc_aclr NUMERIC "1"
// Retrieval info: PRIVATE: diff_widths NUMERIC "0"
// Retrieval info: PRIVATE: msb_usedw NUMERIC "0"
// Retrieval info: PRIVATE: output_width NUMERIC "48"
// Retrieval info: PRIVATE: output_width NUMERIC "56"
// Retrieval info: PRIVATE: rsEmpty NUMERIC "0"
// Retrieval info: PRIVATE: rsFull NUMERIC "0"
// Retrieval info: PRIVATE: rsUsedW NUMERIC "1"
142,7 → 142,7
// Retrieval info: CONSTANT: LPM_NUMWORDS NUMERIC "16"
// Retrieval info: CONSTANT: LPM_SHOWAHEAD STRING "OFF"
// Retrieval info: CONSTANT: LPM_TYPE STRING "dcfifo"
// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "48"
// Retrieval info: CONSTANT: LPM_WIDTH NUMERIC "56"
// Retrieval info: CONSTANT: LPM_WIDTHU NUMERIC "4"
// Retrieval info: CONSTANT: OVERFLOW_CHECKING STRING "ON"
// Retrieval info: CONSTANT: RDSYNC_DELAYPIPE NUMERIC "4"
151,8 → 151,8
// Retrieval info: CONSTANT: WRITE_ACLR_SYNCH STRING "OFF"
// Retrieval info: CONSTANT: WRSYNC_DELAYPIPE NUMERIC "4"
// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND "aclr"
// Retrieval info: USED_PORT: data 0 0 48 0 INPUT NODEFVAL "data[47..0]"
// Retrieval info: USED_PORT: q 0 0 48 0 OUTPUT NODEFVAL "q[47..0]"
// Retrieval info: USED_PORT: data 0 0 56 0 INPUT NODEFVAL "data[55..0]"
// Retrieval info: USED_PORT: q 0 0 56 0 OUTPUT NODEFVAL "q[55..0]"
// Retrieval info: USED_PORT: rdclk 0 0 0 0 INPUT NODEFVAL "rdclk"
// Retrieval info: USED_PORT: rdreq 0 0 0 0 INPUT NODEFVAL "rdreq"
// Retrieval info: USED_PORT: rdusedw 0 0 4 0 OUTPUT NODEFVAL "rdusedw[3..0]"
160,12 → 160,12
// Retrieval info: USED_PORT: wrreq 0 0 0 0 INPUT NODEFVAL "wrreq"
// Retrieval info: USED_PORT: wrusedw 0 0 4 0 OUTPUT NODEFVAL "wrusedw[3..0]"
// Retrieval info: CONNECT: @aclr 0 0 0 0 aclr 0 0 0 0
// Retrieval info: CONNECT: @data 0 0 48 0 data 0 0 48 0
// Retrieval info: CONNECT: @data 0 0 56 0 data 0 0 56 0
// Retrieval info: CONNECT: @rdclk 0 0 0 0 rdclk 0 0 0 0
// Retrieval info: CONNECT: @rdreq 0 0 0 0 rdreq 0 0 0 0
// Retrieval info: CONNECT: @wrclk 0 0 0 0 wrclk 0 0 0 0
// Retrieval info: CONNECT: @wrreq 0 0 0 0 wrreq 0 0 0 0
// Retrieval info: CONNECT: q 0 0 48 0 @q 0 0 48 0
// Retrieval info: CONNECT: q 0 0 56 0 @q 0 0 56 0
// Retrieval info: CONNECT: rdusedw 0 0 4 0 @rdusedw 0 0 4 0
// Retrieval info: CONNECT: wrusedw 0 0 4 0 @wrusedw 0 0 4 0
// Retrieval info: GEN_FILE: TYPE_NORMAL ptp_queue.v TRUE
/ha1588/trunk/sim/tsu/tsu_queue_tb.v
14,7 → 14,7
reg q_rd_clk;
reg q_rd_en;
wire [ 7:0] q_rd_stat;
wire [47:0] q_rd_data;
wire [55:0] q_rd_data;
 
initial begin
// emulate the hardware behavior when power-up
50,7 → 50,7
.gmii_data(gmii_rxdata),
 
.rtc_timer_clk(rtc_timer_clk),
.rtc_timer_in(rtc_timer_in[29:0]),
.rtc_timer_in(rtc_timer_in[31:0]),
 
.q_rst(rst),
.q_rd_clk(q_rd_clk),
75,7 → 75,7
.gmii_data(gmii_txdata),
 
.rtc_timer_clk(rtc_timer_clk),
.rtc_timer_in(rtc_timer_in[29:0]),
.rtc_timer_in(rtc_timer_in[31:0]),
 
.q_rst(rst),
.q_rd_clk(q_rd_clk),

powered by: WebSVN 2.1.0

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