Skip to content

Commit

Permalink
vendor.xilinx_{7series,ultrascale}: add SIM_DEVICE parameter.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
whitequark committed Jul 22, 2020
1 parent 0899ff3 commit b78e875
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion nmigen/vendor/xilinx_7series.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ def create_missing_domain(self, name):
ready = Signal()
m.submodules += Instance("STARTUPE2", o_EOS=ready)
m.domains += ClockDomain("sync", reset_less=self.default_rst is None)
m.submodules += Instance("BUFGCE", i_CE=ready, i_I=clk_i, o_O=ClockSignal("sync"))
m.submodules += Instance("BUFGCE",
p_SIM_DEVICE="7SERIES",
i_CE=ready,
i_I=clk_i,
o_O=ClockSignal("sync")
)
if self.default_rst is not None:
m.submodules.reset_sync = ResetSynchronizer(rst_i, domain="sync")
return m
Expand Down
7 changes: 6 additions & 1 deletion nmigen/vendor/xilinx_ultrascale.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ def create_missing_domain(self, name):
ready = Signal()
m.submodules += Instance("STARTUPE3", o_EOS=ready)
m.domains += ClockDomain("sync", reset_less=self.default_rst is None)
m.submodules += Instance("BUFGCE", i_CE=ready, i_I=clk_i, o_O=ClockSignal("sync"))
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:
m.submodules.reset_sync = ResetSynchronizer(rst_i, domain="sync")
return m
Expand Down

0 comments on commit b78e875

Please sign in to comment.