diff --git a/tgt-vhdl/logic.cc b/tgt-vhdl/logic.cc index 816178383..a6a9558fa 100644 --- a/tgt-vhdl/logic.cc +++ b/tgt-vhdl/logic.cc @@ -124,6 +124,8 @@ static vhdl_expr *translate_logic_inputs(vhdl_scope *scope, ivl_net_logic_t log) return inputs_to_expr(scope, VHDL_BINOP_NOR, log); case IVL_LO_XOR: return inputs_to_expr(scope, VHDL_BINOP_XOR, log); + case IVL_LO_XNOR: + return inputs_to_expr(scope, VHDL_BINOP_XNOR, log); case IVL_LO_BUF: case IVL_LO_BUFZ: return nexus_to_var_ref(scope, ivl_logic_pin(log, 1)); diff --git a/tgt-vhdl/vhdl_syntax.cc b/tgt-vhdl/vhdl_syntax.cc index f8932d2f0..663ba086c 100644 --- a/tgt-vhdl/vhdl_syntax.cc +++ b/tgt-vhdl/vhdl_syntax.cc @@ -725,7 +725,7 @@ void vhdl_binop_expr::emit(std::ostream &of, int level) const const char* ops[] = { "and", "or", "=", "/=", "+", "-", "*", "<", ">", "<=", ">=", "sll", "srl", "xor", "&", - "nand", "nor", NULL + "nand", "nor", "xnor", NULL }; of << " " << ops[op_] << " "; diff --git a/tgt-vhdl/vhdl_syntax.hh b/tgt-vhdl/vhdl_syntax.hh index e09d6ab63..158ac1fee 100644 --- a/tgt-vhdl/vhdl_syntax.hh +++ b/tgt-vhdl/vhdl_syntax.hh @@ -83,6 +83,7 @@ enum vhdl_binop_t { VHDL_BINOP_CONCAT, VHDL_BINOP_NAND, VHDL_BINOP_NOR, + VHDL_BINOP_XNOR, }; /*