clangformat
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
801675a2c6
commit
23f2fff1c8
@ -318,7 +318,7 @@ class SAPlacer
|
||||
"%.0f, wirelen = %.0f, dia = %d, Ra = %.02f \n",
|
||||
iter, temp, double(curr_timing_cost), double(curr_wirelen_cost), diameter, Raccept);
|
||||
|
||||
if (curr_wirelen_cost < 0.95 * avg_wirelen && curr_wirelen_cost > 0) {
|
||||
if (curr_wirelen_cost < 0.95 * avg_wirelen && curr_wirelen_cost > 0) {
|
||||
avg_wirelen = 0.8 * avg_wirelen + 0.2 * curr_wirelen_cost;
|
||||
} else {
|
||||
double diam_next = diameter * (1.0 - 0.44 + Raccept);
|
||||
|
@ -904,10 +904,9 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p
|
||||
if (!warn_on_failure || passed)
|
||||
log_info("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",
|
||||
clock_name.c_str(), clock_fmax[clock.first], passed ? "PASS" : "FAIL", target);
|
||||
else
|
||||
if (bool_or_default(ctx->settings, ctx->id("timing/allowFail"), false))
|
||||
else if (bool_or_default(ctx->settings, ctx->id("timing/allowFail"), false))
|
||||
log_warning("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",
|
||||
clock_name.c_str(), clock_fmax[clock.first], passed ? "PASS" : "FAIL", target);
|
||||
clock_name.c_str(), clock_fmax[clock.first], passed ? "PASS" : "FAIL", target);
|
||||
else
|
||||
log_nonfatal_error("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",
|
||||
clock_name.c_str(), clock_fmax[clock.first], passed ? "PASS" : "FAIL", target);
|
||||
|
27
ecp5/arch.h
27
ecp5/arch.h
@ -448,25 +448,28 @@ struct ArchArgs
|
||||
} speed = SPEED_6;
|
||||
};
|
||||
|
||||
struct DelayKey {
|
||||
struct DelayKey
|
||||
{
|
||||
IdString celltype, from, to;
|
||||
inline bool operator==(const DelayKey &other) const {
|
||||
inline bool operator==(const DelayKey &other) const
|
||||
{
|
||||
return celltype == other.celltype && from == other.from && to == other.to;
|
||||
}
|
||||
};
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
namespace std {
|
||||
template<>
|
||||
struct hash<NEXTPNR_NAMESPACE_PREFIX DelayKey> {
|
||||
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX DelayKey &dk) const noexcept {
|
||||
std::size_t seed = std::hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(dk.celltype);
|
||||
seed ^= std::hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(dk.from) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
seed ^= std::hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(dk.to) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
}
|
||||
template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DelayKey>
|
||||
{
|
||||
std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX DelayKey &dk) const noexcept
|
||||
{
|
||||
std::size_t seed = std::hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(dk.celltype);
|
||||
seed ^= std::hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(dk.from) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
seed ^= std::hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(dk.to) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
struct Arch : BaseCtx
|
||||
|
@ -645,10 +645,10 @@ void FPGAViewWidget::mousePressEvent(QMouseEvent *event)
|
||||
return;
|
||||
|
||||
bool shift = QApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
|
||||
bool ctrl = QApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
|
||||
bool ctrl = QApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
|
||||
bool btn_right = event->buttons() & Qt::RightButton;
|
||||
bool btn_mid = event->buttons() & Qt::MidButton;
|
||||
bool btn_left = event->buttons() & Qt::LeftButton;
|
||||
bool btn_mid = event->buttons() & Qt::MidButton;
|
||||
bool btn_left = event->buttons() & Qt::LeftButton;
|
||||
|
||||
if (btn_right || btn_mid || (btn_left && shift)) {
|
||||
lastDragPos_ = event->pos();
|
||||
@ -687,8 +687,8 @@ void FPGAViewWidget::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
bool shift = QApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
|
||||
bool btn_right = event->buttons() & Qt::RightButton;
|
||||
bool btn_mid = event->buttons() & Qt::MidButton;
|
||||
bool btn_left = event->buttons() & Qt::LeftButton;
|
||||
bool btn_mid = event->buttons() & Qt::MidButton;
|
||||
bool btn_left = event->buttons() & Qt::LeftButton;
|
||||
|
||||
if (btn_right || btn_mid || (btn_left && shift)) {
|
||||
const int dx = event->x() - lastDragPos_.x();
|
||||
|
Loading…
Reference in New Issue
Block a user