-
Notifications
You must be signed in to change notification settings - Fork 177
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
wrong type of buffer primitive used in series 7 #438
Comments
Here's some Xilinx forum post claiming it's harmless. I think we should just add the |
SIM_DEVICE enables the correct sim model for the target device as there have been slight behaviour changes, it doesn't actually change anything in synthesis but creates a warning due to being a possible sim/synth mismatch. |
The parameter defaults to "ULTRASCALE", even when synthesizing for 7-series devices. This could lead to a simulation/synthesis mismatch, and causes a warning. Fixes #438.
My ancient Vivado version doesn't have the warning, can you check that #444 fixes this for you? |
it does not; I used this guide https://nmigen.info/nmigen/latest/install.html#editable-development-snapshot to setup a newer version of nmigen, still nothing. furthermore , I discovered that this is not the only primitive it got wrong: here are a few more primitives it got wrong:
|
#444 not working kinda seems like a vivado bug, looking at the log, it correctly reads in the
but then transforms the
Full build directory: build.zip This is for the following design: from arty_z7 import ArtyZ720Platform
from nmigen import *
from nmigen.back.rtlil import convert
class Blinky(Elaboratable):
def __init__(self):
self.led = Signal(reset=0)
def elaborate(self, platform):
m = Module()
counter = Signal(range(int(platform.default_clk_frequency+1)))
m.d.sync += counter.eq(
Mux(counter==int(platform.default_clk_frequency),
0, counter+1))
m.d.sync += self.led.eq(self.led ^ (counter==0))
# if counter is zero, flip the led
return m
class top_level(Elaboratable):
def elaborate(self, platform):
m=Module()
m.submodules.blink = Blinky()
led = platform.request("led", 2)
m.d.comb += led.eq(m.submodules.blink.led)
return m
ArtyZ720Platform().build(top_level(), do_program=True) This is using vivado |
@rroohhh Thanks for investigation. I think I'm going to merge the PR, since it seems to be a clear improvement, even if it doesn't fully fix the problem at the moment. |
The parameter defaults to "ULTRASCALE", even when synthesizing for 7-series devices. This could lead to a simulation/synthesis mismatch, and causes a warning. Fixes #438.
(Reopening as upstream bug.) |
One way to avoid this would be using
|
Ah, I'm fine with that solution too. |
Technically switching to Also this is missing setting Sorry if what I wrote was misleading, I wanted to say if you use |
It works for me for 7series on vivado 2019.2. (Can't test ultrascale as I don't have the ultrascale device support installed) |
Just to mention, I'm hitting this as a bug when using Vivado 2018.2 (which is the version recommended to use for fuzzing 7 series). Output from Vivado is:
The relevant section of top.v is:
I can work around this by removing the line with |
I don't think you're hitting this bug because Xilinx support has been completely rewritten in the meantime. Provided this happens on the |
Will do! |
when I try to elaborate a very simple blinking-led example I wrote, I get this from vivado (2019.2):
it looks to me like nMigen instantiates the wrong primitive for some buffer
The text was updated successfully, but these errors were encountered: