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.
This commit is contained in:
parent
41f7ecacfc
commit
89314d4772
|
|
@ -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: 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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -442,7 +442,7 @@ void NetAssign_::dump_lval(ostream&o) const
|
||||||
// Is there an obvious way to flag memories in the dump
|
// Is there an obvious way to flag memories in the dump
|
||||||
// as different from the _real_ bit mux case?
|
// as different from the _real_ bit mux case?
|
||||||
// o << "**memory**";
|
// o << "**memory**";
|
||||||
o << mem_->name().c_str() << "[";
|
o << mem_->name() << "[";
|
||||||
if (bmux_) o << *bmux_;
|
if (bmux_) o << *bmux_;
|
||||||
else o << "**oops**";
|
else o << "**oops**";
|
||||||
o << "]";
|
o << "]";
|
||||||
|
|
@ -984,6 +984,12 @@ void Design::dump(ostream&o) const
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: design_dump.cc,v $
|
* $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
|
* Revision 1.129 2002/06/19 04:20:03 steve
|
||||||
* Remove NetTmp and add NetSubnet class.
|
* Remove NetTmp and add NetSubnet class.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
28
ivl_target.h
28
ivl_target.h
|
|
@ -19,7 +19,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: 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
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
@ -461,6 +461,14 @@ extern unsigned ivl_expr_width(ivl_expr_t net);
|
||||||
/*
|
/*
|
||||||
* Memory.
|
* 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);
|
extern const char*ivl_memory_name(ivl_memory_t net);
|
||||||
|
|
@ -898,13 +906,21 @@ extern const char* ivl_scope_tname(ivl_scope_t net);
|
||||||
* ivl_signal_type
|
* ivl_signal_type
|
||||||
* Return the type of the signal, i.e., reg, wire, tri0, etc.
|
* 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
|
* This function returns the fully scoped hierarchical name for the
|
||||||
* signal. The name refers to the entire vector that is the signal.
|
* 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
|
* ivl_signal_basename
|
||||||
* This function returns the name of the signal, without the scope
|
* 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
|
* ivl_signal_attr
|
||||||
* Icarus Verilog supports attaching attributes to signals, with
|
* Icarus Verilog supports attaching attributes to signals, with
|
||||||
|
|
@ -1056,6 +1072,12 @@ _END_DECL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: ivl_target.h,v $
|
* $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
|
* Revision 1.101 2002/07/05 21:26:17 steve
|
||||||
* Avoid emitting to vvp local net symbols.
|
* Avoid emitting to vvp local net symbols.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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: 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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -95,7 +95,7 @@ const char*NetAssign_::name() const
|
||||||
if (sig_) {
|
if (sig_) {
|
||||||
return sig_->name();
|
return sig_->name();
|
||||||
} else if (mem_) {
|
} else if (mem_) {
|
||||||
return mem_->name().c_str();
|
return mem_->name();
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
@ -241,6 +241,12 @@ NetAssignNB::~NetAssignNB()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: net_assign.cc,v $
|
* $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
|
* Revision 1.13 2002/07/02 03:02:57 steve
|
||||||
* Change the signal to a net when assignments go away.
|
* Change the signal to a net when assignments go away.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
19
netlist.cc
19
netlist.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: 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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -1964,7 +1964,7 @@ NetEMemory::~NetEMemory()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const string& NetEMemory::name() const
|
const string NetEMemory::name() const
|
||||||
{
|
{
|
||||||
return mem_->name();
|
return mem_->name();
|
||||||
}
|
}
|
||||||
|
|
@ -1975,8 +1975,9 @@ const NetExpr* NetEMemory::index() const
|
||||||
}
|
}
|
||||||
|
|
||||||
NetMemory::NetMemory(NetScope*sc, const string&n, long w, long s, long e)
|
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);
|
scope_->add_memory(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1984,6 +1985,7 @@ NetMemory::~NetMemory()
|
||||||
{
|
{
|
||||||
assert(scope_);
|
assert(scope_);
|
||||||
scope_->rem_memory(this);
|
scope_->rem_memory(this);
|
||||||
|
free(name_);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned NetMemory::count() const
|
unsigned NetMemory::count() const
|
||||||
|
|
@ -1994,6 +1996,11 @@ unsigned NetMemory::count() const
|
||||||
return idxh_ - idxl_ + 1;
|
return idxh_ - idxl_ + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* NetMemory::name() const
|
||||||
|
{
|
||||||
|
return name_;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned NetMemory::index_to_address(long idx) const
|
unsigned NetMemory::index_to_address(long idx) const
|
||||||
{
|
{
|
||||||
if (idxh_ < idxl_)
|
if (idxh_ < idxl_)
|
||||||
|
|
@ -2304,6 +2311,12 @@ const NetProc*NetTaskDef::proc() const
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.cc,v $
|
* $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
|
* Revision 1.195 2002/07/28 23:58:44 steve
|
||||||
* Fix NetBlock destructor to delete substatements.
|
* Fix NetBlock destructor to delete substatements.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
14
netlist.h
14
netlist.h
|
|
@ -19,7 +19,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: 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
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -672,7 +672,7 @@ class NetMemory {
|
||||||
NetMemory(NetScope*sc, const string&n, long w, long s, long e);
|
NetMemory(NetScope*sc, const string&n, long w, long s, long e);
|
||||||
~NetMemory();
|
~NetMemory();
|
||||||
|
|
||||||
const string&name() const { return name_; }
|
const char*name() const;
|
||||||
|
|
||||||
// This is the width (in bits) of a single memory position.
|
// This is the width (in bits) of a single memory position.
|
||||||
unsigned width() const { return width_; }
|
unsigned width() const { return width_; }
|
||||||
|
|
@ -691,7 +691,7 @@ class NetMemory {
|
||||||
void dump(ostream&o, unsigned lm) const;
|
void dump(ostream&o, unsigned lm) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string name_;
|
char* name_;
|
||||||
unsigned width_;
|
unsigned width_;
|
||||||
long idxh_;
|
long idxh_;
|
||||||
long idxl_;
|
long idxl_;
|
||||||
|
|
@ -2602,7 +2602,7 @@ class NetEMemory : public NetExpr {
|
||||||
NetEMemory(NetMemory*mem, NetExpr*idx =0);
|
NetEMemory(NetMemory*mem, NetExpr*idx =0);
|
||||||
virtual ~NetEMemory();
|
virtual ~NetEMemory();
|
||||||
|
|
||||||
const string& name () const;
|
const string name () const;
|
||||||
const NetExpr* index() const;
|
const NetExpr* index() const;
|
||||||
|
|
||||||
virtual bool set_width(unsigned);
|
virtual bool set_width(unsigned);
|
||||||
|
|
@ -3006,6 +3006,12 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.h,v $
|
* $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
|
* Revision 1.254 2002/07/29 00:00:28 steve
|
||||||
* Asynchronous synthesis of sequential blocks.
|
* Asynchronous synthesis of sequential blocks.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,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: 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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -203,7 +203,7 @@ static void make_DFF_CE(Design*des, NetProcTop*top, NetEvWait*wclk,
|
||||||
} else if (a->mem()) {
|
} else if (a->mem()) {
|
||||||
NetMemory *m=a->mem();
|
NetMemory *m=a->mem();
|
||||||
NetNet *adr = a->bmux()->synthesize(des);
|
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());
|
m, adr->pin_count());
|
||||||
hookup_RAMDQ(ram, d, adr, pclk, ce, a, rval_pinoffset);
|
hookup_RAMDQ(ram, d, adr, pclk, ce, a, rval_pinoffset);
|
||||||
des->add_node(ram);
|
des->add_node(ram);
|
||||||
|
|
|
||||||
|
|
@ -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-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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -164,7 +164,7 @@ void dll_target::expr_memory(const NetEMemory*net)
|
||||||
cur->type_ = IVL_EX_MEMORY;
|
cur->type_ = IVL_EX_MEMORY;
|
||||||
cur->width_= net->expr_width();
|
cur->width_= net->expr_width();
|
||||||
cur->signed_ = net->has_sign()? 1 : 0;
|
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_;
|
cur->u_.memory_.idx_ = expr_;
|
||||||
|
|
||||||
expr_ = cur;
|
expr_ = cur;
|
||||||
|
|
@ -458,6 +458,12 @@ void dll_target::expr_unary(const NetEUnary*net)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll-expr.cc,v $
|
* $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
|
* Revision 1.26 2002/06/16 20:39:12 steve
|
||||||
* Normalize run-time index expressions for bit selects
|
* Normalize run-time index expressions for bit selects
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,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-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
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -166,7 +166,7 @@ void dll_target::proc_assign(const NetAssign*net)
|
||||||
} else {
|
} else {
|
||||||
assert(asn->mem());
|
assert(asn->mem());
|
||||||
cur->type_ = IVL_LVAL_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);
|
assert(cur->n.mem);
|
||||||
cur->width_ = ivl_memory_width(cur->n.mem);
|
cur->width_ = ivl_memory_width(cur->n.mem);
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ void dll_target::proc_assign_nb(const NetAssignNB*net)
|
||||||
} else {
|
} else {
|
||||||
assert(asn->mem());
|
assert(asn->mem());
|
||||||
cur->type_ = IVL_LVAL_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);
|
assert(cur->n.mem);
|
||||||
cur->width_ = ivl_memory_width(cur->n.mem);
|
cur->width_ = ivl_memory_width(cur->n.mem);
|
||||||
|
|
||||||
|
|
@ -786,6 +786,12 @@ void dll_target::proc_while(const NetWhile*net)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll-proc.cc,v $
|
* $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
|
* Revision 1.49 2002/06/16 20:39:12 steve
|
||||||
* Normalize run-time index expressions for bit selects
|
* Normalize run-time index expressions for bit selects
|
||||||
*
|
*
|
||||||
|
|
|
||||||
46
t-dll.cc
46
t-dll.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-dll.cc,v 1.91 2002/07/24 16:21:52 steve Exp $"
|
#ident "$Id: t-dll.cc,v 1.92 2002/08/04 18:28:15 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -232,40 +232,22 @@ ivl_signal_t dll_target::find_signal(ivl_design_s &des, const NetNet*net)
|
||||||
* NetMemory object. The search works by looking for the parent scope,
|
* NetMemory object. The search works by looking for the parent scope,
|
||||||
* then scanning the parent scope for the NetMemory object.
|
* then scanning the parent scope for the NetMemory object.
|
||||||
*/
|
*/
|
||||||
static ivl_memory_t find_memory(ivl_scope_t root, const NetMemory*cur)
|
ivl_memory_t dll_target::find_memory(ivl_design_s &des, const NetMemory*net)
|
||||||
{
|
{
|
||||||
ivl_scope_t tmp;
|
ivl_scope_t scope = find_scope(des, net->scope());
|
||||||
ivl_memory_t mem ;
|
assert(scope);
|
||||||
|
|
||||||
if (!root)
|
const char*nname = net->name();
|
||||||
return 0;
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < ivl_scope_mems(root); i++) {
|
for (unsigned idx = 0 ; idx < scope->nmem_ ; idx += 1) {
|
||||||
mem = ivl_scope_mem(root, i);
|
if (strcmp(scope->mem_[idx]->name_, nname) == 0)
|
||||||
if (!strcmp(ivl_memory_name(mem), cur->name().c_str()))
|
return scope->mem_[idx];
|
||||||
return mem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mem = find_memory(root->child_, cur);
|
assert(0);
|
||||||
if (mem)
|
|
||||||
return mem;
|
|
||||||
|
|
||||||
mem = find_memory(root->sibling_, cur);
|
|
||||||
if (mem)
|
|
||||||
return mem;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ivl_memory_t dll_target::lookup_memory_(const NetMemory*cur)
|
|
||||||
{
|
|
||||||
unsigned i;
|
|
||||||
ivl_memory_t mem = NULL;
|
|
||||||
for (i = 0; i < des_.nroots_ && mem == NULL; i++)
|
|
||||||
mem = find_memory(des_.roots_[i], cur);
|
|
||||||
return mem;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ivl_nexus_t nexus_sig_make(ivl_signal_t net, unsigned pin)
|
static ivl_nexus_t nexus_sig_make(ivl_signal_t net, unsigned pin)
|
||||||
{
|
{
|
||||||
ivl_nexus_t tmp = new struct ivl_nexus_s;
|
ivl_nexus_t tmp = new struct ivl_nexus_s;
|
||||||
|
|
@ -942,7 +924,7 @@ void dll_target::udp(const NetUDP*net)
|
||||||
void dll_target::memory(const NetMemory*net)
|
void dll_target::memory(const NetMemory*net)
|
||||||
{
|
{
|
||||||
ivl_memory_t obj = new struct ivl_memory_s;
|
ivl_memory_t obj = new struct ivl_memory_s;
|
||||||
obj->name_ = strdup(net->name().c_str());
|
obj->name_ = strdup(net->name());
|
||||||
obj->scope_ = find_scope(des_, net->scope());
|
obj->scope_ = find_scope(des_, net->scope());
|
||||||
obj->width_ = net->width();
|
obj->width_ = net->width();
|
||||||
obj->signed_ = 0;
|
obj->signed_ = 0;
|
||||||
|
|
@ -1408,7 +1390,7 @@ void dll_target::lpm_ram_dq(const NetRamDq*net)
|
||||||
ivl_lpm_t obj = new struct ivl_lpm_s;
|
ivl_lpm_t obj = new struct ivl_lpm_s;
|
||||||
obj->type = IVL_LPM_RAM;
|
obj->type = IVL_LPM_RAM;
|
||||||
obj->name = strdup(net->name());
|
obj->name = strdup(net->name());
|
||||||
obj->u_.ff.mem = lookup_memory_(net->mem());
|
obj->u_.ff.mem = find_memory(des_, net->mem());
|
||||||
assert(obj->u_.ff.mem);
|
assert(obj->u_.ff.mem);
|
||||||
obj->scope = find_scope(des_, net->mem()->scope());
|
obj->scope = find_scope(des_, net->mem()->scope());
|
||||||
assert(obj->scope);
|
assert(obj->scope);
|
||||||
|
|
@ -1959,6 +1941,12 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll.cc,v $
|
* $Log: t-dll.cc,v $
|
||||||
|
* Revision 1.92 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.91 2002/07/24 16:21:52 steve
|
* Revision 1.91 2002/07/24 16:21:52 steve
|
||||||
* Verbose messages.
|
* Verbose messages.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
10
t-dll.h
10
t-dll.h
|
|
@ -19,7 +19,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-dll.h,v 1.87 2002/07/05 21:26:17 steve Exp $"
|
#ident "$Id: t-dll.h,v 1.88 2002/08/04 18:28:15 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "target.h"
|
# include "target.h"
|
||||||
|
|
@ -139,13 +139,13 @@ struct dll_target : public target_t, public expr_scan_t {
|
||||||
void expr_signal(const NetESignal*);
|
void expr_signal(const NetESignal*);
|
||||||
|
|
||||||
ivl_scope_t lookup_scope_(const NetScope*scope);
|
ivl_scope_t lookup_scope_(const NetScope*scope);
|
||||||
ivl_memory_t lookup_memory_(const NetMemory*mem);
|
|
||||||
|
|
||||||
static ivl_attribute_s* fill_in_attributes(const Attrib*net);
|
static ivl_attribute_s* fill_in_attributes(const Attrib*net);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static ivl_scope_t find_scope(ivl_design_s &des, const NetScope*cur);
|
static ivl_scope_t find_scope(ivl_design_s &des, const NetScope*cur);
|
||||||
static ivl_signal_t find_signal(ivl_design_s &des, const NetNet*net);
|
static ivl_signal_t find_signal(ivl_design_s &des, const NetNet*net);
|
||||||
|
static ivl_memory_t find_memory(ivl_design_s &des, const NetMemory*net);
|
||||||
void add_root(ivl_design_s &des_, const NetScope *s);
|
void add_root(ivl_design_s &des_, const NetScope *s);
|
||||||
|
|
||||||
void sub_off_from_expr_(long);
|
void sub_off_from_expr_(long);
|
||||||
|
|
@ -611,6 +611,12 @@ struct ivl_statement_s {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll.h,v $
|
* $Log: t-dll.h,v $
|
||||||
|
* Revision 1.88 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.87 2002/07/05 21:26:17 steve
|
* Revision 1.87 2002/07/05 21:26:17 steve
|
||||||
* Avoid emitting to vvp local net symbols.
|
* Avoid emitting to vvp local net symbols.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: eval_expr.c,v 1.66 2002/08/03 22:30:48 steve Exp $"
|
#ident "$Id: eval_expr.c,v 1.67 2002/08/04 18:28:15 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vvp_priv.h"
|
# include "vvp_priv.h"
|
||||||
|
|
@ -1162,10 +1162,11 @@ static struct vector_info draw_memory_expr(ivl_expr_t exp, unsigned wid)
|
||||||
{
|
{
|
||||||
unsigned swid = ivl_expr_width(exp);
|
unsigned swid = ivl_expr_width(exp);
|
||||||
const char*name = ivl_expr_name(exp);
|
const char*name = ivl_expr_name(exp);
|
||||||
|
ivl_memory_t mem = ivl_expr_memory(exp);
|
||||||
struct vector_info res;
|
struct vector_info res;
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
|
|
||||||
draw_memory_index_expr(ivl_expr_memory(exp), ivl_expr_oper1(exp));
|
draw_memory_index_expr(mem, ivl_expr_oper1(exp));
|
||||||
|
|
||||||
if (swid > wid)
|
if (swid > wid)
|
||||||
swid = wid;
|
swid = wid;
|
||||||
|
|
@ -1177,7 +1178,7 @@ static struct vector_info draw_memory_expr(ivl_expr_t exp, unsigned wid)
|
||||||
if (idx)
|
if (idx)
|
||||||
fprintf(vvp_out, " %%ix/add 3, 1;\n");
|
fprintf(vvp_out, " %%ix/add 3, 1;\n");
|
||||||
fprintf(vvp_out, " %%load/m %u, M_%s;\n",
|
fprintf(vvp_out, " %%load/m %u, M_%s;\n",
|
||||||
res.base+idx, vvp_mangle_id(name));
|
res.base+idx, vvp_memory_label(mem));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pad the signal value with zeros. */
|
/* Pad the signal value with zeros. */
|
||||||
|
|
@ -1384,7 +1385,7 @@ static struct vector_info draw_sfunc_expr(ivl_expr_t exp, unsigned wid)
|
||||||
case IVL_EX_MEMORY:
|
case IVL_EX_MEMORY:
|
||||||
if (!ivl_expr_oper1(expr)) {
|
if (!ivl_expr_oper1(expr)) {
|
||||||
fprintf(vvp_out, ", M_%s",
|
fprintf(vvp_out, ", M_%s",
|
||||||
vvp_mangle_id(ivl_expr_name(expr)));
|
vvp_memory_label(ivl_expr_memory(expr)));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -1726,6 +1727,12 @@ struct vector_info draw_eval_expr(ivl_expr_t exp)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: eval_expr.c,v $
|
* $Log: eval_expr.c,v $
|
||||||
|
* Revision 1.67 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.66 2002/08/03 22:30:48 steve
|
* Revision 1.66 2002/08/03 22:30:48 steve
|
||||||
* Eliminate use of ivl_signal_name for signal labels.
|
* Eliminate use of ivl_signal_name for signal labels.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: vvp_priv.h,v 1.16 2002/08/03 22:30:48 steve Exp $"
|
#ident "$Id: vvp_priv.h,v 1.17 2002/08/04 18:28:15 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "ivl_target.h"
|
# include "ivl_target.h"
|
||||||
|
|
@ -43,6 +43,11 @@ extern const char *vvp_mangle_name(const char *);
|
||||||
*/
|
*/
|
||||||
extern const char* vvp_signal_label(ivl_signal_t sig);
|
extern const char* vvp_signal_label(ivl_signal_t sig);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This generates a label string for a memory.
|
||||||
|
*/
|
||||||
|
extern const char* vvp_memory_label(ivl_memory_t mem);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function draws a process (initial or always) into the output
|
* This function draws a process (initial or always) into the output
|
||||||
* file. It normally returns 0, but returns !0 of there is some sort
|
* file. It normally returns 0, but returns !0 of there is some sort
|
||||||
|
|
@ -103,6 +108,12 @@ extern unsigned thread_count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vvp_priv.h,v $
|
* $Log: vvp_priv.h,v $
|
||||||
|
* Revision 1.17 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.16 2002/08/03 22:30:48 steve
|
* Revision 1.16 2002/08/03 22:30:48 steve
|
||||||
* Eliminate use of ivl_signal_name for signal labels.
|
* Eliminate use of ivl_signal_name for signal labels.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: vvp_process.c,v 1.60 2002/08/03 22:30:48 steve Exp $"
|
#ident "$Id: vvp_process.c,v 1.61 2002/08/04 18:28:15 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vvp_priv.h"
|
# include "vvp_priv.h"
|
||||||
|
|
@ -89,7 +89,7 @@ static void set_to_memory(ivl_memory_t mem, unsigned idx, unsigned bit)
|
||||||
if (idx)
|
if (idx)
|
||||||
fprintf(vvp_out, " %%ix/add 3, 1;\n");
|
fprintf(vvp_out, " %%ix/add 3, 1;\n");
|
||||||
fprintf(vvp_out, " %%set/m M_%s, %u;\n",
|
fprintf(vvp_out, " %%set/m M_%s, %u;\n",
|
||||||
vvp_mangle_id(ivl_memory_name(mem)), bit);
|
vvp_memory_label(mem), bit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -122,7 +122,7 @@ static void assign_to_memory(ivl_memory_t mem, unsigned idx,
|
||||||
if (idx)
|
if (idx)
|
||||||
fprintf(vvp_out, " %%ix/add 3, 1;\n");
|
fprintf(vvp_out, " %%ix/add 3, 1;\n");
|
||||||
fprintf(vvp_out, " %%assign/m M_%s, %u, %u;\n",
|
fprintf(vvp_out, " %%assign/m M_%s, %u, %u;\n",
|
||||||
vvp_mangle_id(ivl_memory_name(mem)), delay, bit);
|
vvp_memory_label(mem), delay, bit);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void calculate_into_x0(ivl_expr_t expr)
|
static void calculate_into_x0(ivl_expr_t expr)
|
||||||
|
|
@ -1001,7 +1001,7 @@ static int show_system_task_call(ivl_statement_t net)
|
||||||
case IVL_EX_MEMORY:
|
case IVL_EX_MEMORY:
|
||||||
if (!ivl_expr_oper1(expr)) {
|
if (!ivl_expr_oper1(expr)) {
|
||||||
fprintf(vvp_out, ", M_%s",
|
fprintf(vvp_out, ", M_%s",
|
||||||
vvp_mangle_id(ivl_expr_name(expr)));
|
vvp_memory_label(ivl_expr_memory(expr)));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -1221,6 +1221,12 @@ int draw_func_definition(ivl_scope_t scope)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vvp_process.c,v $
|
* $Log: vvp_process.c,v $
|
||||||
|
* Revision 1.61 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.60 2002/08/03 22:30:48 steve
|
* Revision 1.60 2002/08/03 22:30:48 steve
|
||||||
* Eliminate use of ivl_signal_name for signal labels.
|
* Eliminate use of ivl_signal_name for signal labels.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: vvp_scope.c,v 1.75 2002/08/03 22:30:48 steve Exp $"
|
#ident "$Id: vvp_scope.c,v 1.76 2002/08/04 18:28:15 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "vvp_priv.h"
|
# include "vvp_priv.h"
|
||||||
|
|
@ -139,6 +139,16 @@ const char* vvp_signal_label(ivl_signal_t sig)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This makes a string suitable for use as a label for memories.
|
||||||
|
*/
|
||||||
|
const char* vvp_memory_label(ivl_memory_t mem)
|
||||||
|
{
|
||||||
|
static char buf[32];
|
||||||
|
sprintf(buf, "$%p", mem);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
ivl_signal_type_t signal_type_of_nexus(ivl_nexus_t nex)
|
ivl_signal_type_t signal_type_of_nexus(ivl_nexus_t nex)
|
||||||
{
|
{
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
|
|
@ -1045,7 +1055,7 @@ inline static void draw_lpm_ram(ivl_lpm_t net)
|
||||||
vvp_mangle_id(ivl_lpm_name(net)));
|
vvp_mangle_id(ivl_lpm_name(net)));
|
||||||
fprintf(vvp_out,
|
fprintf(vvp_out,
|
||||||
" M_%s, %d,0, %d,\n ",
|
" M_%s, %d,0, %d,\n ",
|
||||||
vvp_mangle_id(ivl_memory_name(mem)),
|
vvp_memory_label(mem),
|
||||||
width-1,
|
width-1,
|
||||||
awidth);
|
awidth);
|
||||||
|
|
||||||
|
|
@ -1395,7 +1405,7 @@ static void draw_mem_in_scope(ivl_memory_t net)
|
||||||
int msb = ivl_memory_width(net) - 1;
|
int msb = ivl_memory_width(net) - 1;
|
||||||
int lsb = 0;
|
int lsb = 0;
|
||||||
fprintf(vvp_out, "M_%s .mem \"%s\", %u,%u, %u,%u;\n",
|
fprintf(vvp_out, "M_%s .mem \"%s\", %u,%u, %u,%u;\n",
|
||||||
vvp_mangle_id(ivl_memory_name(net)),
|
vvp_memory_label(net),
|
||||||
vvp_mangle_name(ivl_memory_basename(net)),
|
vvp_mangle_name(ivl_memory_basename(net)),
|
||||||
msb, lsb, root, last);
|
msb, lsb, root, last);
|
||||||
}
|
}
|
||||||
|
|
@ -1478,6 +1488,12 @@ int draw_scope(ivl_scope_t net, ivl_scope_t parent)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: vvp_scope.c,v $
|
* $Log: vvp_scope.c,v $
|
||||||
|
* Revision 1.76 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.75 2002/08/03 22:30:48 steve
|
* Revision 1.75 2002/08/03 22:30:48 steve
|
||||||
* Eliminate use of ivl_signal_name for signal labels.
|
* Eliminate use of ivl_signal_name for signal labels.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue