Less than / greater than
This commit is contained in:
parent
ec23b70bb7
commit
d6acb8d059
|
|
@ -169,6 +169,10 @@ static vhdl_expr *translate_binary(ivl_expr_t e)
|
|||
return translate_numeric(lhs, rhs, VHDL_BINOP_AND);
|
||||
case 'o':
|
||||
return translate_relation(lhs, rhs, VHDL_BINOP_OR);
|
||||
case '<':
|
||||
return translate_relation(lhs, rhs, VHDL_BINOP_LT);
|
||||
case '>':
|
||||
return translate_relation(lhs, rhs, VHDL_BINOP_GT);
|
||||
default:
|
||||
error("No translation for binary opcode '%c'\n",
|
||||
ivl_expr_opcode(e));
|
||||
|
|
|
|||
|
|
@ -740,6 +740,12 @@ void vhdl_binop_expr::emit(std::ofstream &of, int level) const
|
|||
case VHDL_BINOP_MULT:
|
||||
of << " * ";
|
||||
break;
|
||||
case VHDL_BINOP_LT:
|
||||
of << " < ";
|
||||
break;
|
||||
case VHDL_BINOP_GT:
|
||||
of << " > ";
|
||||
break;
|
||||
}
|
||||
|
||||
(*it)->emit(of, level);
|
||||
|
|
@ -789,10 +795,3 @@ void vhdl_while_stmt::emit(std::ofstream &of, int level) const
|
|||
stmts_.emit(of, indent(level));
|
||||
of << "end loop;";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ enum vhdl_binop_t {
|
|||
VHDL_BINOP_ADD,
|
||||
VHDL_BINOP_SUB,
|
||||
VHDL_BINOP_MULT,
|
||||
VHDL_BINOP_LT,
|
||||
VHDL_BINOP_GT,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue