Skip to content

duc - Pipeline PhasedAccu for n>8 and allow non-log(2) values of n when n>8 #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JILAelec
Copy link

This patch was added with the Artiq EFC LTC2K variant in order to get timing closure for n>8. We also needed non-log(2) phases so that requirement is also lifted with the patch.

@sbourdeauducq sbourdeauducq requested a review from Spaqin July 16, 2025 13:48
@Spaqin
Copy link
Contributor

Spaqin commented Jul 17, 2025

Looks good to me, nice to see tests extended as well.

@@ -205,11 +205,13 @@ def __init__(self, width, constants):

###

self.latency = 2 if n > 8 else 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latency should be 0 for comb.

@@ -223,11 +225,25 @@ def __init__(self, width, constants):
if n > 5:
ctx += o[5].eq(i + (i << 2))
if n > 6:
ctx += o[6].eq(o[3] << 1)
ctx += o[6].eq((i << 2) + (i << 1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually make a difference?

if n > 14:
ctx += o[14].eq((i << 3) + (i << 2) + (i << 1))
if n > 15:
ctx += o[15].eq(i + (i << 3) + (i << 2) + (i << 1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the entire list be generated programmatically?

Also I'd have thought Vivado would do these optimizations already if you simply write *3, *4, *5, etc.

@sbourdeauducq
Copy link
Member

Are these modifications compatible with https://github.com/quartiq/phaser ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants