vhdlpp: to_integer() function.

This commit is contained in:
Maciej Suminski 2015-02-17 15:07:05 +01:00
parent a1a4f47894
commit 5884879b02
1 changed files with 6 additions and 1 deletions

View File

@ -552,7 +552,12 @@ int ExpFunc::emit(ostream&out, Entity*ent, ScopeBase*scope)
{
int errors = 0;
if (name_ == "unsigned" && argv_.size()==1) {
// SystemVerilog takes care of signs, depending on the lvalue
if (name_ == "to_integer" && argv_.size()==1) {
errors += argv_[0]->emit(out, ent, scope);
}
else if (name_ == "unsigned" && argv_.size()==1) {
// Handle the special case that this is a cast to
// unsigned. This function is brought in as part of the
// std numeric library, but we interpret it as the same