Update queue error/warning messages

This commit is contained in:
Cary R 2020-07-20 20:33:36 -07:00
parent 1b7cd5c237
commit 2999f351d2
2 changed files with 20 additions and 20 deletions

View File

@ -1107,7 +1107,7 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const
NetEConst*cv = dynamic_cast<NetEConst*>(tmp);
if (cv == 0) {
cerr << get_fileline() << ": error: queue '" << name_
<< "' maximum size must be a constant!" << endl;
<< "' bound must be a constant!" << endl;
des->errors += 1;
max_idx = -1;
} else {
@ -1115,7 +1115,7 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const
max_idx = res.as_long();
if (max_idx < 0) {
cerr << get_fileline() << ": error: queue '"
<< name_ << "' maximum size must be positive ("
<< name_ << "' bound must be positive ("
<< max_idx << ")!" << endl;
des->errors += 1;
max_idx = -1;

View File

@ -477,17 +477,17 @@ void vvp_queue_real::get_word(unsigned adr, double&value)
void vvp_queue_real::push_back(double value, unsigned max_size)
{
if (!max_size || (array_.size() < max_size)) array_.push_back(value);
else cerr << "Warning: value " << value
<< " was not added to the end of already full sized ("
<< max_size << ") queue." << endl;
else cerr << "Warning: push_back(" << value
<< ") skipped for already full bounded queue ["
<< max_size << "]." << endl;
}
void vvp_queue_real::push_front(double value, unsigned max_size)
{
if (max_size && (array_.size() == max_size)) {
cerr << "Warning: value " << array_.back()
<< " was removed from already full sized ("
<< max_size << ") queue." << endl;
cerr << "Warning: push_front(" << value << ") removed "
<< array_.back() << " from already full bounded queue ["
<< max_size << "]." << endl;
array_.pop_back();
}
array_.push_front(value);
@ -530,17 +530,17 @@ void vvp_queue_string::get_word(unsigned adr, string&value)
void vvp_queue_string::push_back(const string&value, unsigned max_size)
{
if (!max_size || (array_.size() < max_size)) array_.push_back(value);
else cerr << "Warning: value \"" << value
<< "\" was not added to the end of already full sized ("
<< max_size << ") queue." << endl;
else cerr << "Warning: push_back(\"" << value
<< "\") skipped for already full bounded queue ["
<< max_size << "]." << endl;
}
void vvp_queue_string::push_front(const string&value, unsigned max_size)
{
if (max_size && (array_.size() == max_size)) {
cerr << "Warning: value \"" << array_.back()
<< "\" was removed from already full sized ("
<< max_size << ") queue." << endl;
cerr << "Warning: push_front(\"" << value << "\") removed \""
<< array_.back() << "\" from already full bounded queue ["
<< max_size << "]." << endl;
array_.pop_back();
}
array_.push_front(value);
@ -583,17 +583,17 @@ void vvp_queue_vec4::get_word(unsigned adr, vvp_vector4_t&value)
void vvp_queue_vec4::push_back(const vvp_vector4_t&value, unsigned max_size)
{
if (!max_size || (array_.size() < max_size)) array_.push_back(value);
else cerr << "Warning: value " << value
<< " was not added to the end of already full sized ("
<< max_size << ") queue." << endl;
else cerr << "Warning: push_back(" << value
<< ") skipped for already full bounded queue ["
<< max_size << "]." << endl;
}
void vvp_queue_vec4::push_front(const vvp_vector4_t&value, unsigned max_size)
{
if (max_size && (array_.size() == max_size)) {
cerr << "Warning: value " << array_.back()
<< " was removed from already full sized ("
<< max_size << ") queue." << endl;
cerr << "Warning: push_front(" << value << ") removed "
<< array_.back() << " from already full bounded queue ["
<< max_size << "]." << endl;
array_.pop_back();
}
array_.push_front(value);