clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
219310b203
commit
2ed68a21db
@ -523,7 +523,8 @@ struct NexusFasmWriter
|
|||||||
write_enum(cell, "LF_OUTPUT_EN");
|
write_enum(cell, "LF_OUTPUT_EN");
|
||||||
write_enum(cell, "DTR_EN", "ENABLED");
|
write_enum(cell, "DTR_EN", "ENABLED");
|
||||||
write_enum(cell, "DEBUG_N", "DISABLED");
|
write_enum(cell, "DEBUG_N", "DISABLED");
|
||||||
write_int_vector(stringf("HF_CLK_DIV[7:0]"), ctx->parse_lattice_param_from_cell(cell, id_HF_CLK_DIV, 8, 0).intval, 8);
|
write_int_vector(stringf("HF_CLK_DIV[7:0]"),
|
||||||
|
ctx->parse_lattice_param_from_cell(cell, id_HF_CLK_DIV, 8, 0).intval, 8);
|
||||||
write_int_vector(stringf("HF_SED_SEC_DIV[7:0]"), 1, 8);
|
write_int_vector(stringf("HF_SED_SEC_DIV[7:0]"), 1, 8);
|
||||||
write_cell_muxes(cell);
|
write_cell_muxes(cell);
|
||||||
pop(2);
|
pop(2);
|
||||||
@ -812,7 +813,8 @@ struct NexusFasmWriter
|
|||||||
};
|
};
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
static bool is_number(std::string s) {
|
static bool is_number(std::string s)
|
||||||
|
{
|
||||||
for (auto c : s) {
|
for (auto c : s) {
|
||||||
if (!isdigit(c))
|
if (!isdigit(c))
|
||||||
return false;
|
return false;
|
||||||
@ -848,8 +850,7 @@ struct NexusFasmWriter
|
|||||||
fnd_word->second);
|
fnd_word->second);
|
||||||
} else {
|
} else {
|
||||||
write_int_vector(stringf("%s[%d:0]", name.c_str(), fnd_word->second - 1),
|
write_int_vector(stringf("%s[%d:0]", name.c_str(), fnd_word->second - 1),
|
||||||
ctx->parse_lattice_param(temp, n, fnd_word->second).as_int64(),
|
ctx->parse_lattice_param(temp, n, fnd_word->second).as_int64(), fnd_word->second);
|
||||||
fnd_word->second);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (cell->params.count(n)) {
|
if (cell->params.count(n)) {
|
||||||
|
@ -84,8 +84,7 @@ Property Arch::parse_lattice_param(const Property &val, IdString prop, int width
|
|||||||
|
|
||||||
for (auto b : temp.str.substr(width)) {
|
for (auto b : temp.str.substr(width)) {
|
||||||
if (b == Property::S1)
|
if (b == Property::S1)
|
||||||
log_error("Found value for property %s.%s with width greater than %d\n", ci, nameOf(prop),
|
log_error("Found value for property %s.%s with width greater than %d\n", ci, nameOf(prop), width);
|
||||||
width);
|
|
||||||
}
|
}
|
||||||
temp.update_intval();
|
temp.update_intval();
|
||||||
return temp.extract(0, width);
|
return temp.extract(0, width);
|
||||||
|
Loading…
Reference in New Issue
Block a user