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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [rtl/] [rtc/] [rtc.v] - Diff between revs 22 and 32

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

Rev 22 Rev 32
Line 13... Line 13...
  // 3. precise time adjustment: small time difference adjustment with a time mark
  // 3. precise time adjustment: small time difference adjustment with a time mark
  input adj_ld,
  input adj_ld,
  input [31:0] adj_ld_data,
  input [31:0] adj_ld_data,
  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          
  // 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 ptp standard
 
  output [31:0] time_ptp_ns,  // 31:0 ns
 
  output [47:0] time_ptp_sec  // 47:0 sec
);
);
 
 
reg  [39:0] period_fix;  // 39:32 ns, 31:0 ns_fraction
reg  [39:0] period_fix;  // 39:32 ns, 31:0 ns_fraction
reg  [31:0] adj_cnt;
reg  [31:0] adj_cnt;
reg  [39:0] time_adj;    // 39:32 ns, 31:0 ns_fraction
reg  [39:0] time_adj;    // 39:32 ns, 31:0 ns_fraction
Line 107... Line 110...
end
end
 
 
// time output (48bit_s + 30bit_ns + 8bit_ns_fraction)
// time output (48bit_s + 30bit_ns + 8bit_ns_fraction)
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)
 
assign time_ptp_ns  = {2'b00, time_acc_30n_08f[37:8]};
 
assign time_ptp_sec = time_acc_48s;
 
 
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.