forked from steveicarus/iverilog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use perm_strings for named langiage items.
- Loading branch information
steve
committed
Feb 18, 2004
1 parent
17c891b
commit 27af95d
Showing
41 changed files
with
706 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 1999-2000 Stephen Williams ([email protected]) | ||
* Copyright (c) 1999-2004 Stephen Williams ([email protected]) | ||
* | ||
* 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: PGate.cc,v 1.15 2003/03/06 04:37:12 steve Exp $" | ||
#ident "$Id: PGate.cc,v 1.16 2004/02/18 17:11:54 steve Exp $" | ||
#endif | ||
|
||
# include "config.h" | ||
|
@@ -27,7 +27,7 @@ | |
# include "verinum.h" | ||
# include <assert.h> | ||
|
||
PGate::PGate(const string&name, | ||
PGate::PGate(perm_string name, | ||
svector<PExpr*>*pins, | ||
const svector<PExpr*>*del) | ||
: name_(name), pins_(pins) | ||
|
@@ -37,7 +37,7 @@ PGate::PGate(const string&name, | |
str1_ = STRONG; | ||
} | ||
|
||
PGate::PGate(const string&name, | ||
PGate::PGate(perm_string name, | ||
svector<PExpr*>*pins, | ||
PExpr*del) | ||
: name_(name), pins_(pins) | ||
|
@@ -47,7 +47,7 @@ PGate::PGate(const string&name, | |
str1_ = STRONG; | ||
} | ||
|
||
PGate::PGate(const string&name, svector<PExpr*>*pins) | ||
PGate::PGate(perm_string name, svector<PExpr*>*pins) | ||
: name_(name), pins_(pins) | ||
{ | ||
str0_ = STRONG; | ||
|
@@ -99,13 +99,13 @@ void PGate::eval_delays(Design*des, NetScope*scope, | |
} | ||
|
||
PGAssign::PGAssign(svector<PExpr*>*pins) | ||
: PGate("", pins) | ||
: PGate(perm_string(), pins) | ||
{ | ||
assert(pins->count() == 2); | ||
} | ||
|
||
PGAssign::PGAssign(svector<PExpr*>*pins, svector<PExpr*>*dels) | ||
: PGate("", pins, dels) | ||
: PGate(perm_string(), pins, dels) | ||
{ | ||
assert(pins->count() == 2); | ||
} | ||
|
@@ -114,14 +114,14 @@ PGAssign::~PGAssign() | |
{ | ||
} | ||
|
||
PGBuiltin::PGBuiltin(Type t, const string&name, | ||
PGBuiltin::PGBuiltin(Type t, perm_string name, | ||
svector<PExpr*>*pins, | ||
svector<PExpr*>*del) | ||
: PGate(name, pins, del), type_(t), msb_(0), lsb_(0) | ||
{ | ||
} | ||
|
||
PGBuiltin::PGBuiltin(Type t, const string&name, | ||
PGBuiltin::PGBuiltin(Type t, perm_string name, | ||
svector<PExpr*>*pins, | ||
PExpr*del) | ||
: PGate(name, pins, del), type_(t), msb_(0), lsb_(0) | ||
|
@@ -142,14 +142,14 @@ void PGBuiltin::set_range(PExpr*msb, PExpr*lsb) | |
lsb_ = lsb; | ||
} | ||
|
||
PGModule::PGModule(const char*type, const string&name, svector<PExpr*>*pins) | ||
PGModule::PGModule(perm_string type, perm_string name, svector<PExpr*>*pins) | ||
: PGate(name, pins), overrides_(0), pins_(0), | ||
npins_(0), parms_(0), nparms_(0), msb_(0), lsb_(0) | ||
{ | ||
type_ = type; | ||
} | ||
|
||
PGModule::PGModule(const char*type, const string&name, | ||
PGModule::PGModule(perm_string type, perm_string name, | ||
named<PExpr*>*pins, unsigned npins) | ||
: PGate(name, 0), overrides_(0), pins_(pins), | ||
npins_(npins), parms_(0), nparms_(0), msb_(0), lsb_(0) | ||
|
@@ -184,13 +184,16 @@ void PGModule::set_range(PExpr*msb, PExpr*lsb) | |
lsb_ = lsb; | ||
} | ||
|
||
const char* PGModule::get_type() | ||
perm_string PGModule::get_type() | ||
{ | ||
return type_; | ||
} | ||
|
||
/* | ||
* $Log: PGate.cc,v $ | ||
* Revision 1.16 2004/02/18 17:11:54 steve | ||
* Use perm_strings for named langiage items. | ||
* | ||
* Revision 1.15 2003/03/06 04:37:12 steve | ||
* lex_strings.add module names earlier. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef __PGate_H | ||
#define __PGate_H | ||
/* | ||
* Copyright (c) 1998-2000 Stephen Williams ([email protected]) | ||
* Copyright (c) 1998-2004 Stephen Williams ([email protected]) | ||
* | ||
* 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: PGate.h,v 1.25 2003/03/06 04:37:12 steve Exp $" | ||
#ident "$Id: PGate.h,v 1.26 2004/02/18 17:11:54 steve Exp $" | ||
#endif | ||
|
||
# include "svector.h" | ||
# include "StringHeap.h" | ||
# include "named.h" | ||
# include "LineInfo.h" | ||
# include "PDelays.h" | ||
|
@@ -53,17 +54,17 @@ class PGate : public LineInfo { | |
public: | ||
enum strength_t { HIGHZ, WEAK, PULL, STRONG, SUPPLY }; | ||
|
||
explicit PGate(const string&name, svector<PExpr*>*pins, | ||
explicit PGate(perm_string name, svector<PExpr*>*pins, | ||
const svector<PExpr*>*del); | ||
|
||
explicit PGate(const string&name, svector<PExpr*>*pins, | ||
explicit PGate(perm_string name, svector<PExpr*>*pins, | ||
PExpr*del); | ||
|
||
explicit PGate(const string&name, svector<PExpr*>*pins); | ||
explicit PGate(perm_string name, svector<PExpr*>*pins); | ||
|
||
virtual ~PGate(); | ||
|
||
const string& get_name() const { return name_; } | ||
perm_string get_name() const { return name_; } | ||
|
||
void eval_delays(Design*des, NetScope*scope, | ||
unsigned long&rise_time, | ||
|
@@ -93,7 +94,7 @@ class PGate : public LineInfo { | |
void dump_delays(ostream&out) const; | ||
|
||
private: | ||
const string name_; | ||
perm_string name_; | ||
PDelays delay_; | ||
svector<PExpr*>*pins_; | ||
|
||
|
@@ -141,10 +142,10 @@ class PGBuiltin : public PGate { | |
TRANIF1, RTRANIF0, RTRANIF1 }; | ||
|
||
public: | ||
explicit PGBuiltin(Type t, const string&name, | ||
explicit PGBuiltin(Type t, perm_string name, | ||
svector<PExpr*>*pins, | ||
svector<PExpr*>*del); | ||
explicit PGBuiltin(Type t, const string&name, | ||
explicit PGBuiltin(Type t, perm_string name, | ||
svector<PExpr*>*pins, | ||
PExpr*del); | ||
~PGBuiltin(); | ||
|
@@ -171,17 +172,16 @@ class PGBuiltin : public PGate { | |
class PGModule : public PGate { | ||
|
||
public: | ||
// NOTE: The type parameter to all the constructors is assumed | ||
// to have been permallocated. | ||
// The name is the *instance* name of the gate. | ||
|
||
// If the binding of ports is by position, this constructor | ||
// builds everything all at once. | ||
explicit PGModule(const char*type, const string&name, | ||
explicit PGModule(perm_string type, perm_string name, | ||
svector<PExpr*>*pins); | ||
|
||
// If the binding of ports is by name, this constructor takes | ||
// the bindings and stores them for later elaboration. | ||
explicit PGModule(const char*type, const string&name, | ||
explicit PGModule(perm_string type, perm_string name, | ||
named<PExpr*>*pins, unsigned npins); | ||
|
||
|
||
|
@@ -203,10 +203,10 @@ class PGModule : public PGate { | |
|
||
// This returns the module name of this module. It is a | ||
// permallocated string. | ||
const char* get_type(); | ||
perm_string get_type(); | ||
|
||
private: | ||
const char* type_; | ||
perm_string type_; | ||
svector<PExpr*>*overrides_; | ||
named<PExpr*>*pins_; | ||
unsigned npins_; | ||
|
@@ -227,6 +227,9 @@ class PGModule : public PGate { | |
|
||
/* | ||
* $Log: PGate.h,v $ | ||
* Revision 1.26 2004/02/18 17:11:54 steve | ||
* Use perm_strings for named langiage items. | ||
* | ||
* Revision 1.25 2003/03/06 04:37:12 steve | ||
* lex_strings.add module names earlier. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2003 Stephen Williams ([email protected]) | ||
* Copyright (c) 2003-2004 Stephen Williams ([email protected]) | ||
* | ||
* 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,18 +17,21 @@ | |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | ||
*/ | ||
#ifdef HAVE_CVS_IDENT | ||
#ident "$Id: PUdp.cc,v 1.1 2003/07/15 05:07:13 steve Exp $" | ||
#ident "$Id: PUdp.cc,v 1.2 2004/02/18 17:11:54 steve Exp $" | ||
#endif | ||
|
||
# include "PUdp.h" | ||
|
||
PUdp::PUdp(const string&n, unsigned nports) | ||
PUdp::PUdp(perm_string n, unsigned nports) | ||
: ports(nports), sequential(false), initial(verinum::Vx), name_(n) | ||
{ | ||
} | ||
|
||
/* | ||
* $Log: PUdp.cc,v $ | ||
* Revision 1.2 2004/02/18 17:11:54 steve | ||
* Use perm_strings for named langiage items. | ||
* | ||
* Revision 1.1 2003/07/15 05:07:13 steve | ||
* Move PUdp constructor into compiled file. | ||
* | ||
|
Oops, something went wrong.