Skip to content

Commit

Permalink
Do not use hierarchical names of memories to
Browse files Browse the repository at this point in the history
 generate vvp labels. -tdll target does not
 used hierarchical name string to look up the
 memory objects in the design.
  • Loading branch information
steve committed Aug 4, 2002
1 parent 41f7eca commit 89314d4
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 64 deletions.
10 changes: 8 additions & 2 deletions design_dump.cc
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: design_dump.cc,v 1.129 2002/06/19 04:20:03 steve Exp $"
#ident "$Id: design_dump.cc,v 1.130 2002/08/04 18:28:14 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -442,7 +442,7 @@ void NetAssign_::dump_lval(ostream&o) const
// Is there an obvious way to flag memories in the dump
// as different from the _real_ bit mux case?
// o << "**memory**";
o << mem_->name().c_str() << "[";
o << mem_->name() << "[";
if (bmux_) o << *bmux_;
else o << "**oops**";
o << "]";
Expand Down Expand Up @@ -984,6 +984,12 @@ void Design::dump(ostream&o) const

/*
* $Log: design_dump.cc,v $
* Revision 1.130 2002/08/04 18:28:14 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.129 2002/06/19 04:20:03 steve
* Remove NetTmp and add NetSubnet class.
*
Expand Down
28 changes: 25 additions & 3 deletions ivl_target.h
Expand Up @@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: ivl_target.h,v 1.101 2002/07/05 21:26:17 steve Exp $"
#ident "$Id: ivl_target.h,v 1.102 2002/08/04 18:28:14 steve Exp $"
#endif

#ifdef __cplusplus
Expand Down Expand Up @@ -461,6 +461,14 @@ extern unsigned ivl_expr_width(ivl_expr_t net);
/*
* Memory.
*
* ivl_memory_name (DEPRECATED)
*
* ivl_memory_basename
* This returns the base name of the memory object. The base name
* does not include the name of the scopes that contains the object.
*
* ivl_memory_size
* ivl_memory_width
*/

extern const char*ivl_memory_name(ivl_memory_t net);
Expand Down Expand Up @@ -898,13 +906,21 @@ extern const char* ivl_scope_tname(ivl_scope_t net);
* ivl_signal_type
* Return the type of the signal, i.e., reg, wire, tri0, etc.
*
* ivl_signal_name
* ivl_signal_name (DEPRECATED)
* This function returns the fully scoped hierarchical name for the
* signal. The name refers to the entire vector that is the signal.
*
* NOTE: This function is deprecated. The heirarchical name is too
* vague a construct when escaped names can have . characters in
* them. Do no use this function in new code, it will disappear.
*
* ivl_signal_basename
* This function returns the name of the signal, without the scope
* information. This is the tail of the signal name.
* information. This is the tail of the signal name. Since Verilog
* has an escape syntax, this name can contain any ASCII
* characters, except NULL or white space. The leading \ and
* trailing ' ' of escaped names in Verilog source are not part of
* the name, so not included here.
*
* ivl_signal_attr
* Icarus Verilog supports attaching attributes to signals, with
Expand Down Expand Up @@ -1056,6 +1072,12 @@ _END_DECL

