New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for REGMODE to DP16KD #423
Add support for REGMODE to DP16KD #423
Conversation
ecp5/pack.cc
Outdated
|
||
// Output register mode (REGMODE_{A,B}). Valid options are 'NOREG' and 'OUTREG'. | ||
std::string regmode_a = str_or_default(ci->params, id("REGMODE_A"), "NOREG"); | ||
if (!(regmode_a == "NOREG" || regmode_a == "OUTREG")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal style nitpick - regmode_a != "NOREG" && regmode_a != "OUTREG"
ecp5/pack.cc
Outdated
// Output register mode (REGMODE_{A,B}). Valid options are 'NOREG' and 'OUTREG'. | ||
std::string regmode_a = str_or_default(ci->params, id("REGMODE_A"), "NOREG"); | ||
if (!(regmode_a == "NOREG" || regmode_a == "OUTREG")) | ||
NPNR_ASSERT_FALSE_STR("bad DP16KD REGMODE_A configuration '" + regmode_a + "'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a user-specifiable parameter, this should be log_error
not NPNR_ASSERT_FALSE_STR
.
ecp5/pack.cc
Outdated
if (!(regmode_a == "NOREG" || regmode_a == "OUTREG")) | ||
NPNR_ASSERT_FALSE_STR("bad DP16KD REGMODE_A configuration '" + regmode_a + "'"); | ||
if (regmode_a != "NOREG" && regmode_a != "OUTREG") | ||
log_error("DP16KD %s has invalid REGMODE_A configuration '%s'\n", ci->name.c_str(ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IdString
s are associated with BaseCtx
, the base class of Arch, so c_str(this)
should suffice
Thanks! |
No description provided.