|
| 1 | +# NXOSCA and NXPLL is part of LiteX. Modified for Amaranth Nexus Platform (Nate Slager <slagernate@gmail.com>) |
| 2 | +# Copyright (c) 2020 David Corrigan <davidcorrigan714@gmail.com> |
| 3 | +# SPDX-License-Identifier: BSD-2-Clause |
| 4 | + |
| 5 | + |
1 | 6 | from abc import abstractproperty
|
2 | 7 |
|
3 | 8 | from ..hdl import *
|
4 | 9 | from ..build import *
|
5 | 10 |
|
| 11 | +from collections import namedtuple |
| 12 | +import logging |
| 13 | +import math |
| 14 | +import pprint |
| 15 | +from math import log, log10, exp, pi |
| 16 | +from cmath import phase |
| 17 | + |
| 18 | +io_i2 = namedtuple('io_i2',['io', 'i2', 'IPP_CTRL', 'BW_CTL_BIAS', 'IPP_SEL']) |
| 19 | +nx_pll_param_permutation = namedtuple("nx_pll_param_permutation",[ |
| 20 | + "C1","C2","C3","C4","C5","C6", |
| 21 | + "IPP_CTRL","BW_CTL_BIAS","IPP_SEL","CSET","CRIPPLE","V2I_PP_RES","IPI_CMP"]) |
6 | 22 |
|
7 | 23 | __all__ = ["LatticeNexusPlatform"]
|
8 | 24 |
|
@@ -128,7 +144,7 @@ class LatticeNexusPlatform(TemplatedPlatform):
|
128 | 144 | {% for port_name, pin_name, attrs in platform.iter_port_constraints_bits() -%}
|
129 | 145 | ldc_set_location -site {{ '{' }}{{pin_name}}{{ '}' }} {{'['}}get_ports {{port_name}}{{']'}}
|
130 | 146 | {% if attrs -%}
|
131 |
| - ldc_set_port -iobuf {{ '{' }}{%- for key, value in attrs.items() %}{{key}}={{value}}{% endfor %}{{ '}' }} {{'['}}get_ports {{port_name}}{{']'}} |
| 147 | + ldc_set_port -iobuf {{ '{' }}{%- for key, value in attrs.items() %}{{key}}={{value}} {% endfor %}{{ '}' }} {{'['}}get_ports {{port_name}}{{']'}} |
132 | 148 | {% endif %}
|
133 | 149 | {% endfor %}
|
134 | 150 | {% for net_signal, port_signal, frequency in platform.iter_clock_constraints() -%}
|
@@ -322,6 +338,7 @@ def create_missing_domain(self, name):
|
322 | 338 | )
|
323 | 339 | else:
|
324 | 340 | clk_i = self.request(self.default_clk).i
|
| 341 | + |
325 | 342 | if self.default_rst is not None:
|
326 | 343 | rst_i = self.request(self.default_rst).i
|
327 | 344 | else:
|
@@ -754,3 +771,4 @@ def get_diff_input_output(self, pin, port, attrs, invert):
|
754 | 771 |
|
755 | 772 | # CDC primitives are not currently specialized for Nexus.
|
756 | 773 | # While Radiant supports false path constraints; nextpnr-nexus does not.
|
| 774 | + |
0 commit comments