machxo2: clang format.
This commit is contained in:
parent
2c9d4ba9ae
commit
0250aaaddd
@ -629,7 +629,8 @@ struct Arch : BaseCtx
|
|||||||
{
|
{
|
||||||
NPNR_ASSERT(wire != WireId());
|
NPNR_ASSERT(wire != WireId());
|
||||||
std::stringstream name;
|
std::stringstream name;
|
||||||
name << "X" << wire.location.x << "/Y" << wire.location.y << "/" << tileInfo(wire)->wire_data[wire.index].name.get();
|
name << "X" << wire.location.x << "/Y" << wire.location.y << "/"
|
||||||
|
<< tileInfo(wire)->wire_data[wire.index].name.get();
|
||||||
return id(name.str());
|
return id(name.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,8 @@ static std::string get_trellis_wirename(Context *ctx, Location loc, WireId wire)
|
|||||||
std::string basename = ctx->tileInfo(wire)->wire_data[wire.index].name.get();
|
std::string basename = ctx->tileInfo(wire)->wire_data[wire.index].name.get();
|
||||||
std::string prefix2 = basename.substr(0, 2);
|
std::string prefix2 = basename.substr(0, 2);
|
||||||
std::string prefix7 = basename.substr(0, 7);
|
std::string prefix7 = basename.substr(0, 7);
|
||||||
if (prefix2 == "G_" || prefix2 == "L_" || prefix2 == "R_" || prefix2 == "U_" || prefix2 == "D_" || prefix7 == "BRANCH_")
|
if (prefix2 == "G_" || prefix2 == "L_" || prefix2 == "R_" || prefix2 == "U_" || prefix2 == "D_" ||
|
||||||
|
prefix7 == "BRANCH_")
|
||||||
return basename;
|
return basename;
|
||||||
if (loc == wire.location)
|
if (loc == wire.location)
|
||||||
return basename;
|
return basename;
|
||||||
@ -182,11 +183,15 @@ void write_bitstream(Context *ctx, std::string text_config_file)
|
|||||||
cc.tiles[tname].add_word(slice + ".K1.INIT", int_to_bitvector(lut1_init, 16));
|
cc.tiles[tname].add_word(slice + ".K1.INIT", int_to_bitvector(lut1_init, 16));
|
||||||
cc.tiles[tname].add_enum(slice + ".MODE", str_or_default(ci->params, ctx->id("MODE"), "LOGIC"));
|
cc.tiles[tname].add_enum(slice + ".MODE", str_or_default(ci->params, ctx->id("MODE"), "LOGIC"));
|
||||||
cc.tiles[tname].add_enum(slice + ".GSR", str_or_default(ci->params, ctx->id("GSR"), "ENABLED"));
|
cc.tiles[tname].add_enum(slice + ".GSR", str_or_default(ci->params, ctx->id("GSR"), "ENABLED"));
|
||||||
cc.tiles[tname].add_enum("LSR" + std::to_string(int_index) + ".SRMODE", str_or_default(ci->params, ctx->id("SRMODE"), "LSR_OVER_CE"));
|
cc.tiles[tname].add_enum("LSR" + std::to_string(int_index) + ".SRMODE",
|
||||||
|
str_or_default(ci->params, ctx->id("SRMODE"), "LSR_OVER_CE"));
|
||||||
cc.tiles[tname].add_enum(slice + ".CEMUX", intstr_or_default(ci->params, ctx->id("CEMUX"), "1"));
|
cc.tiles[tname].add_enum(slice + ".CEMUX", intstr_or_default(ci->params, ctx->id("CEMUX"), "1"));
|
||||||
cc.tiles[tname].add_enum("CLK" + std::to_string(int_index) + ".CLKMUX", intstr_or_default(ci->params, ctx->id("CLKMUX"), "0"));
|
cc.tiles[tname].add_enum("CLK" + std::to_string(int_index) + ".CLKMUX",
|
||||||
cc.tiles[tname].add_enum("LSR" + std::to_string(int_index) + ".LSRMUX", str_or_default(ci->params, ctx->id("LSRMUX"), "LSR"));
|
intstr_or_default(ci->params, ctx->id("CLKMUX"), "0"));
|
||||||
cc.tiles[tname].add_enum("LSR" + std::to_string(int_index) + ".LSRONMUX", intstr_or_default(ci->params, ctx->id("LSRONMUX"), "LSRMUX"));
|
cc.tiles[tname].add_enum("LSR" + std::to_string(int_index) + ".LSRMUX",
|
||||||
|
str_or_default(ci->params, ctx->id("LSRMUX"), "LSR"));
|
||||||
|
cc.tiles[tname].add_enum("LSR" + std::to_string(int_index) + ".LSRONMUX",
|
||||||
|
intstr_or_default(ci->params, ctx->id("LSRONMUX"), "LSRMUX"));
|
||||||
cc.tiles[tname].add_enum(slice + ".REGMODE", str_or_default(ci->params, ctx->id("REGMODE"), "FF"));
|
cc.tiles[tname].add_enum(slice + ".REGMODE", str_or_default(ci->params, ctx->id("REGMODE"), "FF"));
|
||||||
cc.tiles[tname].add_enum(slice + ".REG0.SD", intstr_or_default(ci->params, ctx->id("REG0_SD"), "0"));
|
cc.tiles[tname].add_enum(slice + ".REG0.SD", intstr_or_default(ci->params, ctx->id("REG0_SD"), "0"));
|
||||||
cc.tiles[tname].add_enum(slice + ".REG1.SD", intstr_or_default(ci->params, ctx->id("REG1_SD"), "0"));
|
cc.tiles[tname].add_enum(slice + ".REG1.SD", intstr_or_default(ci->params, ctx->id("REG1_SD"), "0"));
|
||||||
|
@ -187,8 +187,7 @@ static void pack_io(Context *ctx)
|
|||||||
|
|
||||||
if (loc_attr_cell != ci->attrs.end()) {
|
if (loc_attr_cell != ci->attrs.end()) {
|
||||||
if (bel_attr_cell != ci->attrs.end()) {
|
if (bel_attr_cell != ci->attrs.end()) {
|
||||||
log_error("IO buffer %s has both a BEL attribute and LOC attribute.\n",
|
log_error("IO buffer %s has both a BEL attribute and LOC attribute.\n", ci->name.c_str(ctx));
|
||||||
ci->name.c_str(ctx));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log_info("found LOC attribute on IO buffer %s.\n", ci->name.c_str(ctx));
|
log_info("found LOC attribute on IO buffer %s.\n", ci->name.c_str(ctx));
|
||||||
|
Loading…
Reference in New Issue
Block a user