run clangformat

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2022-02-03 15:28:46 +00:00
parent a78719ecc1
commit 84399caebe
7 changed files with 23 additions and 23 deletions

View File

@ -28,9 +28,7 @@ const int hashtable_size_factor = 3;
// Cantor pairing function for two non-negative integers // Cantor pairing function for two non-negative integers
// https://en.wikipedia.org/wiki/Pairing_function // https://en.wikipedia.org/wiki/Pairing_function
inline unsigned int mkhash(unsigned int a, unsigned int b) { inline unsigned int mkhash(unsigned int a, unsigned int b) { return (a * a + 3 * a + 2 * a * b + b + b * b) / 2; }
return (a*a + 3*a + 2*a*b + b + b*b) / 2;
}
// traditionally 5381 is used as starting value for the djb2 hash // traditionally 5381 is used as starting value for the djb2 hash
const unsigned int mkhash_init = 5381; const unsigned int mkhash_init = 5381;

View File

@ -24,7 +24,6 @@
NEXTPNR_NAMESPACE_BEGIN NEXTPNR_NAMESPACE_BEGIN
void gfxCreateBelDecals(Arch *arch); void gfxCreateBelDecals(Arch *arch);
void gfxSetBelDefaultDecal(Arch *arch, BelInfo &bel); void gfxSetBelDefaultDecal(Arch *arch, BelInfo &bel);
void gfxSetIOBWireDecals(Arch *arch, BelInfo &bel); void gfxSetIOBWireDecals(Arch *arch, BelInfo &bel);

View File

@ -43,7 +43,8 @@ void IdString::initialize_arch(const BaseCtx *ctx)
#undef X #undef X
} }
CycloneV::rnode_t Arch::find_rnode(CycloneV::block_type_t bt, int x, int y, CycloneV::port_type_t port, int bi, int pi) const CycloneV::rnode_t Arch::find_rnode(CycloneV::block_type_t bt, int x, int y, CycloneV::port_type_t port, int bi,
int pi) const
{ {
auto pn1 = CycloneV::pnode(bt, x, y, port, bi, pi); auto pn1 = CycloneV::pnode(bt, x, y, port, bi, pi);
auto rn1 = cyclonev->pnode_to_rnode(pn1); auto rn1 = cyclonev->pnode_to_rnode(pn1);

View File

@ -461,7 +461,8 @@ struct Arch : BaseArch<ArchRanges>
void add_bel_pin(BelId bel, IdString pin, PortType dir, WireId wire); void add_bel_pin(BelId bel, IdString pin, PortType dir, WireId wire);
CycloneV::rnode_t find_rnode(CycloneV::block_type_t bt, int x, int y, CycloneV::port_type_t port, int bi = -1, int pi = -1) const; CycloneV::rnode_t find_rnode(CycloneV::block_type_t bt, int x, int y, CycloneV::port_type_t port, int bi = -1,
int pi = -1) const;
WireId get_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const; WireId get_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const;
bool has_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const; bool has_port(CycloneV::block_type_t bt, int x, int y, int bi, CycloneV::port_type_t port, int pi = -1) const;

View File

@ -98,8 +98,10 @@ struct MistralBitgen
// Output gpios must also bypass things in the associated dqs // Output gpios must also bypass things in the associated dqs
auto dqs = cv->p2p_to(CycloneV::pnode(CycloneV::GPIO, pos, CycloneV::PNONE, bi, -1)); auto dqs = cv->p2p_to(CycloneV::pnode(CycloneV::GPIO, pos, CycloneV::PNONE, bi, -1));
if (dqs) { if (dqs) {
cv->bmux_m_set(CycloneV::DQS16, CycloneV::pn2p(dqs), CycloneV::INPUT_REG4_SEL, CycloneV::pn2bi(dqs), CycloneV::SEL_LOCKED_DPA); cv->bmux_m_set(CycloneV::DQS16, CycloneV::pn2p(dqs), CycloneV::INPUT_REG4_SEL, CycloneV::pn2bi(dqs),
cv->bmux_r_set(CycloneV::DQS16, CycloneV::pn2p(dqs), CycloneV::RB_T9_SEL_EREG_CFF_DELAY, CycloneV::pn2bi(dqs), 0x1f); CycloneV::SEL_LOCKED_DPA);
cv->bmux_r_set(CycloneV::DQS16, CycloneV::pn2p(dqs), CycloneV::RB_T9_SEL_EREG_CFF_DELAY,
CycloneV::pn2bi(dqs), 0x1f);
} }
} }
// There seem to be two mirrored OEIN inversion bits for constant OE for inputs/outputs. This might be to // There seem to be two mirrored OEIN inversion bits for constant OE for inputs/outputs. This might be to

View File

@ -54,8 +54,7 @@ po::options_description NexusCommandHandler::getArchOptions()
specific.add_options()("no-pack-lutff", "disable packing (clustering) LUTs and FFs together"); specific.add_options()("no-pack-lutff", "disable packing (clustering) LUTs and FFs together");
specific.add_options()("carry-lutff-ratio", po::value<float>(), specific.add_options()("carry-lutff-ratio", po::value<float>(),
"ratio of FFs to be added to carry-chain LUT clusters"); "ratio of FFs to be added to carry-chain LUT clusters");
specific.add_options()("estimate-delay-mult", po::value<int>(), specific.add_options()("estimate-delay-mult", po::value<int>(), "multiplier for the estimate delay");
"multiplier for the estimate delay");
return specific; return specific;
} }