clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
354b7daf12
commit
1d3e5151ba
@ -125,10 +125,7 @@ template <size_t StateCount, typename StateType = int8_t, typename CountType = u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename StateRange>
|
template <typename StateRange> bool requires_range(const StateRange &state_range) const
|
||||||
bool
|
|
||||||
requires_range(const StateRange &state_range)
|
|
||||||
const
|
|
||||||
{
|
{
|
||||||
if (state < 0) {
|
if (state < 0) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -23,13 +23,11 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "nextpnr.h"
|
#include "nextpnr.h"
|
||||||
|
|
||||||
#include "util.h"
|
|
||||||
#include "placer1.h"
|
#include "placer1.h"
|
||||||
#include "placer_heap.h"
|
#include "placer_heap.h"
|
||||||
#include "router1.h"
|
#include "router1.h"
|
||||||
#include "router2.h"
|
#include "router2.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "nextpnr.h"
|
#include "nextpnr.h"
|
||||||
#include "util.h"
|
|
||||||
#include "timing.h"
|
#include "timing.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_BEGIN
|
NEXTPNR_NAMESPACE_BEGIN
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -362,22 +362,29 @@ bool Arch::getArcDelayOverride(const NetInfo *net_info, const PortRef &sink, Del
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (input_wave[0].empty()) {
|
if (input_wave[0].empty()) {
|
||||||
cyclonev->rnode_timing_build_input_wave(src.node, temp, CycloneV::DELAY_MAX, inverted ? mistral::CycloneV::RF_FALL : mistral::CycloneV::RF_RISE, est, input_wave[0]);
|
cyclonev->rnode_timing_build_input_wave(src.node, temp, CycloneV::DELAY_MAX,
|
||||||
cyclonev->rnode_timing_build_input_wave(src.node, temp, CycloneV::DELAY_MAX, inverted ? mistral::CycloneV::RF_RISE : mistral::CycloneV::RF_FALL, est, input_wave[1]);
|
inverted ? mistral::CycloneV::RF_FALL : mistral::CycloneV::RF_RISE,
|
||||||
NPNR_ASSERT(!input_wave[mistral::CycloneV::RF_RISE].empty() && !input_wave[mistral::CycloneV::RF_FALL].empty());
|
est, input_wave[0]);
|
||||||
|
cyclonev->rnode_timing_build_input_wave(src.node, temp, CycloneV::DELAY_MAX,
|
||||||
|
inverted ? mistral::CycloneV::RF_RISE : mistral::CycloneV::RF_FALL,
|
||||||
|
est, input_wave[1]);
|
||||||
|
NPNR_ASSERT(!input_wave[mistral::CycloneV::RF_RISE].empty() &&
|
||||||
|
!input_wave[mistral::CycloneV::RF_FALL].empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int edge = 0; edge != 2; edge++) {
|
for (int edge = 0; edge != 2; edge++) {
|
||||||
auto actual_edge = edge ? inverted ? mistral::CycloneV::RF_RISE : mistral::CycloneV::RF_FALL : inverted ? mistral::CycloneV::RF_FALL : mistral::CycloneV::RF_RISE;
|
auto actual_edge = edge ? inverted ? mistral::CycloneV::RF_RISE : mistral::CycloneV::RF_FALL
|
||||||
|
: inverted ? mistral::CycloneV::RF_FALL
|
||||||
|
: mistral::CycloneV::RF_RISE;
|
||||||
mistral::AnalogSim sim;
|
mistral::AnalogSim sim;
|
||||||
int input = -1;
|
int input = -1;
|
||||||
std::vector<std::pair<mistral::CycloneV::rnode_t, int>> outputs;
|
std::vector<std::pair<mistral::CycloneV::rnode_t, int>> outputs;
|
||||||
cyclonev->rnode_timing_build_circuit(src.node, temp, CycloneV::DELAY_MAX, actual_edge, sim, input, outputs);
|
cyclonev->rnode_timing_build_circuit(src.node, temp, CycloneV::DELAY_MAX, actual_edge, sim, input, outputs);
|
||||||
|
|
||||||
sim.set_input_wave(input, input_wave[edge]);
|
sim.set_input_wave(input, input_wave[edge]);
|
||||||
auto o = std::find_if(outputs.begin(), outputs.end(), [&](std::pair<mistral::CycloneV::rnode_t, int> output) {
|
auto o = std::find_if(
|
||||||
return output.first == dst.node;
|
outputs.begin(), outputs.end(),
|
||||||
});
|
[&](std::pair<mistral::CycloneV::rnode_t, int> output) { return output.first == dst.node; });
|
||||||
NPNR_ASSERT(o != outputs.end());
|
NPNR_ASSERT(o != outputs.end());
|
||||||
|
|
||||||
output_wave[edge].clear();
|
output_wave[edge].clear();
|
||||||
@ -393,7 +400,8 @@ bool Arch::getArcDelayOverride(const NetInfo *net_info, const PortRef &sink, Del
|
|||||||
inverted = !inverted;
|
inverted = !inverted;
|
||||||
}
|
}
|
||||||
|
|
||||||
delay = DelayQuad{delay_t(output_delay_sum[0].mi*1e12), delay_t(output_delay_sum[0].mx*1e12), delay_t(output_delay_sum[1].mi*1e12), delay_t(output_delay_sum[1].mx*1e12)};
|
delay = DelayQuad{delay_t(output_delay_sum[0].mi * 1e12), delay_t(output_delay_sum[0].mx * 1e12),
|
||||||
|
delay_t(output_delay_sum[1].mi * 1e12), delay_t(output_delay_sum[1].mx * 1e12)};
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user