kernel: rtlil: replaced the width limit exceptions with `log_error`

This commit is contained in:
Aki Van Ness 2022-09-06 19:43:46 -04:00
parent 2b9982101a
commit 42e4610e3a
No known key found for this signature in database
GPG Key ID: C629E8EC06327BEE
1 changed files with 7 additions and 7 deletions

View File

@ -202,7 +202,7 @@ const pool<IdString> &RTLIL::builtin_ff_cell_types() {
RTLIL::Const::Const(const std::string &str)
{
if (str.size() * 8 > 0x1000000)
throw std::length_error("RTLIL Const width must be less than 2^24");
log_error("RTLIL Const width must be less than 2^24");
flags = RTLIL::CONST_FLAG_STRING;
bits.reserve(str.size() * 8);
@ -218,10 +218,10 @@ RTLIL::Const::Const(const std::string &str)
RTLIL::Const::Const(int val, int width)
{
if (width < 0)
throw std::length_error("RTLIL Const width must not be negative");
log_error("RTLIL Const width must not be negative");
if (width > 0x1000000)
throw std::length_error("RTLIL Const width must be less than 2^24");
log_error("RTLIL Const width must be less than 2^24");
flags = RTLIL::CONST_FLAG_NONE;
bits.reserve(width);
@ -234,10 +234,10 @@ RTLIL::Const::Const(int val, int width)
RTLIL::Const::Const(RTLIL::State bit, int width)
{
if (width < 0)
throw std::length_error("RTLIL Const width must not be negative");
log_error("RTLIL Const width must not be negative");
if (width > 0x1000000)
throw std::length_error("RTLIL Const width must be less than 2^24");
log_error("RTLIL Const width must be less than 2^24");
flags = RTLIL::CONST_FLAG_NONE;
bits.reserve(width);
@ -249,7 +249,7 @@ RTLIL::Const::Const(const std::vector<bool> &bits)
{
if (bits.size() > 0x1000000)
throw std::length_error("RTLIL Const width must be less than 2^24");
log_error("RTLIL Const width must be less than 2^24");
flags = RTLIL::CONST_FLAG_NONE;
this->bits.reserve(bits.size());
@ -317,7 +317,7 @@ RTLIL::Const RTLIL::Const::from_string(const std::string &str)
{
if (str.size() > 0x1000000)
throw std::length_error("RTLIL width must be less than 2^24");
log_error("RTLIL width must be less than 2^24");
Const c;
c.bits.reserve(str.size());