vendor.xilinx_{7series,ultrascale}: set BUFG* SIM_DEVICE as appropriate.
authorwhitequark <whitequark@whitequark.org>
Wed, 26 Aug 2020 10:18:02 +0000 (10:18 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 26 Aug 2020 15:45:58 +0000 (15:45 +0000)
Fixes #438 (again).

nmigen/vendor/xilinx_7series.py
nmigen/vendor/xilinx_ultrascale.py

index cb95dfda6385c916f4b674181829909a5a1eb5ee..136ab18222cb20520dec1bad56fb8545239eb385 100644 (file)
@@ -317,10 +317,11 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
                 ready = Signal()
                 m.submodules += Instance("STARTUPE2", o_EOS=ready)
                 m.domains += ClockDomain("sync", reset_less=self.default_rst is None)
-                # Actually use BUFGCTRL configured as BUFGCE, since using BUFGCE causes sim/synth
-                # mismatches with Vivado 2019.2, and the suggested workaround (SIM_DEVICE parameter)
-                # breaks Vivado 2017.4.
+                # Actually use BUFGCTRL configured as BUFGCE, since using BUFGCE causes
+                # sim/synth mismatches with Vivado 2019.2, and the suggested workaround
+                # (SIM_DEVICE parameter) breaks Vivado 2017.4.
                 m.submodules += Instance("BUFGCTRL",
+                    p_SIM_DEVICE="7SERIES",
                     i_I0=clk_i,   i_S0=C(1, 1), i_CE0=ready,   i_IGNORE0=C(0, 1),
                     i_I1=C(1, 1), i_S1=C(0, 1), i_CE1=C(0, 1), i_IGNORE1=C(1, 1),
                     o_O=ClockSignal("sync")
index 937b346fa8b67d1bda697e5c1a41deb19a27bc8a..0969ccba455a6f87362e5e539f6d6936258b9e85 100644 (file)
@@ -168,12 +168,10 @@ class XilinxUltraScalePlatform(TemplatedPlatform):
             ready = Signal()
             m.submodules += Instance("STARTUPE3", o_EOS=ready)
             m.domains += ClockDomain("sync", reset_less=self.default_rst is None)
-            # Actually use BUFGCTRL configured as BUFGCE, since using BUFGCE causes sim/synth
-            # mismatches with Vivado 2019.2, and the suggested workaround (SIM_DEVICE parameter)
-            # breaks Vivado 2017.4.
-            m.submodules += Instance("BUFGCTRL",
-                i_I0=clk_i,   i_S0=C(1, 1), i_CE0=ready,   i_IGNORE0=C(0, 1),
-                i_I1=C(1, 1), i_S1=C(0, 1), i_CE1=C(0, 1), i_IGNORE1=C(1, 1),
+            m.submodules += Instance("BUFGCE",
+                p_SIM_DEVICE="ULTRASCALE",
+                i_CE=ready,
+                i_I=clk_i,
                 o_O=ClockSignal("sync")
             )
             if self.default_rst is not None: