-
Notifications
You must be signed in to change notification settings - Fork 40
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
Question about the Asyncfifo in the storage class #26
Comments
@cklarhorst: would you mind sharing a minimal design to have a look at it? Just to be sure to analyze things on a similar design. |
Sure, I will try to create a minimal example |
Modified minispartan6 target: minispartan6.py.txt I changed:
Results:
So this time it is the other AsyncFifo (the one in the trigger). For me it seems that both AsyncFifos have that problem. I would expect that the dout of the fifo should already be clocked by Synthesis log:
So no clk on Port B. The relevant verilog part for the asyncfifo looks like:
so maybe the |
I just found out that changing the read & write port mode to results in:
But it would increase latency by one. |
Update: It contains a small module:
Architecture: Fast Counter -> AsyncFIFO -> CSR Now I think that there might be a false path in the AsyncFIFO. I found out that the vivado backend would add an attribute to one of the involved FF (mr_ff) and the ISE backend doesn't do that. In fact the ISE backend doesn't create any false path constraints and also no I'm not sure if I'm now really on the right track here btw. |
@cklarhorst: a false path should indeed be applied on the gray counters of the AsyncFIFO. The false paths are not applied automatically in LiteScope and you have to use |
Regarding the automatic false paths: Vivado: Altera: Others: So if I understood everything correctly I would say that I like that vivado approach the most because I would expect that it breaks early if someone misses a MultiReg. For testing, I just added false path constraints to the minispartan6 by hand:
and it was working. @enjoy-digital Thanks for your help and sorry for the long post. |
Hi again and sorry for the long delay. I wrote a short function for the ISE backend that scans through the generated verilog code in order to call
I know think that I stumbled upon that special case because I used LiteScope (and the AsyncFifo) class to analyze signals in different clocking regions (possible created through PLLs). Function:
@enjoy-digital Do you want to have a PR for this? (I think scanning through the generated source might not be the most elegant solution. Additionally, there doesn't seem to be many people affected by this?) Otherwise, I would like to close this issue. |
There is an AsyncFifo in the storage class (core.py:176):
cdc = stream.AsyncFIFO([("data", data_width)], 4)
which I think is responsible to hand over the data from the scope domain into the sys clock domain.
As expected the code includes a ClockDomainRenamer (core:177):
cdc = ClockDomainsRenamer({"write": "scope", "read": "sys"})(cdc)
but to me it looks like the output of the fifo is still wrongly clocked (in the final design).
Why?
==> I would expect that Port B should have clkB = [sys clk]
==> I would expect to see a "<=" in the sys_clk block.
I then tried to change core.py:220 from
into
in hope to generate such a sys_clk block around the "<=" but it didn't change anything.
So my questions:
always @(posedge sys_clk) begin
blocks around the statements?I hope I provided enough and helpful information.
Thanks in advance for your helpful comments.
The text was updated successfully, but these errors were encountered: