Permalink
Browse files

Major rework of array handling. Memories are replaced with the

 more general concept of arrays. The NetMemory and NetEMemory
 classes are removed from the ivl core program, and the IVL_LPM_RAM
 lpm type is removed from the ivl_target API.
  • Loading branch information...
1 parent 5c3b2f4 commit 91d84e7dc784c83503c246a106734c56048fa525 steve committed Jan 16, 2007
Showing with 2,376 additions and 2,192 deletions.
  1. +31 −20 PExpr.h
  2. +7 −2 PWire.cc
  3. +24 −50 design_dump.cc
  4. +104 −175 elab_expr.cc
  5. +89 −133 elab_lval.cc
  6. +111 −74 elab_net.cc
  7. +57 −53 elab_sig.cc
  8. +9 −5 elaborate.cc
  9. +12 −19 emit.cc
  10. +8 −3 eval.cc
  11. +7 −45 eval_tree.cc
  12. +9 −3 expr_synth.cc
  13. +1 −0 ivl.def
  14. +74 −204 ivl_target.h
  15. +17 −27 net_assign.cc
  16. +9 −9 net_nex_input.cc
  17. +7 −46 net_scope.cc
  18. +118 −264 netlist.cc
  19. +82 −171 netlist.h
  20. +8 −4 netmisc.h
  21. +38 −4 parse.y
  22. +18 −15 pform.cc
  23. +10 −4 set_width.cc
  24. +7 −8 symbol_search.cc
  25. +3 −45 syn-rules.y
  26. +54 −32 t-dll-api.cc
  27. +30 −23 t-dll-expr.cc
  28. +12 −15 t-dll-proc.cc
  29. +60 −121 t-dll.cc
  30. +24 −16 t-dll.h
  31. +14 −22 target.cc
  32. +8 −6 target.h
  33. +2 −2 tgt-stub/Makefile.in
  34. +273 −0 tgt-stub/expression.c
  35. +4 −1 tgt-stub/priv.h
  36. +19 −1 tgt-stub/statement.c
  37. +108 −307 tgt-stub/stub.c
  38. +10 −4 tgt-vvp/draw_mux.c
  39. +16 −9 tgt-vvp/draw_ufunc.c
  40. +21 −6 tgt-vvp/draw_vpi.c
  41. +53 −11 tgt-vvp/eval_expr.c
  42. +22 −3 tgt-vvp/eval_real.c
  43. +14 −6 tgt-vvp/vector.c
  44. +8 −2 tgt-vvp/vvp_priv.h
  45. +161 −34 tgt-vvp/vvp_process.c
  46. +136 −95 tgt-vvp/vvp_scope.c
  47. +3 −2 vvp/Makefile.in
  48. +11 −1 vvp/README.txt
  49. +13 −3 vvp/codes.h
  50. +52 −2 vvp/compile.cc
  51. +24 −2 vvp/compile.h
  52. +9 −1 vvp/lexor.lex
  53. +34 −7 vvp/opcodes.txt
  54. +55 −27 vvp/parse.y
  55. +35 −1 vvp/schedule.cc
  56. +13 −1 vvp/schedule.h
  57. +19 −1 vvp/vpi_callback.cc
  58. +14 −2 vvp/vpi_priv.h
  59. +24 −23 vvp/vpi_signal.cc
  60. +75 −9 vvp/vthread.cc
  61. +15 −1 vvp/vvp_net.h
  62. +71 −10 vvp/words.cc
View
51 PExpr.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
-#ident "$Id: PExpr.h,v 1.86 2006/11/10 04:54:26 steve Exp $"
+#ident "$Id: PExpr.h,v 1.87 2007/01/16 05:44:14 steve Exp $"
#endif
# include <string>
@@ -294,9 +294,10 @@ class PEIdent : public PExpr {
bool calculate_up_do_width_(Design*, NetScope*, unsigned long&wid) const;
private:
- NetAssign_*elaborate_lval_net_part_(Design*, NetScope*, NetNet*) const;
- NetAssign_*elaborate_lval_net_idx_up_(Design*, NetScope*, NetNet*) const;
- NetAssign_*elaborate_lval_net_idx_do_(Design*, NetScope*, NetNet*) const;
+ NetAssign_*elaborate_lval_net_word_(Design*, NetScope*, NetNet*) const;
+ bool elaborate_lval_net_part_(Design*, NetScope*, NetAssign_*) const;
+ bool elaborate_lval_net_idx_up_(Design*, NetScope*, NetAssign_*) const;
+ bool elaborate_lval_net_idx_do_(Design*, NetScope*, NetAssign_*) const;
private:
NetExpr*elaborate_expr_param(Design*des,
@@ -306,24 +307,30 @@ class PEIdent : public PExpr {
const NetExpr*par_msb,
const NetExpr*par_lsb) const;
NetExpr*elaborate_expr_net(Design*des,
- NetScope*scope,
- NetNet*net,
- NetScope*found) const;
+ NetScope*scope,
+ NetNet*net,
+ NetScope*found,
+ bool sys_task_arg) const;
+ NetExpr*elaborate_expr_net_word_(Design*des,
+ NetScope*scope,
+ NetNet*net,
+ NetScope*found,
+ bool sys_task_arg) const;
NetExpr*elaborate_expr_net_part_(Design*des,
NetScope*scope,
- NetNet*net,
+ NetESignal*net,
NetScope*found) const;
NetExpr*elaborate_expr_net_idx_up_(Design*des,
NetScope*scope,
- NetNet*net,
+ NetESignal*net,
NetScope*found) const;
NetExpr*elaborate_expr_net_idx_do_(Design*des,
NetScope*scope,
- NetNet*net,
+ NetESignal*net,
NetScope*found) const;
NetExpr*elaborate_expr_net_bit_(Design*des,
NetScope*scope,
- NetNet*net,
+ NetESignal*net,
NetScope*found) const;
hname_t path_;
@@ -338,12 +345,13 @@ class PEIdent : public PExpr {
// expression. If this is a reference to a vector, this is a
// bit select.
std::vector<PExpr*> idx_;
-
- NetNet* elaborate_net_ram_(Design*des, NetScope*scope,
- NetMemory*mem, unsigned lwidth,
- const NetExpr* rise,
- const NetExpr* fall,
- const NetExpr* decay) const;
+ NetNet* elaborate_net_array_(Design*des, NetScope*scope,
+ NetNet*sig, unsigned lwidth,
+ const NetExpr* rise,
+ const NetExpr* fall,
+ const NetExpr* decay,
+ Link::strength_t drive0,
+ Link::strength_t drive1) const;
NetNet* elaborate_net_bitmux_(Design*des, NetScope*scope,
NetNet*sig,
@@ -354,9 +362,6 @@ class PEIdent : public PExpr {
Link::strength_t drive1) const;
private:
- NetAssign_* elaborate_mem_lval_(Design*des, NetScope*scope,
- NetMemory*mem) const;
-
NetNet* elaborate_lnet_common_(Design*des, NetScope*scope,
bool implicit_net_ok,
bool bidirectional_flag) const;
@@ -650,6 +655,12 @@ class PECallFunction : public PExpr {
/*
* $Log: PExpr.h,v $
+ * Revision 1.87 2007/01/16 05:44:14 steve
+ * Major rework of array handling. Memories are replaced with the
+ * more general concept of arrays. The NetMemory and NetEMemory
+ * classes are removed from the ivl core program, and the IVL_LPM_RAM
+ * lpm type is removed from the ivl_target API.
+ *
* Revision 1.86 2006/11/10 04:54:26 steve
* Add test_width methods for PETernary and PEString.
*
View
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
-#ident "$Id: PWire.cc,v 1.11 2005/07/07 16:22:49 steve Exp $"
+#ident "$Id: PWire.cc,v 1.12 2007/01/16 05:44:14 steve Exp $"
#endif
# include "config.h"
@@ -154,13 +154,18 @@ void PWire::set_memory_idx(PExpr*ldx, PExpr*rdx)
{
assert(lidx_ == 0);
assert(ridx_ == 0);
- assert(type_ == NetNet::REG);
lidx_ = ldx;
ridx_ = rdx;
}
/*
* $Log: PWire.cc,v $
+ * Revision 1.12 2007/01/16 05:44:14 steve
+ * Major rework of array handling. Memories are replaced with the
+ * more general concept of arrays. The NetMemory and NetEMemory
+ * classes are removed from the ivl core program, and the IVL_LPM_RAM
+ * lpm type is removed from the ivl_target API.
+ *
* Revision 1.11 2005/07/07 16:22:49 steve
* Generalize signals to carry types.
*
View
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
-#ident "$Id: design_dump.cc,v 1.171 2006/10/30 05:44:49 steve Exp $"
+#ident "$Id: design_dump.cc,v 1.172 2007/01/16 05:44:14 steve Exp $"
#endif
# include "config.h"
@@ -112,8 +112,8 @@ void NetDelaySrc::dump(ostream&o, unsigned ind) const
/* Dump a net. This can be a wire or register. */
void NetNet::dump_net(ostream&o, unsigned ind) const
{
- o << setw(ind) << "" << type() << ": " << name() << "[" <<
- pin_count() << "]";
+ o << setw(ind) << "" << type() << ": " << name()
+ << "[" << s0_ << ":" << e0_ << " count=" << pin_count() << "]";
if (local_flag_)
o << " (local)";
o << " " << data_type_;
@@ -167,13 +167,6 @@ void NetNet::dump_net(ostream&o, unsigned ind) const
dump_obj_attr(o, ind+4);
}
-void NetMemory::dump(ostream&o, unsigned ind) const
-{
- o << setw(ind) << "" << name_ << "[" << width_ << "] " <<
- "[" << idxh_ << ":" << idxl_ << "]" << endl;
-}
-
-
/* Dump a NetNode and its pins. Dump what I know about the netnode on
the first line, then list all the pins, with the name of the
connected signal. */
@@ -239,6 +232,15 @@ void NetAddSub::dump_node(ostream&o, unsigned ind) const
dump_obj_attr(o, ind+4);
}
+void NetArrayDq::dump_node(ostream&o, unsigned ind) const
+{
+ o << setw(ind) << "" << "NetArrayDq: " << name()
+ << " array=" << mem_->name()
+ << endl;
+ dump_node_pins(o, ind+4);
+ dump_obj_attr(o, ind+4);
+}
+
void NetCLShift::dump_node(ostream&o, unsigned ind) const
{
o << setw(ind) << "" << "Combinatorial shift (NetCLShift): " <<
@@ -427,14 +429,6 @@ void NetPartSelect::dump_node(ostream&o, unsigned ind) const
dump_obj_attr(o, ind+4);
}
-void NetRamDq::dump_node(ostream&o, unsigned ind) const
-{
- o << setw(ind) << "" << "LPM_RAM_DQ (" << mem_->name() << "): "
- << name() << endl;
- dump_node_pins(o, ind+4);
- dump_obj_attr(o, ind+4);
-}
-
void NetReplicate::dump_node(ostream&o, unsigned ind) const
{
o << setw(ind) << "" << "NetReplicate: "
@@ -566,21 +560,9 @@ void NetAssign_::dump_lval(ostream&o) const
{
if (sig_) {
o << sig_->name();
- if (bmux_) {
- o << "[" << *bmux_ << "]";
-
- } else if (base_) {
- o << "[" << *base_ << " +: " << lwid_ << "]";
+ if (word_) {
+ o << "[word=" << *word_ << "]";
}
- } else if (mem_) {
- // Is there an obvious way to flag memories in the dump
- // as different from the _real_ bit mux case?
- // o << "**memory**";
- o << mem_->name() << "[";
- if (bmux_) o << *bmux_;
- else o << "**oops**";
- o << "]";
-
if (base_) {
o << "[" << *base_ << " +: " << lwid_ << "]";
}
@@ -906,15 +888,6 @@ void NetScope::dump(ostream&o) const
} while (cur != signals_->sig_next_);
}
- // Dump the memories,
- if (memories_) {
- NetMemory*cur = memories_->snext_;
- do {
- cur->dump(o, 4);
- cur = cur->snext_;
- } while (cur != memories_->snext_);
- }
-
// Dump specparams
typedef map<perm_string,spec_val_t>::const_iterator specparam_it_t;
for (specparam_it_t cur = specparams.begin()
@@ -1148,14 +1121,9 @@ void NetESignal::dump(ostream&o) const
{
if (has_sign())
o << "+";
- o << name() << "[" << msi()<<":"<<lsi() << "]";
-}
-
-void NetEMemory::dump(ostream&o) const
-{
- o << mem_->name() << "[";
- if (idx_) idx_->dump(o);
- o << "]";
+ o << name();
+ if (word_) o << "[word=" << *word_ << "]";
+ o << "[" << msi()<<":"<<lsi() << "]";
}
void NetEParam::dump(ostream&o) const
@@ -1165,7 +1133,7 @@ void NetEParam::dump(ostream&o) const
else if (name_)
o << "<" << name_ << ">";
else
- o << "<???>";
+ o << "<" "???" ">";
}
void NetETernary::dump(ostream&o) const
@@ -1231,6 +1199,12 @@ void Design::dump(ostream&o) const
/*
* $Log: design_dump.cc,v $
+ * Revision 1.172 2007/01/16 05:44:14 steve
+ * Major rework of array handling. Memories are replaced with the
+ * more general concept of arrays. The NetMemory and NetEMemory
+ * classes are removed from the ivl core program, and the IVL_LPM_RAM
+ * lpm type is removed from the ivl_target API.
+ *
* Revision 1.171 2006/10/30 05:44:49 steve
* Expression widths with unsized literals are pseudo-infinite width.
*
Oops, something went wrong.

0 comments on commit 91d84e7

Please sign in to comment.