/*
* $Log: ivl_target.h,v $
* Revision 1.102 2002/08/04 18:28:14 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.101 2002/07/05 21:26:17 steve
* Avoid emitting to vvp local net symbols.
*
Expand Down
10 changes: 8 additions & 2 deletions net_assign.cc
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: net_assign.cc,v 1.13 2002/07/02 03:02:57 steve Exp $"
#ident "$Id: net_assign.cc,v 1.14 2002/08/04 18:28:15 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -95,7 +95,7 @@ const char*NetAssign_::name() const
if (sig_) {
return sig_->name();
} else if (mem_) {
return mem_->name().c_str();
return mem_->name();
} else {
return "";
}
Expand Down Expand Up @@ -241,6 +241,12 @@ NetAssignNB::~NetAssignNB()

/*
* $Log: net_assign.cc,v $
* Revision 1.14 2002/08/04 18:28:15 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.13 2002/07/02 03:02:57 steve
* Change the signal to a net when assignments go away.
*
Expand Down
19 changes: 16 additions & 3 deletions netlist.cc
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: netlist.cc,v 1.195 2002/07/28 23:58:44 steve Exp $"
#ident "$Id: netlist.cc,v 1.196 2002/08/04 18:28:15 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -1964,7 +1964,7 @@ NetEMemory::~NetEMemory()
{
}

const string& NetEMemory::name() const
const string NetEMemory::name() const
{
return mem_->name();
}
Expand All @@ -1975,15 +1975,17 @@ const NetExpr* NetEMemory::index() const
}

NetMemory::NetMemory(NetScope*sc, const string&n, long w, long s, long e)
: name_(n), width_(w), idxh_(s), idxl_(e), ram_list_(0), scope_(sc)
: width_(w), idxh_(s), idxl_(e), ram_list_(0), scope_(sc)
{
name_ = strdup(n.c_str());
scope_->add_memory(this);
}

NetMemory::~NetMemory()
{
assert(scope_);
scope_->rem_memory(this);
free(name_);
}

unsigned NetMemory::count() const
Expand All @@ -1994,6 +1996,11 @@ unsigned NetMemory::count() const
return idxh_ - idxl_ + 1;
}

const char* NetMemory::name() const
{
return name_;
}

unsigned NetMemory::index_to_address(long idx) const
{
if (idxh_ < idxl_)
Expand Down Expand Up @@ -2304,6 +2311,12 @@ const NetProc*NetTaskDef::proc() const

/*
* $Log: netlist.cc,v $
* Revision 1.196 2002/08/04 18:28:15 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.195 2002/07/28 23:58:44 steve
* Fix NetBlock destructor to delete substatements.
*
Expand Down
14 changes: 10 additions & 4 deletions netlist.h
Expand Up @@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: netlist.h,v 1.254 2002/07/29 00:00:28 steve Exp $"
#ident "$Id: netlist.h,v 1.255 2002/08/04 18:28:15 steve Exp $"
#endif

/*
Expand Down Expand Up @@ -672,7 +672,7 @@ class NetMemory {
NetMemory(NetScope*sc, const string&n, long w, long s, long e);
~NetMemory();

const string&name() const { return name_; }
const char*name() const;

// This is the width (in bits) of a single memory position.
unsigned width() const { return width_; }
Expand All @@ -691,7 +691,7 @@ class NetMemory {
void dump(ostream&o, unsigned lm) const;

private:
string name_;
char* name_;
unsigned width_;
long idxh_;
long idxl_;
Expand Down Expand Up @@ -2602,7 +2602,7 @@ class NetEMemory : public NetExpr {
NetEMemory(NetMemory*mem, NetExpr*idx =0);
virtual ~NetEMemory();

const string& name () const;
const string name () const;
const NetExpr* index() const;

virtual bool set_width(unsigned);
Expand Down Expand Up @@ -3006,6 +3006,12 @@ extern ostream& operator << (ostream&, NetNet::Type);

/*
* $Log: netlist.h,v $
* Revision 1.255 2002/08/04 18:28:15 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.254 2002/07/29 00:00:28 steve
* Asynchronous synthesis of sequential blocks.
*
Expand Down
4 changes: 2 additions & 2 deletions syn-rules.y
Expand Up @@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: syn-rules.y,v 1.22 2002/06/25 01:33:22 steve Exp $"
#ident "$Id: syn-rules.y,v 1.23 2002/08/04 18:28:15 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -203,7 +203,7 @@ static void make_DFF_CE(Design*des, NetProcTop*top, NetEvWait*wclk,
} else if (a->mem()) {
NetMemory *m=a->mem();
NetNet *adr = a->bmux()->synthesize(des);
NetRamDq*ram = new NetRamDq(top->scope(), m->name().c_str(),
NetRamDq*ram = new NetRamDq(top->scope(), m->name(),
m, adr->pin_count());
hookup_RAMDQ(ram, d, adr, pclk, ce, a, rval_pinoffset);
des->add_node(ram);
Expand Down
10 changes: 8 additions & 2 deletions t-dll-expr.cc
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) & !defined(macintosh)
#ident "$Id: t-dll-expr.cc,v 1.26 2002/06/16 20:39:12 steve Exp $"
#ident "$Id: t-dll-expr.cc,v 1.27 2002/08/04 18:28:15 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -164,7 +164,7 @@ void dll_target::expr_memory(const NetEMemory*net)
cur->type_ = IVL_EX_MEMORY;
cur->width_= net->expr_width();
cur->signed_ = net->has_sign()? 1 : 0;
cur->u_.memory_.mem_ = lookup_memory_(net->memory());
cur->u_.memory_.mem_ = find_memory(des_, net->memory());
cur->u_.memory_.idx_ = expr_;

expr_ = cur;
Expand Down Expand Up @@ -458,6 +458,12 @@ void dll_target::expr_unary(const NetEUnary*net)

/*
* $Log: t-dll-expr.cc,v $
* Revision 1.27 2002/08/04 18:28:15 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.26 2002/06/16 20:39:12 steve
* Normalize run-time index expressions for bit selects
*
Expand Down
12 changes: 9 additions & 3 deletions t-dll-proc.cc
Expand Up @@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-dll-proc.cc,v 1.49 2002/06/16 20:39:12 steve Exp $"
#ident "$Id: t-dll-proc.cc,v 1.50 2002/08/04 18:28:15 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -166,7 +166,7 @@ void dll_target::proc_assign(const NetAssign*net)
} else {
assert(asn->mem());
cur->type_ = IVL_LVAL_MEM;
cur->n.mem = lookup_memory_(asn->mem());
cur->n.mem = find_memory(des_, asn->mem());
assert(cur->n.mem);
cur->width_ = ivl_memory_width(cur->n.mem);

Expand Down Expand Up @@ -232,7 +232,7 @@ void dll_target::proc_assign_nb(const NetAssignNB*net)
} else {
assert(asn->mem());
cur->type_ = IVL_LVAL_MEM;
cur->n.mem = lookup_memory_(asn->mem());
cur->n.mem = find_memory(des_, asn->mem());
assert(cur->n.mem);
cur->width_ = ivl_memory_width(cur->n.mem);

Expand Down Expand Up @@ -786,6 +786,12 @@ void dll_target::proc_while(const NetWhile*net)

/*
* $Log: t-dll-proc.cc,v $
* Revision 1.50 2002/08/04 18:28:15 steve
* Do not use hierarchical names of memories to
* generate vvp labels. -tdll target does not
* used hierarchical name string to look up the
* memory objects in the design.
*
* Revision 1.49 2002/06/16 20:39:12 steve
* Normalize run-time index expressions for bit selects
*
Expand Down

0 comments on commit 89314d4

Please sign in to comment.