Skip to content
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

[syn] Async FIFO gray pointer timing constraints #13011

Closed
eunchan opened this issue Jun 2, 2022 · 8 comments
Closed

[syn] Async FIFO gray pointer timing constraints #13011

eunchan opened this issue Jun 2, 2022 · 8 comments
Assignees
Labels
Component:RTL Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR IP:prim Type:Cleanup Cleanup tasks

Comments

@eunchan
Copy link
Contributor

eunchan commented Jun 2, 2022

Currently, OpenTitan SDC does not include the Async FIFO timing constraints:

  • the max_delay for the gray pointer crossing the clock boundaries.
  • Skew within a clock period of other clock domain to ensure only one bit in gray pointer is changed.
@eunchan eunchan added Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR Type:Cleanup Cleanup tasks Component:RTL IP:prim labels Jun 2, 2022
@eunchan eunchan added this to the Project: M2 milestone Jun 2, 2022
@eunchan eunchan added the Priority:P1 Priority: high label Jun 2, 2022
@eunchan eunchan changed the title [cdc] Async FIFO gray pointer timing constraints [syn] Async FIFO gray pointer timing constraints Jun 2, 2022
@msfschaffner msfschaffner modified the milestones: Project: M2, Project: M3 Oct 14, 2022
@moidx moidx removed the Priority:P1 Priority: high label Mar 17, 2023
@moidx moidx assigned jdonjdon and unassigned tjaychen, eunchan and jeoongp Mar 17, 2023
@moidx moidx modified the milestones: Discrete: M3, Discrete: M2.5 Mar 17, 2023
@moidx moidx assigned a-will and unassigned tjaychen and jdonjdon May 10, 2023
@msfschaffner
Copy link
Contributor

How about we add something like this?
@arnonsha can you check in DC whether this would work?

# make sure this is strict, ideally < TCK/2 where TCK is the fastest clock in the system
set MAX_DELAY 5
set SYNC_PATH u_sync_1/gen_*u_impl*/gen_flops[0]*.u_size_only_reg/Q

# for prim_fifo_async.sv
set_max_delay $MAX_DELAY -from [get_pins *] -to [get_pins sync_wptr/$SYNC_PATH]
set_max_delay $MAX_DELAY -from [get_pins *] -to [get_pins sync_rptr/$SYNC_PATH]

# for prim_fifo_async_sram_adapter.sv
set_max_delay $MAX_DELAY -from [get_pins *] -to [get_pins u_sync_wptr_gray/$SYNC_PATH]
set_max_delay $MAX_DELAY -from [get_pins *] -to [get_pins u_sync_rptr_gray/$SYNC_PATH]

@arnonsha
Copy link
Contributor

I'd be happy to try, but in order not to miss anything, could you please write these constraints in full chip level hierarchy ?

thanks

@msfschaffner
Copy link
Contributor

There are many asynchronous FIFO instances in the design (especially in the crossbar). given that the registers have unique names, it would be more economical to try a wildcard for this. maybe we can dump out the list of matches so that we can review them?

@arnonsha
Copy link
Contributor

wildcards is OK, but what I'm trying to say is that the above constraints won't find any cells.
There are no pins in this path: chip_earlgrey_asic/u_sync_wptr_gray/$SYNC_PATH . You need to give the full path from top level.

For example, I found u_sync_wptr_gray in the following path
top_earlgrey.u_spi_device.u_upload.u_cmdfifo.u_sync_wptr_gray

msfschaffner added a commit to msfschaffner/opentitan that referenced this issue May 13, 2023
See lowRISC#13011 for context.

Signed-off-by: Michael Schaffner <[email protected]>
@msfschaffner
Copy link
Contributor

Oh I see. I think we need to use get_pins -hierarchical since there are many instances. I have drafted something here #18581.

msfschaffner added a commit to msfschaffner/opentitan that referenced this issue May 13, 2023
See lowRISC#13011 for context.

Signed-off-by: Michael Schaffner <[email protected]>
msfschaffner added a commit to msfschaffner/opentitan that referenced this issue May 13, 2023
See lowRISC#13011 for context.

Signed-off-by: Michael Schaffner <[email protected]>
msfschaffner added a commit to msfschaffner/opentitan that referenced this issue May 14, 2023
See lowRISC#13011 for context.

Signed-off-by: Michael Schaffner <[email protected]>
@moidx
Copy link
Contributor

moidx commented May 15, 2023

Targeting for M2.5.1-RC1. This is trending 2023-05-18.

@johngt
Copy link

johngt commented May 26, 2023

@moidx / @msfschaffner for updates

@msfschaffner
Copy link
Contributor

#18581 is merged so I am closing this.

Note that SDC tuning for M2.5.2 is tracked separately: #18775

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL Component:Tooling Issues related to tooling, e.g. tools/scripts for doc, code generation (docgen, reggen), CSR IP:prim Type:Cleanup Cleanup tasks
Projects
None yet
Development

No branches or pull requests

9 participants