pps_gen_wb
WR Switch PPS generator and RTC
Unit generating PPS signals and acting as a UTC real-time clock
Contents:
1. Memory map summary
2. HDL symbol
3. Register description
3.1. Control Register
3.2. Nanosecond counter register
3.3. UTC Counter register (least-significant part)
3.4. UTC Counter register (most-significant part)
3.5. Nanosecond adjustment register
3.6. UTC Adjustment register (least-significant part)
3.7. UTC Adjustment register (most-significant part)
3.8. External sync control register
→
|
rst_n_i
|
|
Control Register:
|
|
→
|
clk_sys_i
|
|
ppsg_cr_cnt_rst_o
|
→
|
⇒
|
wb_adr_i[2:0]
|
|
ppsg_cr_cnt_en_o
|
→
|
⇒
|
wb_dat_i[31:0]
|
|
ppsg_cr_cnt_adj_o
|
→
|
⇐
|
wb_dat_o[31:0]
|
|
ppsg_cr_cnt_adj_i
|
←
|
→
|
wb_cyc_i
|
|
ppsg_cr_cnt_adj_load_o
|
→
|
⇒
|
wb_sel_i[3:0]
|
|
ppsg_cr_cnt_set_o
|
→
|
→
|
wb_stb_i
|
|
ppsg_cr_pwidth_o[27:0]
|
⇒
|
→
|
wb_we_i
|
|
|
|
←
|
wb_ack_o
|
|
Nanosecond counter register:
|
|
←
|
wb_stall_o
|
|
ppsg_cntr_nsec_i[27:0]
|
⇐
|
|
|
|
|
|
|
|
|
UTC Counter register (least-significant part):
|
|
|
|
|
ppsg_cntr_utclo_i[31:0]
|
⇐
|
|
|
|
|
|
|
|
|
UTC Counter register (most-significant part):
|
|
|
|
|
ppsg_cntr_utchi_i[7:0]
|
⇐
|
|
|
|
|
|
|
|
|
Nanosecond adjustment register:
|
|
|
|
|
ppsg_adj_nsec_o[27:0]
|
⇒
|
|
|
|
ppsg_adj_nsec_wr_o
|
→
|
|
|
|
|
|
|
|
|
UTC Adjustment register (least-significant part):
|
|
|
|
|
ppsg_adj_utclo_o[31:0]
|
⇒
|
|
|
|
ppsg_adj_utclo_wr_o
|
→
|
|
|
|
|
|
|
|
|
UTC Adjustment register (most-significant part):
|
|
|
|
|
ppsg_adj_utchi_o[7:0]
|
⇒
|
|
|
|
ppsg_adj_utchi_wr_o
|
→
|
|
|
|
|
|
|
|
|
External sync control register:
|
|
|
|
|
ppsg_escr_sync_o
|
→
|
|
|
|
ppsg_escr_sync_i
|
←
|
|
|
|
ppsg_escr_sync_load_o
|
→
|
|
|
|
ppsg_escr_pps_valid_o
|
→
|
|
|
|
ppsg_escr_tm_valid_o
|
→
|
HW prefix:
|
ppsg_cr
|
HW address:
|
0x0
|
C prefix:
|
CR
|
C offset:
|
0x0
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
PWIDTH[27:20]
|
|
|
|
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
PWIDTH[19:12]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
PWIDTH[11:4]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
PWIDTH[3:0]
|
CNT_SET
|
CNT_ADJ
|
CNT_EN
|
CNT_RST
|
|
|
|
-
CNT_RST
[write-only]: Reset counter
write 1: resets the counter
write 0: no effect
-
CNT_EN
[read/write]: Enable counter
1: PPS counter is enabled
-
CNT_ADJ
[read/write]: Adjust offset
write 1: Starts adjusting PPS/UTC offsets by adding the values taken from ADJ_NSEC, ADJ_UTCLO, ADJ_UTCHI registers to the current PPS counter value. These registers need to be programmed prior to update.
write 0: no effect
read 0: adjustment operation is done
read 1: adjustment operation is in progress
-
CNT_SET
[write-only]: Set time
write 1: Sets the UTC/PPS counter to values taken from ADJ_NSEC, ADJ_UTCLO, ADJ_UTCHI registers
-
PWIDTH
[read/write]: PPS Pulse width
Width of generated PPS pulses in 125 MHz refernce clock cycles
HW prefix:
|
ppsg_cntr_nsec
|
HW address:
|
0x1
|
C prefix:
|
CNTR_NSEC
|
C offset:
|
0x4
|
Nanosecond part of current time, expressed as number of 125 MHz reference clock cycles
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
CNTR_NSEC[27:24]
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
CNTR_NSEC[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
CNTR_NSEC[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
CNTR_NSEC[7:0]
|
|
|
|
|
|
|
|
-
CNTR_NSEC
[read-only]: Nanosecond counter
HW prefix:
|
ppsg_cntr_utclo
|
HW address:
|
0x2
|
C prefix:
|
CNTR_UTCLO
|
C offset:
|
0x8
|
Lower 32 bits of current UTC time
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
CNTR_UTCLO[31:24]
|
|
|
|
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
CNTR_UTCLO[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
CNTR_UTCLO[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
CNTR_UTCLO[7:0]
|
|
|
|
|
|
|
|
-
CNTR_UTCLO
[read-only]: UTC Counter
HW prefix:
|
ppsg_cntr_utchi
|
HW address:
|
0x3
|
C prefix:
|
CNTR_UTCHI
|
C offset:
|
0xc
|
Highest 8 bits of current UTC time
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
CNTR_UTCHI[7:0]
|
|
|
|
|
|
|
|
-
CNTR_UTCHI
[read-only]: UTC Counter
HW prefix:
|
ppsg_adj_nsec
|
HW address:
|
0x4
|
C prefix:
|
ADJ_NSEC
|
C offset:
|
0x10
|
Adjustment value for nanosecond counter
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
ADJ_NSEC[27:24]
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
ADJ_NSEC[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
ADJ_NSEC[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
ADJ_NSEC[7:0]
|
|
|
|
|
|
|
|
-
ADJ_NSEC
[write-only]: Nanosecond adjustment
HW prefix:
|
ppsg_adj_utclo
|
HW address:
|
0x5
|
C prefix:
|
ADJ_UTCLO
|
C offset:
|
0x14
|
Lower 32 bits of adjustment value for UTC
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
ADJ_UTCLO[31:24]
|
|
|
|
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
ADJ_UTCLO[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
ADJ_UTCLO[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
ADJ_UTCLO[7:0]
|
|
|
|
|
|
|
|
-
ADJ_UTCLO
[write-only]: UTC Counter adjustment
HW prefix:
|
ppsg_adj_utchi
|
HW address:
|
0x6
|
C prefix:
|
ADJ_UTCHI
|
C offset:
|
0x18
|
Highest 8 bits of adjustment value for UTC
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
ADJ_UTCHI[7:0]
|
|
|
|
|
|
|
|
-
ADJ_UTCHI
[write-only]: UTC Counter adjustment
HW prefix:
|
ppsg_escr
|
HW address:
|
0x7
|
C prefix:
|
ESCR
|
C offset:
|
0x1c
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
-
|
-
|
-
|
-
|
-
|
TM_VALID
|
PPS_VALID
|
SYNC
|
-
SYNC
[read/write]: Sync to external PPS input
write 1: Waits until a pulse on external PPS input arrives and re-synchronizes the PPS counter to it
write 0: no effect
read 1: external synchronization done
read 0: external synchronization in progress
-
PPS_VALID
[read/write]: PPS output valid
write 1: PPS output provides reliable 1-PPS signal
write 0: PPS output is invalid
-
TM_VALID
[read/write]: Timecode output(UTC+cycles) valid
write 1: Timecode output provides valid time
write 0: Timecode output does not provide valid time