vendor.lattice_machxo*: add MachXO3L support.
This commit is contained in:
parent
868d49eccd
commit
0aef5f4d48
|
@ -43,6 +43,7 @@ nMigen can be used to target any FPGA or ASIC process that accepts behavioral Ve
|
|||
|
||||
* Lattice iCE40 (toolchains: **Yosys+nextpnr**, LSE-iCECube2, Synplify-iCECube2);
|
||||
* Lattice MachXO2 (toolchains: Diamond);
|
||||
* Lattice MachXO3L (toolchains: Diamond);
|
||||
* Lattice ECP5 (toolchains: **Yosys+nextpnr**, Diamond);
|
||||
* Xilinx Spartan 3A (toolchains: ISE);
|
||||
* Xilinx Spartan 6 (toolchains: ISE);
|
||||
|
|
|
@ -4,10 +4,11 @@ from ..hdl import *
|
|||
from ..build import *
|
||||
|
||||
|
||||
__all__ = ["LatticeMachXO2Platform"]
|
||||
__all__ = ["LatticeMachXO2Platform", "LatticeMachXO3LPlatform"]
|
||||
|
||||
|
||||
class LatticeMachXO2Platform(TemplatedPlatform):
|
||||
# MachXO2 and MachXO3L primitives are the same. Handle both using
|
||||
# one class and expose user-aliases for convenience.
|
||||
class LatticeMachXO2Or3LPlatform(TemplatedPlatform):
|
||||
"""
|
||||
Required tools:
|
||||
* ``pnmainc``
|
||||
|
@ -131,7 +132,7 @@ class LatticeMachXO2Platform(TemplatedPlatform):
|
|||
]
|
||||
|
||||
def create_missing_domain(self, name):
|
||||
# Lattice MachXO2 devices have two global set/reset signals: PUR, which is driven at
|
||||
# Lattice MachXO2/MachXO3L devices have two global set/reset signals: PUR, which is driven at
|
||||
# startup by the configuration logic and unconditionally resets every storage element,
|
||||
# and GSR, which is driven by user logic and each storage element may be configured as
|
||||
# affected or unaffected by GSR. PUR is purely asynchronous, so even though it is
|
||||
|
@ -148,8 +149,8 @@ class LatticeMachXO2Platform(TemplatedPlatform):
|
|||
gsr0 = Signal()
|
||||
gsr1 = Signal()
|
||||
m = Module()
|
||||
# There is no end-of-startup signal on MachXO2, but PUR is released after IOB enable,
|
||||
# so a simple reset synchronizer (with PUR as the asynchronous reset) does the job.
|
||||
# There is no end-of-startup signal on MachXO2/MachXO3L, but PUR is released after IOB
|
||||
# enable, so a simple reset synchronizer (with PUR as the asynchronous reset) does the job.
|
||||
m.submodules += [
|
||||
Instance("FD1S3AX", p_GSR="DISABLED", i_CK=clk_i, i_D=~rst_i, o_Q=gsr0),
|
||||
Instance("FD1S3AX", p_GSR="DISABLED", i_CK=clk_i, i_D=gsr0, o_Q=gsr1),
|
||||
|
@ -393,4 +394,7 @@ class LatticeMachXO2Platform(TemplatedPlatform):
|
|||
)
|
||||
return m
|
||||
|
||||
# CDC primitives are not currently specialized for MachXO2.
|
||||
# CDC primitives are not currently specialized for MachXO2/MachXO3L.
|
||||
|
||||
LatticeMachXO2Platform = LatticeMachXO2Or3LPlatform
|
||||
LatticeMachXO3LPlatform = LatticeMachXO2Or3LPlatform
|
Loading…
Reference in a new issue