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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [rtl/] [rtc/] [rtc.v] - Diff between revs 45 and 58

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

Rev 45 Rev 58
Line 37... Line 37...
  input [39:0] period_adj,  // 39:32 ns, 31:0 ns_fraction
  input [39:0] period_adj,  // 39:32 ns, 31:0 ns_fraction
 
 
  // time output: for internal with ns fraction
  // time output: for internal with ns fraction
  output [37:0] time_reg_ns,  // 37:8 ns, 7:0 ns_fraction
  output [37:0] time_reg_ns,  // 37:8 ns, 7:0 ns_fraction
  output [47:0] time_reg_sec, // 47:0 sec
  output [47:0] time_reg_sec, // 47:0 sec
 
  // time output: for external with one pps accuracy 
 
  output reg    time_one_pps,
  // time output: for external with ptp standard
  // time output: for external with ptp standard
  output [31:0] time_ptp_ns,  // 31:0 ns
  output [31:0] time_ptp_ns,  // 31:0 ns
  output [47:0] time_ptp_sec  // 47:0 sec
  output [47:0] time_ptp_sec  // 47:0 sec
);
);
 
 
Line 158... Line 160...
assign time_reg_ns  = time_acc_30n_08f;
assign time_reg_ns  = time_acc_30n_08f;
assign time_reg_sec = time_acc_48s;
assign time_reg_sec = time_acc_48s;
// time output (48bit_s + 32bit_ns)
// time output (48bit_s + 32bit_ns)
assign time_ptp_ns  = {2'b00, time_acc_30n_08f[37:8]};
assign time_ptp_ns  = {2'b00, time_acc_30n_08f[37:8]};
assign time_ptp_sec = time_acc_48s;
assign time_ptp_sec = time_acc_48s;
 
// time output one pps
 
always @(posedge rst or posedge clk) begin
 
  if (rst)
 
    time_one_pps <= 1'b0;
 
  else
 
    time_one_pps <= time_acc_48s_inc;
 
end
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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