diff --git a/tgt-vhdl/expr.cc b/tgt-vhdl/expr.cc index 1e024a554..937d26f83 100644 --- a/tgt-vhdl/expr.cc +++ b/tgt-vhdl/expr.cc @@ -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)); diff --git a/tgt-vhdl/vhdl_syntax.cc b/tgt-vhdl/vhdl_syntax.cc index a01a47029..700bb3d7b 100644 --- a/tgt-vhdl/vhdl_syntax.cc +++ b/tgt-vhdl/vhdl_syntax.cc @@ -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;"; } - - - - - - - diff --git a/tgt-vhdl/vhdl_syntax.hh b/tgt-vhdl/vhdl_syntax.hh index 92f3bcc32..529bf2deb 100644 --- a/tgt-vhdl/vhdl_syntax.hh +++ b/tgt-vhdl/vhdl_syntax.hh @@ -62,6 +62,8 @@ enum vhdl_binop_t { VHDL_BINOP_ADD, VHDL_BINOP_SUB, VHDL_BINOP_MULT, + VHDL_BINOP_LT, + VHDL_BINOP_GT, }; /*