Add XNF support for NE comparators.
This commit is contained in:
parent
291ab97422
commit
4bf3e37af3
36
t-xnf.cc
36
t-xnf.cc
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: t-xnf.cc,v 1.37 2000/11/29 01:34:17 steve Exp $"
|
#ident "$Id: t-xnf.cc,v 1.38 2000/11/29 02:54:49 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* XNF BACKEND
|
/* XNF BACKEND
|
||||||
|
|
@ -539,7 +539,7 @@ void target_xnf::lpm_add_sub(const NetAddSub*gate)
|
||||||
*/
|
*/
|
||||||
void target_xnf::lpm_compare(const NetCompare*dev)
|
void target_xnf::lpm_compare(const NetCompare*dev)
|
||||||
{
|
{
|
||||||
if (dev->pin_AEB().is_linked()) {
|
if (dev->pin_AEB().is_linked() || dev->pin_ANEB().is_linked()) {
|
||||||
lpm_compare_eq_(out_, dev);
|
lpm_compare_eq_(out_, dev);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -611,8 +611,20 @@ void target_xnf::lpm_compare_eq_(ostream&os, const NetCompare*dev)
|
||||||
os << "END" << endl;
|
os << "END" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "SYM, " << mname << ", AND, LIBVER=2.0.0" << endl;
|
/* Draw an AND gate if this is an EQ result, or a NAND
|
||||||
draw_pin(os, "O", dev->pin_AEB());
|
gate of this is a NEQ result. */
|
||||||
|
|
||||||
|
if (dev->pin_AEB().is_linked()) {
|
||||||
|
assert( ! dev->pin_ANEB().is_linked());
|
||||||
|
os << "SYM, " << mname << ", AND, LIBVER=2.0.0" << endl;
|
||||||
|
draw_pin(os, "O", dev->pin_AEB());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
assert( dev->pin_ANEB().is_linked());
|
||||||
|
os << "SYM, " << mname << ", NAND, LIBVER=2.0.0" << endl;
|
||||||
|
draw_pin(os, "O", dev->pin_ANEB());
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned idx = 0 ; idx < dev->width() ; idx += 5) {
|
for (unsigned idx = 0 ; idx < dev->width() ; idx += 5) {
|
||||||
if ((idx+1) == dev->width())
|
if ((idx+1) == dev->width())
|
||||||
os << " PIN, I" << idx/5 << ", I, " << mname
|
os << " PIN, I" << idx/5 << ", I, " << mname
|
||||||
|
|
@ -624,8 +636,17 @@ void target_xnf::lpm_compare_eq_(ostream&os, const NetCompare*dev)
|
||||||
os << "END" << endl;
|
os << "END" << endl;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
os << "SYM, " << mname << ", AND, LIBVER=2.0.0" << endl;
|
if (dev->pin_AEB().is_linked()) {
|
||||||
draw_pin(os, "O", dev->pin_AEB());
|
assert( ! dev->pin_ANEB().is_linked());
|
||||||
|
os << "SYM, " << mname << ", AND, LIBVER=2.0.0" << endl;
|
||||||
|
draw_pin(os, "O", dev->pin_AEB());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
assert( dev->pin_ANEB().is_linked());
|
||||||
|
os << "SYM, " << mname << ", NAND, LIBVER=2.0.0" << endl;
|
||||||
|
draw_pin(os, "O", dev->pin_ANEB());
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned idx = 0 ; idx < dev->width() ; idx += 1) {
|
for (unsigned idx = 0 ; idx < dev->width() ; idx += 1) {
|
||||||
os << " PIN, I" << idx << ", I, " << mname << "/bit<"
|
os << " PIN, I" << idx << ", I, " << mname << "/bit<"
|
||||||
<< idx << ">" << endl;
|
<< idx << ">" << endl;
|
||||||
|
|
@ -887,6 +908,9 @@ extern const struct target tgt_xnf = { "xnf", &target_xnf_obj };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-xnf.cc,v $
|
* $Log: t-xnf.cc,v $
|
||||||
|
* Revision 1.38 2000/11/29 02:54:49 steve
|
||||||
|
* Add XNF support for NE comparators.
|
||||||
|
*
|
||||||
* Revision 1.37 2000/11/29 01:34:17 steve
|
* Revision 1.37 2000/11/29 01:34:17 steve
|
||||||
* Typo writing I pins to AND gates in compare.
|
* Typo writing I pins to AND gates in compare.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue