Fixup structural GT comparators.

This commit is contained in:
steve 2005-05-18 03:46:01 +00:00
parent 7796c8bcfb
commit 28168e0f57
2 changed files with 31 additions and 4 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: stub.c,v 1.124 2005/05/08 23:44:08 steve Exp $"
#ident "$Id: stub.c,v 1.125 2005/05/18 03:46:01 steve Exp $"
#endif
# include "config.h"
@ -360,6 +360,23 @@ static void show_lpm_cmp_ge(ivl_lpm_t net)
check_cmp_widths(net);
}
/* IVL_LPM_CMP_GT
* This LPM node supports two-input compare.
*/
static void show_lpm_cmp_gt(ivl_lpm_t net)
{
unsigned width = ivl_lpm_width(net);
fprintf(out, " LPM_CMP_GT %s: <width=%u %s>\n",
ivl_lpm_basename(net), width,
ivl_lpm_signed(net)? "signed" : "unsigned");
fprintf(out, " O: %s\n", ivl_nexus_name(ivl_lpm_q(net,0)));
fprintf(out, " A: %s\n", ivl_nexus_name(ivl_lpm_data(net,0)));
fprintf(out, " B: %s\n", ivl_nexus_name(ivl_lpm_data(net,1)));
check_cmp_widths(net);
}
/* IVL_LPM_CMP_NE
* This LPM node supports two-input compare. The output width is
* actually always 1, the lpm_width is the expected width of the inputs.
@ -785,6 +802,10 @@ static void show_lpm(ivl_lpm_t net)
show_lpm_cmp_ge(net);
break;
case IVL_LPM_CMP_GT:
show_lpm_cmp_gt(net);
break;
case IVL_LPM_CMP_NE:
show_lpm_cmp_ne(net);
break;
@ -1362,6 +1383,9 @@ int target_design(ivl_design_t des)
/*
* $Log: stub.c,v $
* Revision 1.125 2005/05/18 03:46:01 steve
* Fixup structural GT comparators.
*
* Revision 1.124 2005/05/08 23:44:08 steve
* Add support for variable part select.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: compile.cc,v 1.200 2005/05/07 03:15:42 steve Exp $"
#ident "$Id: compile.cc,v 1.201 2005/05/18 03:46:01 steve Exp $"
#endif
# include "arith.h"
@ -1026,8 +1026,8 @@ void compile_cmp_gt(char*label, long wid, bool signed_flag,
{
assert( wid > 0 );
if ((long)argc != 2*wid) {
fprintf(stderr, "%s; .cmp has wrong number of symbols\n", label);
if (argc != 2) {
fprintf(stderr, "%s .cmp/gt has wrong number of symbols\n", label);
compile_errors += 1;
return;
}
@ -1526,6 +1526,9 @@ void compile_param_string(char*label, char*name, char*str, char*value)
/*
* $Log: compile.cc,v $
* Revision 1.201 2005/05/18 03:46:01 steve
* Fixup structural GT comparators.
*
* Revision 1.200 2005/05/07 03:15:42 steve
* Implement non-blocking part assign.
*