Memory and Event names use perm_string.
This commit is contained in:
parent
2d7380c03b
commit
536068bdfb
11
PEvent.cc
11
PEvent.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2004 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -17,14 +17,14 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: PEvent.cc,v 1.4 2003/03/01 06:25:30 steve Exp $"
|
||||
#ident "$Id: PEvent.cc,v 1.5 2004/02/19 06:57:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
||||
# include "PEvent.h"
|
||||
|
||||
PEvent::PEvent(const char*n)
|
||||
PEvent::PEvent(perm_string n)
|
||||
: name_(n)
|
||||
{
|
||||
}
|
||||
|
|
@ -33,13 +33,16 @@ PEvent::~PEvent()
|
|||
{
|
||||
}
|
||||
|
||||
const char* PEvent::name() const
|
||||
perm_string PEvent::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
/*
|
||||
* $Log: PEvent.cc,v $
|
||||
* Revision 1.5 2004/02/19 06:57:10 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.4 2003/03/01 06:25:30 steve
|
||||
* Add the lex_strings string handler, and put
|
||||
* scope names and system task/function names
|
||||
|
|
|
|||
17
PEvent.h
17
PEvent.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __PEvent_H
|
||||
#define __PEvent_H
|
||||
/*
|
||||
* Copyright (c) 2000 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2004 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -19,10 +19,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: PEvent.h,v 1.8 2003/03/01 06:25:30 steve Exp $"
|
||||
#ident "$Id: PEvent.h,v 1.9 2004/02/19 06:57:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "LineInfo.h"
|
||||
# include "StringHeap.h"
|
||||
# include <string>
|
||||
|
||||
class Design;
|
||||
|
|
@ -36,16 +37,17 @@ class NetScope;
|
|||
class PEvent : public LineInfo {
|
||||
|
||||
public:
|
||||
// The name is a perm-allocated string.
|
||||
explicit PEvent(const char*name);
|
||||
// The name is a perm-allocated string. It is the simple name
|
||||
// of the event, without any scope.
|
||||
explicit PEvent(perm_string name);
|
||||
~PEvent();
|
||||
|
||||
const char* name() const;
|
||||
perm_string name() const;
|
||||
|
||||
void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
|
||||
private:
|
||||
const char* name_;
|
||||
perm_string name_;
|
||||
|
||||
private: // not implemented
|
||||
PEvent(const PEvent&);
|
||||
|
|
@ -54,6 +56,9 @@ class PEvent : public LineInfo {
|
|||
|
||||
/*
|
||||
* $Log: PEvent.h,v $
|
||||
* Revision 1.9 2004/02/19 06:57:10 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.8 2003/03/01 06:25:30 steve
|
||||
* Add the lex_strings string handler, and put
|
||||
* scope names and system task/function names
|
||||
|
|
|
|||
11
net_event.cc
11
net_event.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: net_event.cc,v 1.24 2004/02/18 17:11:56 steve Exp $"
|
||||
#ident "$Id: net_event.cc,v 1.25 2004/02/19 06:57:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
/*
|
||||
* NOTE: The name_ is perm-allocated by the caller.
|
||||
*/
|
||||
NetEvent::NetEvent(const char*n)
|
||||
NetEvent::NetEvent(perm_string n)
|
||||
: name_(n)
|
||||
{
|
||||
scope_ = 0;
|
||||
|
|
@ -51,7 +51,7 @@ NetEvent::~NetEvent()
|
|||
/* name_ is lex_strings. */
|
||||
}
|
||||
|
||||
const char* NetEvent::name() const
|
||||
perm_string NetEvent::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ const char* NetEvent::name() const
|
|||
string NetEvent::full_name() const
|
||||
{
|
||||
assert(scope_);
|
||||
return scope_->name() + "." + name_;
|
||||
return scope_->name() + "." + string(name_);
|
||||
}
|
||||
|
||||
const NetScope* NetEvent::scope() const
|
||||
|
|
@ -449,6 +449,9 @@ NetProc* NetEvWait::statement()
|
|||
|
||||
/*
|
||||
* $Log: net_event.cc,v $
|
||||
* Revision 1.25 2004/02/19 06:57:10 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.24 2004/02/18 17:11:56 steve
|
||||
* Use perm_strings for named langiage items.
|
||||
*
|
||||
|
|
|
|||
11
netlist.h
11
netlist.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: netlist.h,v 1.308 2004/02/18 17:11:57 steve Exp $"
|
||||
#ident "$Id: netlist.h,v 1.309 2004/02/19 06:57:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -1776,10 +1776,10 @@ class NetEvent : public LineInfo {
|
|||
// The name of the event is the basename, and should not
|
||||
// include the scope. Also, the name passed here should be
|
||||
// perm-allocated.
|
||||
explicit NetEvent (const char*n);
|
||||
explicit NetEvent (perm_string n);
|
||||
~NetEvent();
|
||||
|
||||
const char* name() const;
|
||||
perm_string name() const;
|
||||
string full_name() const;
|
||||
|
||||
// Get information about probes connected to me.
|
||||
|
|
@ -1812,7 +1812,7 @@ class NetEvent : public LineInfo {
|
|||
NexusSet*nex_async_();
|
||||
|
||||
private:
|
||||
const char* name_;
|
||||
perm_string name_;
|
||||
|
||||
// The NetScope class uses these to list the events.
|
||||
NetScope*scope_;
|
||||
|
|
@ -3315,6 +3315,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
|||
|
||||
/*
|
||||
* $Log: netlist.h,v $
|
||||
* Revision 1.309 2004/02/19 06:57:10 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.308 2004/02/18 17:11:57 steve
|
||||
* Use perm_strings for named langiage items.
|
||||
*
|
||||
|
|
|
|||
7
pform.cc
7
pform.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: pform.cc,v 1.120 2004/02/18 17:11:57 steve Exp $"
|
||||
#ident "$Id: pform.cc,v 1.121 2004/02/19 06:57:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -632,7 +632,7 @@ void pform_set_net_range(list<char*>*names,
|
|||
*/
|
||||
static void pform_make_event(const char*name, const char*fn, unsigned ln)
|
||||
{
|
||||
PEvent*event = new PEvent(lex_strings.add(name));
|
||||
PEvent*event = new PEvent(lex_strings.make(name));
|
||||
event->set_file(fn);
|
||||
event->set_lineno(ln);
|
||||
pform_cur_module->events[name] = event;
|
||||
|
|
@ -1519,6 +1519,9 @@ int pform_parse(const char*path, FILE*file)
|
|||
|
||||
/*
|
||||
* $Log: pform.cc,v $
|
||||
* Revision 1.121 2004/02/19 06:57:10 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.120 2004/02/18 17:11:57 steve
|
||||
* Use perm_strings for named langiage items.
|
||||
*
|
||||
|
|
|
|||
129
t-dll.cc
129
t-dll.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2003 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2004 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: t-dll.cc,v 1.126 2004/02/18 17:11:58 steve Exp $"
|
||||
#ident "$Id: t-dll.cc,v 1.127 2004/02/19 06:57:10 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1088,7 +1088,7 @@ void dll_target::memory(const NetMemory*net)
|
|||
ivl_memory_t obj = new struct ivl_memory_s;
|
||||
|
||||
obj->scope_ = find_scope(des_, net->scope());
|
||||
obj->basename_ = strings_.make(net->name());
|
||||
obj->basename_ = net->name();
|
||||
obj->width_ = net->width();
|
||||
obj->signed_ = 0;
|
||||
obj->size_ = net->count();
|
||||
|
|
@ -2176,6 +2176,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
|||
|
||||
/*
|
||||
* $Log: t-dll.cc,v $
|
||||
* Revision 1.127 2004/02/19 06:57:10 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.126 2004/02/18 17:11:58 steve
|
||||
* Use perm_strings for named langiage items.
|
||||
*
|
||||
|
|
@ -2199,125 +2202,5 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
|||
*
|
||||
* Revision 1.119 2003/08/15 02:23:53 steve
|
||||
* Add synthesis support for synchronous reset.
|
||||
*
|
||||
* Revision 1.118 2003/07/30 01:13:28 steve
|
||||
* Add support for triand and trior.
|
||||
*
|
||||
* Revision 1.117 2003/07/26 04:06:58 steve
|
||||
* Watch out for moving nexus_ptr while adding pins to nexus.
|
||||
*
|
||||
* Revision 1.116 2003/07/05 20:42:08 steve
|
||||
* Fix some enumeration warnings.
|
||||
*
|
||||
* Revision 1.115 2003/06/24 01:38:03 steve
|
||||
* Various warnings fixed.
|
||||
*
|
||||
* Revision 1.114 2003/06/23 01:25:44 steve
|
||||
* Module attributes make it al the way to ivl_target.
|
||||
*
|
||||
* Revision 1.113 2003/06/17 21:28:59 steve
|
||||
* Remove short int restrictions from vvp opcodes. (part 2)
|
||||
*
|
||||
* Revision 1.112 2003/05/13 16:30:39 steve
|
||||
* Clear pin pointers if pin is not connected.
|
||||
*
|
||||
* Revision 1.111 2003/05/13 01:56:15 steve
|
||||
* Allow primitives to hvae unconnected input ports.
|
||||
*
|
||||
* Revision 1.110 2003/04/11 05:18:08 steve
|
||||
* Handle signed magnitude compare all the
|
||||
* way through to the vvp code generator.
|
||||
*
|
||||
* Revision 1.109 2003/03/29 05:51:25 steve
|
||||
* Sign extend NetMult inputs if result is signed.
|
||||
*
|
||||
* Revision 1.108 2003/03/10 23:40:53 steve
|
||||
* Keep parameter constants for the ivl_target API.
|
||||
*
|
||||
* Revision 1.107 2003/03/06 01:24:37 steve
|
||||
* Obsolete the ivl_event_name function.
|
||||
*
|
||||
* Revision 1.106 2003/03/06 00:28:42 steve
|
||||
* All NetObj objects have lex_string base names.
|
||||
*
|
||||
* Revision 1.105 2003/03/03 02:22:41 steve
|
||||
* Scope names stored only as basename.
|
||||
*
|
||||
* Revision 1.104 2003/01/30 16:23:08 steve
|
||||
* Spelling fixes.
|
||||
*
|
||||
* Revision 1.103 2003/01/26 21:15:59 steve
|
||||
* Rework expression parsing and elaboration to
|
||||
* accommodate real/realtime values and expressions.
|
||||
*
|
||||
* Revision 1.102 2003/01/16 21:43:52 steve
|
||||
* Assert some task definition sanity.
|
||||
*
|
||||
* Revision 1.101 2002/12/21 00:55:58 steve
|
||||
* The $time system task returns the integer time
|
||||
* scaled to the local units. Change the internal
|
||||
* implementation of vpiSystemTime the $time functions
|
||||
* to properly account for this. Also add $simtime
|
||||
* to get the simulation time.
|
||||
*
|
||||
* Revision 1.100 2002/11/05 02:12:35 steve
|
||||
* Fix the call to FormatMessage under Windows.
|
||||
*
|
||||
* Revision 1.99 2002/11/03 22:44:19 steve
|
||||
* Cast for gcc convenience.
|
||||
*
|
||||
* Revision 1.98 2002/11/03 20:47:23 steve
|
||||
* Slightly more verbose load fail message.
|
||||
*
|
||||
* Revision 1.97 2002/10/23 01:47:18 steve
|
||||
* Fix synth2 handling of aset/aclr signals where
|
||||
* flip-flops are split by begin-end blocks.
|
||||
*
|
||||
* Revision 1.96 2002/09/26 03:18:04 steve
|
||||
* Generate vvp code for asynch set/reset of NetFF.
|
||||
*
|
||||
* Revision 1.95 2002/08/12 01:35:00 steve
|
||||
* conditional ident string using autoconfig.
|
||||
*
|
||||
* Revision 1.94 2002/08/05 04:18:45 steve
|
||||
* Store only the base name of memories.
|
||||
*
|
||||
* Revision 1.93 2002/08/04 19:13:16 steve
|
||||
* dll uses StringHeap for named items.
|
||||
*
|
||||
* 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
|
||||
* Verbose messages.
|
||||
*
|
||||
* Revision 1.90 2002/07/22 21:07:40 steve
|
||||
* Set ivl_target delays for case compare logic.
|
||||
*
|
||||
* Revision 1.89 2002/07/05 21:26:17 steve
|
||||
* Avoid emitting to vvp local net symbols.
|
||||
*
|
||||
* Revision 1.88 2002/06/25 01:33:22 steve
|
||||
* Cache calculated driven value.
|
||||
*
|
||||
* Revision 1.87 2002/06/24 01:49:39 steve
|
||||
* Make link_drive_constant cache its results in
|
||||
* the Nexus, to improve cprop performance.
|
||||
*
|
||||
* Revision 1.86 2002/06/21 04:59:35 steve
|
||||
* Carry integerness throughout the compilation.
|
||||
*
|
||||
* Revision 1.85 2002/06/16 19:19:16 steve
|
||||
* Generate runtime code to normalize indices.
|
||||
*
|
||||
* Revision 1.84 2002/05/26 01:39:03 steve
|
||||
* Carry Verilog 2001 attributes with processes,
|
||||
* all the way through to the ivl_target API.
|
||||
*
|
||||
* Divide signal reference counts between rval
|
||||
* and lval references.
|
||||
*/
|
||||
|
||||
|
|
|
|||
11
t-dll.h
11
t-dll.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __t_dll_H
|
||||
#define __t_dll_H
|
||||
/*
|
||||
* Copyright (c) 2000-2003 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2004 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: t-dll.h,v 1.109 2004/02/18 17:11:58 steve Exp $"
|
||||
#ident "$Id: t-dll.h,v 1.110 2004/02/19 06:57:11 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "target.h"
|
||||
|
|
@ -175,7 +175,7 @@ struct dll_target : public target_t, public expr_scan_t {
|
|||
*/
|
||||
|
||||
struct ivl_event_s {
|
||||
const char*name;
|
||||
perm_string name;
|
||||
ivl_scope_t scope;
|
||||
unsigned nany, nneg, npos;
|
||||
ivl_nexus_t*pins;
|
||||
|
|
@ -574,7 +574,7 @@ struct ivl_signal_s {
|
|||
signed lsb_index;
|
||||
signed lsb_dist;
|
||||
|
||||
const char*name_;
|
||||
perm_string name_;
|
||||
ivl_scope_t scope_;
|
||||
|
||||
union {
|
||||
|
|
@ -683,6 +683,9 @@ struct ivl_variable_s {
|
|||
|
||||
/*
|
||||
* $Log: t-dll.h,v $
|
||||
* Revision 1.110 2004/02/19 06:57:11 steve
|
||||
* Memory and Event names use perm_string.
|
||||
*
|
||||
* Revision 1.109 2004/02/18 17:11:58 steve
|
||||
* Use perm_strings for named langiage items.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue