Skip to content

Commit

Permalink
Fixup structural GT comparators.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve committed May 18, 2005
1 parent 7796c8b commit 28168e0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
26 changes: 25 additions & 1 deletion tgt-stub/stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
Expand Down
9 changes: 6 additions & 3 deletions vvp/compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 28168e0

Please sign in to comment.