File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -454,13 +454,13 @@ always @(posedge clk) begin
454
454
adder_b_reg <= - NS_PER_S;
455
455
adder_cin_reg <= 0 ;
456
456
457
- if (ts_tod_ns_reg[29 ] ) begin
458
- // latter half of second; compute offset for next second
457
+ if (ts_tod_ns_reg[29 : 27 ] == 3'b111 ) begin
458
+ // latter portion of second; compute offset for next second
459
459
adder_b_reg <= - NS_PER_S;
460
460
update_state_reg <= 12 ;
461
461
adder_busy_reg <= 1'b1 ;
462
462
end else begin
463
- // former half of second; compute offset for previous second
463
+ // former portion of second; compute offset for previous second
464
464
adder_b_reg <= NS_PER_S;
465
465
update_state_reg <= 14 ;
466
466
adder_busy_reg <= 1'b1 ;
Original file line number Diff line number Diff line change @@ -255,12 +255,12 @@ async def _run(self):
255
255
self .ts_tod_offset_ns = (self .ts_tod_ns - self .ts_rel_ns ) & 0xffffffff
256
256
257
257
# compute alternate offset
258
- if self .ts_tod_ns & ( 1 << 29 ) :
259
- # latter half of second; compute offset for next second
258
+ if self .ts_tod_ns >> 27 == 7 :
259
+ # latter portion of second; compute offset for next second
260
260
self .ts_tod_alt_s = self .ts_tod_s + 1
261
261
self .ts_tod_alt_offset_ns = (self .ts_tod_offset_ns - 1000000000 ) & 0xffffffff
262
262
else :
263
- # former half of second; compute offset for previous second
263
+ # former portion of second; compute offset for previous second
264
264
self .ts_tod_alt_s = self .ts_tod_s - 1
265
265
self .ts_tod_alt_offset_ns = (self .ts_tod_offset_ns + 1000000000 ) & 0xffffffff
266
266
You can’t perform that action at this time.
0 commit comments