aboutsummaryrefslogtreecommitdiffstats
path: root/nexus
diff options
context:
space:
mode:
authorMaciej Kurc <mkurc@antmicro.com>2022-03-15 12:35:10 +0100
committerMaciej Kurc <mkurc@antmicro.com>2022-03-16 09:20:15 +0100
commit237391c1b8047d248dc5aa27c7d78edeb86f61e9 (patch)
tree04a63ab197608a36494e1679059ae47f32723aa8 /nexus
parent43861c0ee298c4d2a5cc89a42e816299c7f86138 (diff)
downloadnextpnr-237391c1b8047d248dc5aa27c7d78edeb86f61e9.tar.gz
nextpnr-237391c1b8047d248dc5aa27c7d78edeb86f61e9.tar.bz2
nextpnr-237391c1b8047d248dc5aa27c7d78edeb86f61e9.zip
nexus: Corrected auto frequency constraint for LF output of OSCA
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Diffstat (limited to 'nexus')
-rw-r--r--nexus/pack.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/nexus/pack.cc b/nexus/pack.cc
index cc86699a..bb62ec85 100644
--- a/nexus/pack.cc
+++ b/nexus/pack.cc
@@ -2000,7 +2000,7 @@ struct NexusPacker
copy_constraint(ci, id_CLKI, id_CLKO, 1);
} else if (ci->type == id_DCS) {
// For DCC copy the worst case ("fastest") constraint
- delay_t period_clk0, period_clk1;
+ delay_t period_clk0 = 0, period_clk1 = 0;
bool have_clk0 = get_period(ci, id_CLK0, period_clk0);
bool have_clk1 = get_period(ci, id_CLK1, period_clk1);
if (have_clk0 && !have_clk1) {
@@ -2014,7 +2014,7 @@ struct NexusPacker
int div = int_or_default(ci->params, id_HF_CLK_DIV, 128);
const float tol = 1.07f; // OSCA has +/-7% frequency tolerance, assume the worst case.
set_period(ci, id_HFCLKOUT, delay_t((1.0e6 / 450) * (div + 1) / tol));
- set_period(ci, id_LFCLKOUT, delay_t((1.0e3 / 10) / tol));
+ set_period(ci, id_LFCLKOUT, delay_t((1.0e9 / 32) / tol));
} else if (ci->type == id_PLL_CORE) {
static const std::array<IdString, 6> div{id_DIVA, id_DIVB, id_DIVC, id_DIVD, id_DIVE, id_DIVF};
static const std::array<IdString, 6> output{id_CLKOP, id_CLKOS, id_CLKOS2,