Remove "using namespace std" from compiler header files and fix the fallout.
(cherry picked from commit ecbbb60fb6)
This commit is contained in:
parent
9ac6154068
commit
52b099feae
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_AStatement_H
|
||||
#define IVL_AStatement_H
|
||||
/*
|
||||
* Copyright (c) 2008-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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
|
||||
|
|
@ -42,7 +42,7 @@ class AContrib : public Statement {
|
|||
AContrib(PExpr*lval, PExpr*rval);
|
||||
~AContrib();
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
|
||||
private:
|
||||
|
|
@ -68,10 +68,10 @@ class AProcess : public LineInfo {
|
|||
ivl_process_type_t type() const { return type_; }
|
||||
Statement*statement() { return statement_; }
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
|
||||
// Dump the analog process
|
||||
void dump(ostream&out, unsigned ind) const;
|
||||
void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
ivl_process_type_t type_;
|
||||
|
|
|
|||
10
HName.h
10
HName.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_HName_H
|
||||
#define IVL_HName_H
|
||||
/*
|
||||
* Copyright (c) 2001-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2021 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
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
class hname_t {
|
||||
|
||||
friend ostream& operator<< (ostream&out, const hname_t&that);
|
||||
friend std::ostream& operator<< (std::ostream&out, const hname_t&that);
|
||||
|
||||
public:
|
||||
hname_t ();
|
||||
|
|
@ -92,14 +92,14 @@ inline size_t hname_t::has_numbers() const
|
|||
return number_.size();
|
||||
}
|
||||
|
||||
extern ostream& operator<< (ostream&, const hname_t&);
|
||||
extern std::ostream& operator<< (std::ostream&, const hname_t&);
|
||||
|
||||
inline bool operator != (const hname_t&l, const hname_t&r)
|
||||
{ return ! (l == r); }
|
||||
|
||||
inline ostream& operator<< (ostream&out, const list<hname_t>&ll)
|
||||
inline std::ostream& operator<< (std::ostream&out, const std::list<hname_t>&ll)
|
||||
{
|
||||
list<hname_t>::const_iterator cur = ll.begin();
|
||||
std::list<hname_t>::const_iterator cur = ll.begin();
|
||||
out << *cur;
|
||||
++ cur;
|
||||
while (cur != ll.end()) {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
# include "PWire.h"
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
list<Module::named_expr_t> Module::user_defparms;
|
||||
|
||||
/* n is a permallocated string. */
|
||||
|
|
|
|||
34
Module.h
34
Module.h
|
|
@ -64,7 +64,7 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
public:
|
||||
struct port_t {
|
||||
perm_string name;
|
||||
vector<PEIdent*> expr;
|
||||
std::vector<PEIdent*> expr;
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
@ -97,15 +97,15 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
/* specparams are simpler than other parameters, in that they
|
||||
can have a range, but not an explicit type. The restrictions
|
||||
are enforced by the parser. */
|
||||
map<perm_string,param_expr_t*>specparams;
|
||||
std::map<perm_string,param_expr_t*>specparams;
|
||||
|
||||
/* The module also has defparam assignments which don't create
|
||||
new parameters within the module, but may be used to set
|
||||
values within this module (when instantiated) or in other
|
||||
instantiated modules. */
|
||||
typedef pair<pform_name_t,PExpr*> named_expr_t;
|
||||
list<named_expr_t>defparms;
|
||||
static list<named_expr_t>user_defparms;
|
||||
typedef std::pair<pform_name_t,PExpr*> named_expr_t;
|
||||
std::list<named_expr_t>defparms;
|
||||
static std::list<named_expr_t>user_defparms;
|
||||
|
||||
/* Parameters may be overridden at instantiation time;
|
||||
the overrides do not contain explicit parameter names,
|
||||
|
|
@ -113,17 +113,17 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
appear in the instantiated module. Therefore a
|
||||
list of names in module-order is needed to pass from
|
||||
a parameter-index to its name. */
|
||||
list<perm_string> param_names;
|
||||
std::list<perm_string> param_names;
|
||||
|
||||
/* This is an array of port descriptors, which is in turn a
|
||||
named array of PEident pointers. */
|
||||
vector<port_t*> ports;
|
||||
std::vector<port_t*> ports;
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
|
||||
/* The module has a list of generate schemes that appear in
|
||||
the module definition. These are used at elaboration time. */
|
||||
list<PGenerate*> generate_schemes;
|
||||
std::list<PGenerate*> generate_schemes;
|
||||
|
||||
/* Nested modules are placed here, and are not elaborated
|
||||
unless they are instantiated, implicitly or explicitly. */
|
||||
|
|
@ -132,9 +132,9 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
/* An interface can contain one or more named modport lists.
|
||||
The parser will ensure these don't appear in modules or
|
||||
program blocks. */
|
||||
map<perm_string,PModport*> modports;
|
||||
std::map<perm_string,PModport*> modports;
|
||||
|
||||
list<PSpecPath*> specify_paths;
|
||||
std::list<PSpecPath*> specify_paths;
|
||||
|
||||
// The mod_name() is the name of the module type.
|
||||
perm_string mod_name() const { return pscope_name(); }
|
||||
|
|
@ -142,7 +142,7 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
void add_gate(PGate*gate);
|
||||
|
||||
unsigned port_count() const;
|
||||
const vector<PEIdent*>& get_port(unsigned idx) const;
|
||||
const std::vector<PEIdent*>& get_port(unsigned idx) const;
|
||||
unsigned find_port(const char*name) const;
|
||||
|
||||
// Return port name ("" for undeclared port)
|
||||
|
|
@ -150,12 +150,12 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
|
||||
PGate* get_gate(perm_string name);
|
||||
|
||||
const list<PGate*>& get_gates() const;
|
||||
const std::list<PGate*>& get_gates() const;
|
||||
|
||||
void dump(ostream&out) const;
|
||||
void dump(std::ostream&out) const;
|
||||
bool elaborate(Design*, NetScope*scope) const;
|
||||
|
||||
typedef map<perm_string,PExpr*> replace_t;
|
||||
typedef std::map<perm_string,PExpr*> replace_t;
|
||||
bool elaborate_scope(Design*, NetScope*scope, const replace_t&rep);
|
||||
|
||||
bool elaborate_sig(Design*, NetScope*scope) const;
|
||||
|
|
@ -163,8 +163,8 @@ class Module : public PScopeExtra, public PNamedItem {
|
|||
SymbolType symbol_type() const;
|
||||
|
||||
private:
|
||||
void dump_specparams_(ostream&out, unsigned indent) const;
|
||||
list<PGate*> gates_;
|
||||
void dump_specparams_(std::ostream&out, unsigned indent) const;
|
||||
std::list<PGate*> gates_;
|
||||
|
||||
private: // Not implemented
|
||||
Module(const Module&);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2017 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -26,6 +26,8 @@
|
|||
# include "verinum.h"
|
||||
# include "netmisc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
PDelays::PDelays()
|
||||
{
|
||||
delete_flag_ = true;
|
||||
|
|
|
|||
14
PDelays.h
14
PDelays.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_PDelays_H
|
||||
#define IVL_PDelays_H
|
||||
/*
|
||||
* Copyright (c) 1999-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -24,12 +24,6 @@
|
|||
# include <list>
|
||||
# include <iostream>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if __GNUC__ > 2
|
||||
using namespace std;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class Design;
|
||||
class NetScope;
|
||||
class NetExpr;
|
||||
|
|
@ -49,7 +43,7 @@ class PDelays {
|
|||
this object takes ownership of the expressions, and will
|
||||
delete it in the destructor. */
|
||||
void set_delay(PExpr*);
|
||||
void set_delays(const list<PExpr*>*del, bool delete_flag=true);
|
||||
void set_delays(const std::list<PExpr*>*del, bool delete_flag=true);
|
||||
|
||||
unsigned delay_count() const;
|
||||
|
||||
|
|
@ -59,7 +53,7 @@ class PDelays {
|
|||
NetExpr*&decay_time,
|
||||
bool as_nets_flag =false) const;
|
||||
|
||||
void dump_delays(ostream&out) const;
|
||||
void dump_delays(std::ostream&out) const;
|
||||
|
||||
private:
|
||||
PExpr* delay_[3];
|
||||
|
|
@ -70,6 +64,6 @@ class PDelays {
|
|||
PDelays& operator= (const PDelays&);
|
||||
};
|
||||
|
||||
ostream& operator << (ostream&o, const PDelays&);
|
||||
std::ostream& operator << (std::ostream&o, const PDelays&);
|
||||
|
||||
#endif /* IVL_PDelays_H */
|
||||
|
|
|
|||
2
PExpr.cc
2
PExpr.cc
|
|
@ -30,6 +30,8 @@
|
|||
# include "util.h"
|
||||
# include <typeinfo>
|
||||
|
||||
using namespace std;
|
||||
|
||||
PExpr::PExpr()
|
||||
{
|
||||
expr_type_ = IVL_VT_NO_TYPE;
|
||||
|
|
|
|||
52
PExpr.h
52
PExpr.h
|
|
@ -60,7 +60,7 @@ class PExpr : public LineInfo {
|
|||
PExpr();
|
||||
virtual ~PExpr();
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
|
||||
// This method tests whether the expression contains any identifiers
|
||||
// that have not been previously declared in the specified scope or
|
||||
|
|
@ -202,7 +202,7 @@ class PExpr : public LineInfo {
|
|||
PExpr& operator= (const PExpr&);
|
||||
};
|
||||
|
||||
ostream& operator << (ostream&, const PExpr&);
|
||||
std::ostream& operator << (std::ostream&, const PExpr&);
|
||||
|
||||
class PEAssignPattern : public PExpr {
|
||||
public:
|
||||
|
|
@ -230,11 +230,11 @@ class PEAssignPattern : public PExpr {
|
|||
class PEConcat : public PExpr {
|
||||
|
||||
public:
|
||||
PEConcat(const list<PExpr*>&p, PExpr*r =0);
|
||||
explicit PEConcat(const std::list<PExpr*>&p, PExpr*r =0);
|
||||
~PEConcat();
|
||||
|
||||
virtual verinum* eval_const(Design*des, NetScope*sc) const;
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
|
||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ class PEConcat : public PExpr {
|
|||
NetNet* elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||
bool bidirectional_flag) const;
|
||||
private:
|
||||
vector<PExpr*>parms_;
|
||||
std::vector<PExpr*>parms_;
|
||||
std::valarray<width_mode_t>width_modes_;
|
||||
|
||||
PExpr*repeat_;
|
||||
|
|
@ -289,7 +289,7 @@ class PEEvent : public PExpr {
|
|||
edge_t type() const;
|
||||
PExpr* expr() const;
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
|
||||
virtual bool has_aa_term(Design*des, NetScope*scope) const;
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ class PEFNumber : public PExpr {
|
|||
unsigned expr_wid,
|
||||
unsigned flags) const;
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
|
||||
private:
|
||||
verireal*value_;
|
||||
|
|
@ -340,7 +340,7 @@ class PEIdent : public PExpr {
|
|||
// current identifier.
|
||||
void append_name(perm_string);
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
|
||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
|
||||
|
||||
|
|
@ -540,7 +540,7 @@ class PENewArray : public PExpr {
|
|||
explicit PENewArray (PExpr*s, PExpr*i);
|
||||
~PENewArray();
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
width_mode_t&mode);
|
||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||
|
|
@ -564,7 +564,7 @@ class PENewClass : public PExpr {
|
|||
|
||||
~PENewClass();
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
// Class objects don't have a useful width, but the expression
|
||||
// is IVL_VT_CLASS.
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
|
|
@ -589,7 +589,7 @@ class PENewCopy : public PExpr {
|
|||
explicit PENewCopy(PExpr*src);
|
||||
~PENewCopy();
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
// Class objects don't have a useful width, but the expression
|
||||
// is IVL_VT_CLASS.
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
|
|
@ -609,7 +609,7 @@ class PENull : public PExpr {
|
|||
explicit PENull();
|
||||
~PENull();
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
width_mode_t&mode);
|
||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||
|
|
@ -627,7 +627,7 @@ class PENumber : public PExpr {
|
|||
|
||||
const verinum& value() const;
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
width_mode_t&mode);
|
||||
|
||||
|
|
@ -661,8 +661,8 @@ class PEString : public PExpr {
|
|||
explicit PEString(char*s);
|
||||
~PEString();
|
||||
|
||||
string value() const;
|
||||
virtual void dump(ostream&) const;
|
||||
std::string value() const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
width_mode_t&mode);
|
||||
|
|
@ -683,7 +683,7 @@ class PETypename : public PExpr {
|
|||
explicit PETypename(data_type_t*data_type);
|
||||
~PETypename();
|
||||
|
||||
virtual void dump(ostream&) const;
|
||||
virtual void dump(std::ostream&) const;
|
||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||
width_mode_t&mode);
|
||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||
|
|
@ -701,7 +701,7 @@ class PEUnary : public PExpr {
|
|||
explicit PEUnary(char op, PExpr*ex);
|
||||
~PEUnary();
|
||||
|
||||
virtual void dump(ostream&out) const;
|
||||
virtual void dump(std::ostream&out) const;
|
||||
|
||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
|
||||
|
||||
|
|
@ -733,7 +733,7 @@ class PEBinary : public PExpr {
|
|||
explicit PEBinary(char op, PExpr*l, PExpr*r);
|
||||
~PEBinary();
|
||||
|
||||
virtual void dump(ostream&out) const;
|
||||
virtual void dump(std::ostream&out) const;
|
||||
|
||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
|
||||
|
||||
|
|
@ -858,7 +858,7 @@ class PETernary : public PExpr {
|
|||
explicit PETernary(PExpr*e, PExpr*t, PExpr*f);
|
||||
~PETernary();
|
||||
|
||||
virtual void dump(ostream&out) const;
|
||||
virtual void dump(std::ostream&out) const;
|
||||
|
||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
|
||||
|
||||
|
|
@ -890,7 +890,7 @@ class PETernary : public PExpr {
|
|||
*/
|
||||
class PECallFunction : public PExpr {
|
||||
public:
|
||||
explicit PECallFunction(const pform_name_t&n, const vector<PExpr *> &parms);
|
||||
explicit PECallFunction(const pform_name_t&n, const std::vector<PExpr *> &parms);
|
||||
// Call function defined in package.
|
||||
explicit PECallFunction(PPackage*pkg, perm_string n, const std::vector<PExpr *> &parms);
|
||||
explicit PECallFunction(PPackage*pkg, perm_string n, const std::list<PExpr *> &parms);
|
||||
|
|
@ -899,16 +899,16 @@ class PECallFunction : public PExpr {
|
|||
explicit PECallFunction(PPackage*pkg, const pform_name_t&n, const std::vector<PExpr *> &parms);
|
||||
|
||||
// Call of system function (name is not hierarchical)
|
||||
explicit PECallFunction(perm_string n, const vector<PExpr *> &parms);
|
||||
explicit PECallFunction(perm_string n, const std::vector<PExpr *> &parms);
|
||||
explicit PECallFunction(perm_string n);
|
||||
|
||||
// std::list versions. Should be removed!
|
||||
explicit PECallFunction(const pform_name_t&n, const list<PExpr *> &parms);
|
||||
explicit PECallFunction(perm_string n, const list<PExpr *> &parms);
|
||||
explicit PECallFunction(const pform_name_t&n, const std::list<PExpr *> &parms);
|
||||
explicit PECallFunction(perm_string n, const std::list<PExpr *> &parms);
|
||||
|
||||
~PECallFunction();
|
||||
|
||||
virtual void dump(ostream &) const;
|
||||
virtual void dump(std::ostream &) const;
|
||||
|
||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
|
||||
|
||||
|
|
@ -975,7 +975,7 @@ class PECastSize : public PExpr {
|
|||
explicit PECastSize(PExpr*size, PExpr*base);
|
||||
~PECastSize();
|
||||
|
||||
void dump(ostream &out) const;
|
||||
void dump(std::ostream &out) const;
|
||||
|
||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||
unsigned expr_wid,
|
||||
|
|
@ -998,7 +998,7 @@ class PECastType : public PExpr {
|
|||
explicit PECastType(data_type_t*target, PExpr*base);
|
||||
~PECastType();
|
||||
|
||||
void dump(ostream &out) const;
|
||||
void dump(std::ostream &out) const;
|
||||
|
||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||
ivl_type_t type, unsigned flags) const;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
# include <cassert>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
PFunction::PFunction(perm_string name, LexicalScope*parent, bool is_auto__)
|
||||
: PTaskFunc(name, parent), statement_(0)
|
||||
{
|
||||
|
|
|
|||
4
PGate.cc
4
PGate.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
# include "verinum.h"
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void PGate::set_pins_(list<PExpr*>*pins)
|
||||
{
|
||||
assert(pins);
|
||||
|
|
|
|||
48
PGate.h
48
PGate.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_PGate_H
|
||||
#define IVL_PGate_H
|
||||
/*
|
||||
* Copyright (c) 1998-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2021 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
|
||||
|
|
@ -50,13 +50,13 @@ class Module;
|
|||
class PGate : public PNamedItem {
|
||||
|
||||
public:
|
||||
explicit PGate(perm_string name, list<PExpr*>*pins,
|
||||
const list<PExpr*>*del);
|
||||
explicit PGate(perm_string name, std::list<PExpr*>*pins,
|
||||
const std::list<PExpr*>*del);
|
||||
|
||||
explicit PGate(perm_string name, list<PExpr*>*pins,
|
||||
explicit PGate(perm_string name, std::list<PExpr*>*pins,
|
||||
PExpr*del);
|
||||
|
||||
explicit PGate(perm_string name, list<PExpr*>*pins);
|
||||
explicit PGate(perm_string name, std::list<PExpr*>*pins);
|
||||
|
||||
virtual ~PGate();
|
||||
|
||||
|
|
@ -81,9 +81,9 @@ class PGate : public PNamedItem {
|
|||
void strength0(ivl_drive_t);
|
||||
void strength1(ivl_drive_t);
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind =4) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind =4) const;
|
||||
virtual void elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*sc) const;
|
||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
|
@ -91,19 +91,19 @@ class PGate : public PNamedItem {
|
|||
SymbolType symbol_type() const;
|
||||
|
||||
protected:
|
||||
const vector<PExpr*>& get_pins() const { return pins_; }
|
||||
const std::vector<PExpr*>& get_pins() const { return pins_; }
|
||||
|
||||
void dump_pins(ostream&out) const;
|
||||
void dump_delays(ostream&out) const;
|
||||
void dump_pins(std::ostream&out) const;
|
||||
void dump_delays(std::ostream&out) const;
|
||||
|
||||
private:
|
||||
perm_string name_;
|
||||
PDelays delay_;
|
||||
vector<PExpr*>pins_;
|
||||
std::vector<PExpr*>pins_;
|
||||
|
||||
ivl_drive_t str0_, str1_;
|
||||
|
||||
void set_pins_(list<PExpr*>*pins);
|
||||
void set_pins_(std::list<PExpr*>*pins);
|
||||
|
||||
private: // not implemented
|
||||
PGate(const PGate&);
|
||||
|
|
@ -117,11 +117,11 @@ class PGate : public PNamedItem {
|
|||
class PGAssign : public PGate {
|
||||
|
||||
public:
|
||||
explicit PGAssign(list<PExpr*>*pins);
|
||||
explicit PGAssign(list<PExpr*>*pins, list<PExpr*>*dels);
|
||||
explicit PGAssign(std::list<PExpr*>*pins);
|
||||
explicit PGAssign(std::list<PExpr*>*pins, std::list<PExpr*>*dels);
|
||||
~PGAssign();
|
||||
|
||||
void dump(ostream&out, unsigned ind =4) const;
|
||||
void dump(std::ostream&out, unsigned ind =4) const;
|
||||
virtual void elaborate(Design*des, NetScope*scope) const;
|
||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
||||
|
|
@ -150,10 +150,10 @@ class PGBuiltin : public PGate {
|
|||
|
||||
public:
|
||||
explicit PGBuiltin(Type t, perm_string name,
|
||||
list<PExpr*>*pins,
|
||||
list<PExpr*>*del);
|
||||
std::list<PExpr*>*pins,
|
||||
std::list<PExpr*>*del);
|
||||
explicit PGBuiltin(Type t, perm_string name,
|
||||
list<PExpr*>*pins,
|
||||
std::list<PExpr*>*pins,
|
||||
PExpr*del);
|
||||
~PGBuiltin();
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ class PGBuiltin : public PGate {
|
|||
const char * gate_name() const;
|
||||
void set_range(PExpr*msb, PExpr*lsb);
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind =4) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind =4) const;
|
||||
virtual void elaborate(Design*, NetScope*scope) const;
|
||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ class PGModule : public PGate {
|
|||
// If the binding of ports is by position, this constructor
|
||||
// builds everything all at once.
|
||||
explicit PGModule(perm_string type, perm_string name,
|
||||
list<PExpr*>*pins);
|
||||
std::list<PExpr*>*pins);
|
||||
|
||||
// If the binding of ports is by name, this constructor takes
|
||||
// the bindings and stores them for later elaboration.
|
||||
|
|
@ -212,16 +212,16 @@ class PGModule : public PGate {
|
|||
|
||||
// Parameter overrides can come as an ordered list, or a set
|
||||
// of named expressions.
|
||||
void set_parameters(list<PExpr*>*o);
|
||||
void set_parameters(std::list<PExpr*>*o);
|
||||
void set_parameters(named<PExpr*>*pa, unsigned npa);
|
||||
|
||||
// Modules can be instantiated in ranges. The parser uses this
|
||||
// method to pass the range to the pform.
|
||||
void set_range(PExpr*msb, PExpr*lsb);
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind =4) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind =4) const;
|
||||
virtual void elaborate(Design*, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*sc) const;
|
||||
virtual bool elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
|
@ -233,7 +233,7 @@ class PGModule : public PGate {
|
|||
private:
|
||||
Module*bound_type_;
|
||||
perm_string type_;
|
||||
list<PExpr*>*overrides_;
|
||||
std::list<PExpr*>*overrides_;
|
||||
named<PExpr*>*pins_;
|
||||
unsigned npins_;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
# include "PWire.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
PGenerate::PGenerate(LexicalScope*parent, unsigned id)
|
||||
: LexicalScope(parent), id_number(id)
|
||||
{
|
||||
|
|
|
|||
16
PGenerate.h
16
PGenerate.h
|
|
@ -86,18 +86,18 @@ class PGenerate : public PNamedItem, public LexicalScope {
|
|||
std::valarray<PExpr*> item_test;
|
||||
|
||||
// defparam assignments found in this scope.
|
||||
typedef pair<pform_name_t,PExpr*> named_expr_t;
|
||||
list<named_expr_t>defparms;
|
||||
typedef std::pair<pform_name_t,PExpr*> named_expr_t;
|
||||
std::list<named_expr_t>defparms;
|
||||
|
||||
list<PGate*> gates;
|
||||
std::list<PGate*> gates;
|
||||
void add_gate(PGate*);
|
||||
|
||||
// Tasks instantiated within this scheme.
|
||||
map<perm_string,PTask*> tasks;
|
||||
map<perm_string,PFunction*>funcs;
|
||||
std::map<perm_string,PTask*> tasks;
|
||||
std::map<perm_string,PFunction*>funcs;
|
||||
|
||||
// Generate schemes can contain further generate schemes.
|
||||
list<PGenerate*> generate_schemes;
|
||||
std::list<PGenerate*> generate_schemes;
|
||||
// PGenerate*parent;
|
||||
|
||||
// This method is called by the elaboration of a module to
|
||||
|
|
@ -110,7 +110,7 @@ class PGenerate : public PNamedItem, public LexicalScope {
|
|||
bool elaborate_sig(Design*des, NetScope*container) const;
|
||||
bool elaborate(Design*des, NetScope*container) const;
|
||||
|
||||
void dump(ostream&out, unsigned indent) const;
|
||||
void dump(std::ostream&out, unsigned indent) const;
|
||||
|
||||
SymbolType symbol_type() const;
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ class PGenerate : public PNamedItem, public LexicalScope {
|
|||
void elaborate_subscope_direct_(Design*des, NetScope*scope);
|
||||
|
||||
// These are the scopes created by generate_scope.
|
||||
list<NetScope*>scope_list_;
|
||||
std::list<NetScope*>scope_list_;
|
||||
// internal function called on each scope generated by this scheme.
|
||||
bool elaborate_sig_(Design*des, NetScope*scope) const;
|
||||
bool elaborate_sig_direct_(Design*des, NetScope*scope) const;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_PModport_H
|
||||
#define IVL_PModport_H
|
||||
/*
|
||||
* Copyright (c) 2015-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2015-2021 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
|
||||
|
|
@ -38,8 +38,8 @@ class PModport : public PNamedItem {
|
|||
|
||||
perm_string name() const { return name_; }
|
||||
|
||||
typedef pair <NetNet::PortType,PExpr*> simple_port_t;
|
||||
map<perm_string,simple_port_t> simple_ports;
|
||||
typedef std::pair <NetNet::PortType,PExpr*> simple_port_t;
|
||||
std::map<perm_string,simple_port_t> simple_ports;
|
||||
|
||||
SymbolType symbol_type() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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,6 +19,8 @@
|
|||
|
||||
# include "PScope.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool LexicalScope::var_init_needs_explicit_lifetime() const
|
||||
{
|
||||
return false;
|
||||
|
|
|
|||
38
PScope.h
38
PScope.h
|
|
@ -112,30 +112,30 @@ class LexicalScope {
|
|||
|
||||
SymbolType symbol_type() const;
|
||||
};
|
||||
map<perm_string,param_expr_t*>parameters;
|
||||
map<perm_string,param_expr_t*>localparams;
|
||||
std::map<perm_string,param_expr_t*>parameters;
|
||||
std::map<perm_string,param_expr_t*>localparams;
|
||||
|
||||
// Defined types in the scope.
|
||||
map<perm_string,data_type_t*>typedefs;
|
||||
std::map<perm_string,data_type_t*>typedefs;
|
||||
|
||||
// Named events in the scope.
|
||||
map<perm_string,PEvent*>events;
|
||||
std::map<perm_string,PEvent*>events;
|
||||
|
||||
// Nets and variables (wires) in the scope
|
||||
map<perm_string,PWire*>wires;
|
||||
std::map<perm_string,PWire*>wires;
|
||||
PWire* wires_find(perm_string name);
|
||||
|
||||
// Genvars in the scope. These will only be present in module
|
||||
// scopes, but are listed here to allow them to be found when
|
||||
// creating implicit nets.
|
||||
map<perm_string,LineInfo*> genvars;
|
||||
std::map<perm_string,LineInfo*> genvars;
|
||||
|
||||
// Variable initializations in this scope
|
||||
vector<Statement*> var_inits;
|
||||
std::vector<Statement*> var_inits;
|
||||
|
||||
// Behaviors (processes) in this scope
|
||||
list<PProcess*> behaviors;
|
||||
list<AProcess*> analog_behaviors;
|
||||
std::list<PProcess*> behaviors;
|
||||
std::list<AProcess*> analog_behaviors;
|
||||
|
||||
// Enumeration sets.
|
||||
std::set<enum_type_t*> enum_sets;
|
||||
|
|
@ -150,19 +150,19 @@ class LexicalScope {
|
|||
virtual bool var_init_needs_explicit_lifetime() const;
|
||||
|
||||
protected:
|
||||
void dump_typedefs_(ostream&out, unsigned indent) const;
|
||||
void dump_typedefs_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
void dump_parameters_(ostream&out, unsigned indent) const;
|
||||
void dump_parameters_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
void dump_localparams_(ostream&out, unsigned indent) const;
|
||||
void dump_localparams_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
void dump_enumerations_(ostream&out, unsigned indent) const;
|
||||
void dump_enumerations_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
void dump_events_(ostream&out, unsigned indent) const;
|
||||
void dump_events_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
void dump_wires_(ostream&out, unsigned indent) const;
|
||||
void dump_wires_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
void dump_var_inits_(ostream&out, unsigned indent) const;
|
||||
void dump_var_inits_(std::ostream&out, unsigned indent) const;
|
||||
|
||||
bool elaborate_var_inits_(Design*des, NetScope*scope) const;
|
||||
|
||||
|
|
@ -233,9 +233,9 @@ class PScopeExtra : public PScope {
|
|||
bool time_prec_is_local;
|
||||
|
||||
protected:
|
||||
void dump_classes_(ostream&out, unsigned indent) const;
|
||||
void dump_tasks_(ostream&out, unsigned indent) const;
|
||||
void dump_funcs_(ostream&out, unsigned indent) const;
|
||||
void dump_classes_(std::ostream&out, unsigned indent) const;
|
||||
void dump_tasks_(std::ostream&out, unsigned indent) const;
|
||||
void dump_funcs_(std::ostream&out, unsigned indent) const;
|
||||
};
|
||||
|
||||
#endif /* IVL_PScope_H */
|
||||
|
|
|
|||
4
PTask.cc
4
PTask.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
# include "PTask.h"
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
PTaskFunc::PTaskFunc(perm_string n, LexicalScope*p)
|
||||
: PScope(n,p), this_type_(0), ports_(0)
|
||||
{
|
||||
|
|
|
|||
4
PTask.h
4
PTask.h
|
|
@ -97,7 +97,7 @@ class PTask : public PTaskFunc {
|
|||
|
||||
bool is_auto() const { return is_auto_; };
|
||||
|
||||
void dump(ostream&, unsigned) const;
|
||||
void dump(std::ostream&, unsigned) const;
|
||||
|
||||
SymbolType symbol_type() const;
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ class PFunction : public PTaskFunc {
|
|||
|
||||
bool is_auto() const { return is_auto_; };
|
||||
|
||||
void dump(ostream&, unsigned) const;
|
||||
void dump(std::ostream&, unsigned) const;
|
||||
|
||||
SymbolType symbol_type() const;
|
||||
|
||||
|
|
|
|||
10
PUdp.h
10
PUdp.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_PUdp_H
|
||||
#define IVL_PUdp_H
|
||||
/*
|
||||
* Copyright (c) 1998-2014 Stephen Williams (steve@picturel.com)
|
||||
* Copyright (c) 1998-2021 Stephen Williams (steve@picturel.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
|
||||
|
|
@ -53,20 +53,20 @@ class PUdp : public LineInfo {
|
|||
public:
|
||||
explicit PUdp(perm_string n, unsigned nports);
|
||||
|
||||
svector<string>ports;
|
||||
svector<std::string>ports;
|
||||
unsigned find_port(const char*name);
|
||||
|
||||
bool sequential;
|
||||
|
||||
svector<string>tinput;
|
||||
svector<std::string>tinput;
|
||||
svector<char> tcurrent;
|
||||
svector<char> toutput;
|
||||
|
||||
verinum::V initial;
|
||||
|
||||
map<string,PExpr*> attributes;
|
||||
std::map<std::string,PExpr*> attributes;
|
||||
|
||||
void dump(ostream&out) const;
|
||||
void dump(std::ostream&out) const;
|
||||
|
||||
perm_string name_;
|
||||
private:
|
||||
|
|
|
|||
2
PWire.cc
2
PWire.cc
|
|
@ -22,6 +22,8 @@
|
|||
# include "PExpr.h"
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
PWire::PWire(perm_string n,
|
||||
NetNet::Type t,
|
||||
NetNet::PortType pt,
|
||||
|
|
|
|||
8
PWire.h
8
PWire.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_PWire_H
|
||||
#define IVL_PWire_H
|
||||
/*
|
||||
* Copyright (c) 1998-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2021 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
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
#ifdef HAVE_IOSFWD
|
||||
# include <iosfwd>
|
||||
#else
|
||||
class ostream;
|
||||
# include <iostream>
|
||||
#endif
|
||||
|
||||
class PExpr;
|
||||
|
|
@ -87,10 +87,10 @@ class PWire : public PNamedItem {
|
|||
void set_discipline(ivl_discipline_t);
|
||||
ivl_discipline_t get_discipline(void) const;
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
|
||||
// Write myself to the specified stream.
|
||||
void dump(ostream&out, unsigned ind=4) const;
|
||||
void dump(std::ostream&out, unsigned ind=4) const;
|
||||
|
||||
NetNet* elaborate_sig(Design*, NetScope*scope) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
# include "PExpr.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Statement::~Statement()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
66
Statement.h
66
Statement.h
|
|
@ -61,9 +61,9 @@ class PProcess : public LineInfo {
|
|||
ivl_process_type_t type() const { return type_; }
|
||||
Statement*statement() { return statement_; }
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
ivl_process_type_t type_;
|
||||
|
|
@ -81,12 +81,12 @@ class Statement : virtual public LineInfo {
|
|||
Statement() { }
|
||||
virtual ~Statement() =0;
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
||||
map<perm_string,PExpr*> attributes;
|
||||
std::map<perm_string,PExpr*> attributes;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -139,7 +139,7 @@ class PAssign : public PAssign_ {
|
|||
explicit PAssign(PExpr*lval, PExpr*ex, bool is_constant);
|
||||
~PAssign();
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
|
||||
private:
|
||||
|
|
@ -155,7 +155,7 @@ class PAssignNB : public PAssign_ {
|
|||
explicit PAssignNB(PExpr*lval, PExpr*cnt, PEventStatement*de, PExpr*ex);
|
||||
~PAssignNB();
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
|
||||
private:
|
||||
|
|
@ -200,7 +200,7 @@ class PBlock : public PScope, public Statement, public PNamedItem {
|
|||
// block.
|
||||
void push_statement_front(Statement*that);
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
|
@ -215,14 +215,14 @@ class PBlock : public PScope, public Statement, public PNamedItem {
|
|||
class PCallTask : public Statement {
|
||||
|
||||
public:
|
||||
explicit PCallTask(PPackage*pkg, const pform_name_t&n, const list<PExpr*>&parms);
|
||||
explicit PCallTask(const pform_name_t&n, const list<PExpr*>&parms);
|
||||
explicit PCallTask(perm_string n, const list<PExpr*>&parms);
|
||||
explicit PCallTask(PPackage*pkg, const pform_name_t&n, const std::list<PExpr*>&parms);
|
||||
explicit PCallTask(const pform_name_t&n, const std::list<PExpr*>&parms);
|
||||
explicit PCallTask(perm_string n, const std::list<PExpr*>&parms);
|
||||
~PCallTask();
|
||||
|
||||
const pform_name_t& path() const;
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
|
||||
private:
|
||||
|
|
@ -256,14 +256,14 @@ class PCallTask : public Statement {
|
|||
|
||||
PPackage*package_;
|
||||
pform_name_t path_;
|
||||
vector<PExpr*> parms_;
|
||||
std::vector<PExpr*> parms_;
|
||||
};
|
||||
|
||||
class PCase : public Statement {
|
||||
|
||||
public:
|
||||
struct Item {
|
||||
list<PExpr*>expr;
|
||||
std::list<PExpr*>expr;
|
||||
Statement*stat;
|
||||
};
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ class PCase : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
ivl_case_quality_t quality_;
|
||||
|
|
@ -294,7 +294,7 @@ class PCAssign : public Statement {
|
|||
~PCAssign();
|
||||
|
||||
virtual NetCAssign* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*lval_;
|
||||
|
|
@ -308,11 +308,11 @@ class PCAssign : public Statement {
|
|||
*/
|
||||
class PChainConstructor : public Statement {
|
||||
public:
|
||||
explicit PChainConstructor(const list<PExpr*>&parms);
|
||||
explicit PChainConstructor(const std::list<PExpr*>&parms);
|
||||
~PChainConstructor();
|
||||
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
inline const std::vector<PExpr*>& chain_args(void) const
|
||||
{ return parms_; }
|
||||
|
|
@ -330,7 +330,7 @@ class PCondit : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*expr_;
|
||||
|
|
@ -349,7 +349,7 @@ class PDeassign : public Statement {
|
|||
~PDeassign();
|
||||
|
||||
virtual NetDeassign* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*lval_;
|
||||
|
|
@ -361,7 +361,7 @@ class PDelayStatement : public Statement {
|
|||
PDelayStatement(PExpr*d, Statement*st);
|
||||
~PDelayStatement();
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
|
@ -381,7 +381,7 @@ class PDisable : public Statement {
|
|||
explicit PDisable(const pform_name_t&sc);
|
||||
~PDisable();
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
|
||||
private:
|
||||
|
|
@ -397,7 +397,7 @@ class PDoWhile : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*cond_;
|
||||
|
|
@ -426,10 +426,10 @@ class PEventStatement : public Statement {
|
|||
|
||||
void set_statement(Statement*st);
|
||||
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
// Call this with a NULL statement only. It is used to print
|
||||
// the event expression for inter-assignment event controls.
|
||||
virtual void dump_inline(ostream&out) const;
|
||||
virtual void dump_inline(std::ostream&out) const;
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
|
|
@ -449,7 +449,7 @@ class PEventStatement : public Statement {
|
|||
bool always_sens_;
|
||||
};
|
||||
|
||||
ostream& operator << (ostream&o, const PEventStatement&obj);
|
||||
std::ostream& operator << (std::ostream&o, const PEventStatement&obj);
|
||||
|
||||
class PForce : public Statement {
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ class PForce : public Statement {
|
|||
~PForce();
|
||||
|
||||
virtual NetForce* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*lval_;
|
||||
|
|
@ -473,7 +473,7 @@ class PForeach : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
NetProc* elaborate_static_array_(Design*des, NetScope*scope,
|
||||
|
|
@ -493,7 +493,7 @@ class PForever : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
Statement*statement_;
|
||||
|
|
@ -509,7 +509,7 @@ class PForStatement : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr* name1_;
|
||||
|
|
@ -537,7 +537,7 @@ class PRepeat : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*expr_;
|
||||
|
|
@ -551,7 +551,7 @@ class PRelease : public Statement {
|
|||
~PRelease();
|
||||
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*lval_;
|
||||
|
|
@ -581,7 +581,7 @@ class PTrigger : public Statement {
|
|||
~PTrigger();
|
||||
|
||||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PPackage*package_;
|
||||
|
|
@ -597,7 +597,7 @@ class PWhile : public Statement {
|
|||
virtual NetProc* elaborate(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_scope(Design*des, NetScope*scope) const;
|
||||
virtual void elaborate_sig(Design*des, NetScope*scope) const;
|
||||
virtual void dump(ostream&out, unsigned ind) const;
|
||||
virtual void dump(std::ostream&out, unsigned ind) const;
|
||||
|
||||
private:
|
||||
PExpr*cond_;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ extern unsigned long array_size_limit;
|
|||
extern const char*basedir;
|
||||
|
||||
/* This is an ordered list of library suffixes to search. */
|
||||
extern list<const char*>library_suff;
|
||||
extern std::list<const char*>library_suff;
|
||||
extern int build_library_index(const char*path, bool key_case_sensitive);
|
||||
|
||||
/* This is the generation of Verilog that the compiler is asked to
|
||||
|
|
@ -244,14 +244,14 @@ extern int lexor_keyword_mask;
|
|||
/* This is the string to use to invoke the preprocessor. */
|
||||
extern char*ivlpp_string;
|
||||
|
||||
extern map<perm_string,unsigned> missing_modules;
|
||||
extern std::map<perm_string,unsigned> missing_modules;
|
||||
|
||||
/* Files that are library files are in this map. The lexor compares
|
||||
file names as it processes `line directives, and if the file name
|
||||
matches an entry in this table, it will turn on the
|
||||
library_active_flag so that modules know that they are in a
|
||||
library. */
|
||||
extern map<perm_string,bool> library_file_map;
|
||||
extern std::map<perm_string,bool> library_file_map;
|
||||
|
||||
/*
|
||||
* the lex_strings are perm_strings made up of tokens from the source
|
||||
|
|
|
|||
10
config.h.in
10
config.h.in
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_config_H /* -*- c++ -*- */
|
||||
#define IVL_config_H
|
||||
/*
|
||||
* Copyright (c) 2001-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2021 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,14 +19,6 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
# if !defined(__GNUC__)
|
||||
using namespace std;
|
||||
# elif (__GNUC__ == 3)
|
||||
using namespace std;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# undef NEED_LU
|
||||
# undef NEED_TU
|
||||
# undef WLU
|
||||
|
|
|
|||
1
cprop.cc
1
cprop.cc
|
|
@ -28,6 +28,7 @@
|
|||
# include "compiler.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The cprop function below invokes constant propagation where
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
# include "ivl_assert.h"
|
||||
# include "PExpr.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static ostream& operator<< (ostream&o, NetBlock::Type t)
|
||||
{
|
||||
switch (t) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_discipline_H
|
||||
#define IVL_discipline_H
|
||||
/*
|
||||
* Copyright (c) 2008-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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
|
||||
|
|
@ -69,9 +69,9 @@ class ivl_discipline_s : public LineInfo {
|
|||
ivl_discipline_s& operator = (const ivl_discipline_s&);
|
||||
};
|
||||
|
||||
extern map<perm_string,ivl_nature_t> natures;
|
||||
extern map<perm_string,ivl_discipline_t> disciplines;
|
||||
extern std::map<perm_string,ivl_nature_t> natures;
|
||||
extern std::map<perm_string,ivl_discipline_t> disciplines;
|
||||
// Map access function name to the nature that it accesses.
|
||||
extern map<perm_string,ivl_nature_t> access_function_nature;
|
||||
extern std::map<perm_string,ivl_nature_t> access_function_nature;
|
||||
|
||||
#endif /* IVL_discipline_H */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
# include <cstdlib>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetEAccess* NetEAccess::dup_expr() const
|
||||
{
|
||||
NetEAccess*tmp = new NetEAccess(branch_, nature_);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2003 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -29,6 +29,8 @@
|
|||
# include "netmisc.h"
|
||||
# include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetNet* PExpr::elaborate_anet(Design*des, NetScope*scope) const
|
||||
{
|
||||
cerr << get_line() << ": error: Invalid expression on left side "
|
||||
|
|
@ -163,4 +165,3 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const
|
|||
|
||||
return sig;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@
|
|||
# include "util.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool type_is_vectorable(ivl_variable_type_t type)
|
||||
{
|
||||
switch (type) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
# include <climits>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* These methods generate a NetAssign_ object for the l-value of the
|
||||
* assignment. This is common code for the = and <= statements.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
# include <iostream>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The concatenation is also OK an an l-value. This method elaborates
|
||||
* it as a structural l-value. The return values is the *input* net of
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
# include <cassert>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void set_scope_timescale(Design*des, NetScope*scope, PScope*pscope)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
# include "compiler.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// Implemented in elab_scope.cc
|
||||
extern void set_scope_timescale(Design*des, NetScope*scope, PScope*pscope);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008-2012 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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
|
||||
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
# include <typeinfo>
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetProc* AContrib::elaborate(Design*des, NetScope*scope) const
|
||||
{
|
||||
NetExpr*lval = elab_and_eval(des, scope, lval_, -1);
|
||||
|
|
|
|||
2
emit.cc
2
emit.cc
|
|
@ -33,6 +33,8 @@
|
|||
# include <cassert>
|
||||
# include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool NetNode::emit_node(struct target_t*) const
|
||||
{
|
||||
cerr << "EMIT: Gate type? " << typeid(*this).name() << endl;
|
||||
|
|
|
|||
4
eval.cc
4
eval.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2021 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
|
||||
|
|
@ -27,6 +27,8 @@
|
|||
# include "netmisc.h"
|
||||
# include "compiler.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
verinum* PExpr::eval_const(Design*, NetScope*) const
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2002-2021 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
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
# include <iostream>
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The evaluate_attributes function evaluates the attribute
|
||||
* expressions from the map, and returns a table in a form suitable
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
# include "ivl_assert.h"
|
||||
# include "netmisc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetExpr* NetExpr::eval_tree()
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016 Martin Whitaker (icarus@martin-whitaker.me.uk)
|
||||
* Copyright (c) 2016-2021 Martin Whitaker (icarus@martin-whitaker.me.uk)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
# include "compiler.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The exposenodes functor is primarily provided for use by the vlog95
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
# include "netmisc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static NetNet* convert_to_real_const(Design*des, NetScope*scope, NetEConst*expr)
|
||||
{
|
||||
verireal vrl(expr->value().as_double());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_ivl_assert_H
|
||||
#define IVL_ivl_assert_H
|
||||
/*
|
||||
* Copyright (c) 2007-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2007-2021 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
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
#define ivl_assert(tok, expression) \
|
||||
do { \
|
||||
if (! (expression)) { \
|
||||
cerr << (tok).get_fileline() << ": assert: " \
|
||||
<< __FILE__ << ":" << __LINE__ \
|
||||
<< ": failed assertion " << #expression << endl; \
|
||||
std::cerr << (tok).get_fileline() << ": assert: " \
|
||||
<< __FILE__ << ":" << __LINE__ \
|
||||
<< ": failed assertion " << #expression << std::endl; \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
# include "discipline.h"
|
||||
# include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
# define YY_USER_INIT reset_lexor();
|
||||
# define yylval VLlval
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_LineInfo_H
|
||||
#define IVL_LineInfo_H
|
||||
/*
|
||||
* Copyright (c) 1999-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -22,8 +22,6 @@
|
|||
# include "StringHeap.h"
|
||||
# include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* This class holds line information for an internal object.
|
||||
*
|
||||
|
|
@ -40,7 +38,7 @@ class LineInfo {
|
|||
virtual ~LineInfo();
|
||||
|
||||
// Get a fully formatted file/lineno
|
||||
string get_fileline() const;
|
||||
std::string get_fileline() const;
|
||||
// Set the file/line from another LineInfo object.
|
||||
void set_line(const LineInfo&that);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2002-2021 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
|
||||
|
|
@ -29,6 +29,8 @@ static char **string_pool = NULL;
|
|||
static unsigned string_pool_count = 0;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
static const unsigned DEFAULT_CELL_SIZE = 0x10000;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_StringHeap_H
|
||||
#define IVL_StringHeap_H
|
||||
/*
|
||||
* Copyright (c) 2002-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2002-2021 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
|
||||
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
# include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class perm_string {
|
||||
|
||||
public:
|
||||
|
|
@ -61,7 +59,7 @@ extern bool operator > (perm_string a, perm_string b);
|
|||
extern bool operator < (perm_string a, perm_string b);
|
||||
extern bool operator >= (perm_string a, perm_string b);
|
||||
extern bool operator <= (perm_string a, perm_string b);
|
||||
extern ostream& operator << (ostream&out, perm_string that);
|
||||
extern std::ostream& operator << (std::ostream&out, perm_string that);
|
||||
|
||||
/*
|
||||
* The string heap is a way to permanently allocate strings
|
||||
|
|
@ -100,7 +98,7 @@ class StringHeapLex : private StringHeap {
|
|||
|
||||
const char*add(const char*);
|
||||
perm_string make(const char*);
|
||||
perm_string make(const string&);
|
||||
perm_string make(const std::string&);
|
||||
|
||||
unsigned add_count() const;
|
||||
unsigned add_hit_count() const;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -23,6 +23,8 @@
|
|||
# include "netmisc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* Scan the link for drivers. If there are only constant drivers, then
|
||||
* the nexus has a known constant value.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2021 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
|
||||
|
|
@ -32,6 +32,8 @@
|
|||
# include <cassert>
|
||||
# include "ivl_alloc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The module library items are maps of key names to file name within
|
||||
* the directory.
|
||||
|
|
|
|||
2
main.cc
2
main.cc
|
|
@ -62,6 +62,8 @@ const char NOTICE[] =
|
|||
# include "discipline.h"
|
||||
# include "t-dll.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
#if defined(__MINGW32__) && !defined(HAVE_GETOPT_H)
|
||||
extern "C" int getopt(int argc, char*argv[], const char*fmt);
|
||||
extern "C" int optind;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -25,6 +25,8 @@
|
|||
# include "netenum.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* NetAssign
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
# include <sstream>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Design:: Design()
|
||||
: errors(0), nodes_(0), procs_(0), aprocs_(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
# include "netlist.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* NOTE: The name_ is perm-allocated by the caller.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
# include <iostream>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetExpr::NetExpr(unsigned w)
|
||||
: net_type_(0), width_(w), signed_flag_(false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2002-2021 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
|
||||
|
|
@ -23,6 +23,8 @@
|
|||
# include "PExpr.h"
|
||||
# include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* To make a NetUserFunc device, make as many pins as there are ports
|
||||
* in the function. Get the port count from the function definition,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -29,6 +29,8 @@
|
|||
# include <cstdlib>
|
||||
# include "ivl_alloc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void Nexus::connect(Link&r)
|
||||
{
|
||||
Nexus*r_nexus = r.next_? r.find_nexus_() : 0;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
# include "netlist.h"
|
||||
# include "netmisc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NexusSet* NetExpr::nex_input(bool, bool, bool) const
|
||||
{
|
||||
cerr << get_fileline()
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
# include "netlist.h"
|
||||
# include "netmisc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void NetProc::nex_output(NexusSet&)
|
||||
{
|
||||
cerr << get_fileline()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2015 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
# include "netmisc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetBlock::NetBlock(Type t, NetScope*ss)
|
||||
: type_(t), subscope_(ss), last_(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@
|
|||
# include <sstream>
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class PExpr;
|
||||
|
||||
Definitions::Definitions()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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
|
||||
|
|
@ -29,6 +29,8 @@
|
|||
# include "ivl_target_priv.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static bool has_enable(ivl_switch_type_t tt)
|
||||
{
|
||||
switch (tt) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001 Stephan Boettcher <stephan@nevis.columbia.edu>
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -22,6 +22,8 @@
|
|||
# include "compiler.h"
|
||||
# include "netlist.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetUDP::NetUDP(NetScope*s, perm_string n, unsigned pins, PUdp *u)
|
||||
: NetNode(s, n, pins), udp(u)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_netclass_H
|
||||
#define IVL_netclass_H
|
||||
/*
|
||||
* Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2012-2021 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
|
||||
|
|
@ -110,7 +110,7 @@ class netclass_t : public ivl_type_s {
|
|||
bool emit_defs(struct target_t*tgt) const;
|
||||
|
||||
std::ostream& debug_dump(std::ostream&fd) const;
|
||||
void dump_scope(ostream&fd) const;
|
||||
void dump_scope(std::ostream&fd) const;
|
||||
|
||||
private:
|
||||
perm_string name_;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
# include "netvector.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
ostream& operator<< (ostream&o, NetNet::Type t)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
# include "compiler.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetNet* sub_net_from(Design*des, NetScope*scope, long val, NetNet*sig)
|
||||
{
|
||||
|
|
|
|||
30
netmisc.h
30
netmisc.h
|
|
@ -130,7 +130,7 @@ extern NetExpr*normalize_variable_base(NetExpr *base, long msb, long lsb,
|
|||
unsigned long wid, bool is_up,
|
||||
long slice_off =0);
|
||||
extern NetExpr*normalize_variable_base(NetExpr *base,
|
||||
const list<netrange_t>&dims,
|
||||
const std::list<netrange_t>&dims,
|
||||
unsigned long wid, bool is_up);
|
||||
|
||||
/*
|
||||
|
|
@ -141,7 +141,7 @@ extern NetExpr*normalize_variable_base(NetExpr *base,
|
|||
* ... foo[1][x] ...
|
||||
* base is (x) and the generated expression will be (x+8).
|
||||
*/
|
||||
extern NetExpr*normalize_variable_bit_base(const list<long>&indices, NetExpr *base,
|
||||
extern NetExpr*normalize_variable_bit_base(const std::list<long>&indices, NetExpr *base,
|
||||
const NetNet*reg);
|
||||
|
||||
/*
|
||||
|
|
@ -153,7 +153,7 @@ extern NetExpr*normalize_variable_bit_base(const list<long>&indices, NetExpr *ba
|
|||
* base is (x), wid input is (2), and is_up is (true). The output
|
||||
* expression is (x+8).
|
||||
*/
|
||||
extern NetExpr *normalize_variable_part_base(const list<long>&indices, NetExpr*base,
|
||||
extern NetExpr *normalize_variable_part_base(const std::list<long>&indices, NetExpr*base,
|
||||
const NetNet*reg,
|
||||
unsigned long wid, bool is_up);
|
||||
/*
|
||||
|
|
@ -167,7 +167,7 @@ extern NetExpr *normalize_variable_part_base(const list<long>&indices, NetExpr*b
|
|||
* base is (x) and the generated expression will be (x*8 - 8), with
|
||||
* lwid set to (8).
|
||||
*/
|
||||
extern NetExpr*normalize_variable_slice_base(const list<long>&indices, NetExpr *base,
|
||||
extern NetExpr*normalize_variable_slice_base(const std::list<long>&indices, NetExpr *base,
|
||||
const NetNet*reg, unsigned long&lwid);
|
||||
|
||||
/*
|
||||
|
|
@ -181,8 +181,8 @@ template <class TYPE> struct __IndicesManip {
|
|||
template <class TYPE> inline __IndicesManip<TYPE> as_indices(const std::list<TYPE>&indices)
|
||||
{ return __IndicesManip<TYPE>(indices); }
|
||||
|
||||
extern ostream& operator << (ostream&o, __IndicesManip<long>);
|
||||
extern ostream& operator << (ostream&o, __IndicesManip<NetExpr*>);
|
||||
extern std::ostream& operator << (std::ostream&o, __IndicesManip<long>);
|
||||
extern std::ostream& operator << (std::ostream&o, __IndicesManip<NetExpr*>);
|
||||
|
||||
/*
|
||||
* Given a list of index expressions, generate elaborated expressions
|
||||
|
|
@ -198,18 +198,18 @@ extern void indices_to_expressions(Design*des, NetScope*scope,
|
|||
const LineInfo*loc,
|
||||
// src is the index list, and count is
|
||||
// the number of items in the list to use.
|
||||
const list<index_component_t>&src, unsigned count,
|
||||
const std::list<index_component_t>&src, unsigned count,
|
||||
// True if the expression MUST be constant.
|
||||
bool need_const,
|
||||
// These are the outputs.
|
||||
indices_flags&flags,
|
||||
list<NetExpr*>&indices,list<long>&indices_const);
|
||||
std::list<NetExpr*>&indices,std::list<long>&indices_const);
|
||||
|
||||
extern NetExpr*normalize_variable_unpacked(const NetNet*net, list<long>&indices);
|
||||
extern NetExpr*normalize_variable_unpacked(const netsarray_t*net, list<long>&indices);
|
||||
extern NetExpr*normalize_variable_unpacked(const NetNet*net, std::list<long>&indices);
|
||||
extern NetExpr*normalize_variable_unpacked(const netsarray_t*net, std::list<long>&indices);
|
||||
|
||||
extern NetExpr*normalize_variable_unpacked(const NetNet*net, list<NetExpr*>&indices);
|
||||
extern NetExpr*normalize_variable_unpacked(const LineInfo&loc, const netsarray_t*net, list<NetExpr*>&indices);
|
||||
extern NetExpr*normalize_variable_unpacked(const NetNet*net, std::list<NetExpr*>&indices);
|
||||
extern NetExpr*normalize_variable_unpacked(const LineInfo&loc, const netsarray_t*net, std::list<NetExpr*>&indices);
|
||||
|
||||
extern NetExpr*make_canonical_index(Design*des, NetScope*scope,
|
||||
// loc for error messages
|
||||
|
|
@ -387,15 +387,15 @@ extern uint64_t get_scaled_time_from_real(Design*des,
|
|||
extern void collapse_partselect_pv_to_concat(Design*des, NetNet*sig);
|
||||
|
||||
extern bool evaluate_index_prefix(Design*des, NetScope*scope,
|
||||
list<long>&prefix_indices,
|
||||
const list<index_component_t>&indices);
|
||||
std::list<long>&prefix_indices,
|
||||
const std::list<index_component_t>&indices);
|
||||
|
||||
extern NetExpr*collapse_array_indices(Design*des, NetScope*scope, NetNet*net,
|
||||
const std::list<index_component_t>&indices);
|
||||
|
||||
extern NetExpr*collapse_array_exprs(Design*des, NetScope*scope,
|
||||
const LineInfo*loc, NetNet*net,
|
||||
const list<index_component_t>&indices);
|
||||
const std::list<index_component_t>&indices);
|
||||
|
||||
extern void assign_unpacked_with_bufz(Design*des, NetScope*scope,
|
||||
const LineInfo*loc,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -29,6 +29,8 @@
|
|||
# include "netlist.h"
|
||||
# include "compiler.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class nodangle_f : public functor_t {
|
||||
public:
|
||||
void event(Design*des, NetEvent*ev);
|
||||
|
|
|
|||
266
parse.y
266
parse.y
|
|
@ -31,11 +31,13 @@
|
|||
# include <cstring>
|
||||
# include <sstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class PSpecPath;
|
||||
|
||||
extern void lex_end_table();
|
||||
|
||||
static list<pform_range_t>* param_active_range = 0;
|
||||
static std::list<pform_range_t>* param_active_range = 0;
|
||||
static bool param_active_signed = false;
|
||||
static ivl_variable_type_t param_active_type = IVL_VT_LOGIC;
|
||||
|
||||
|
|
@ -92,7 +94,7 @@ static unsigned args_after_notifier;
|
|||
/* The rules sometimes push attributes into a global context where
|
||||
sub-rules may grab them. This makes parser rules a little easier to
|
||||
write in some cases. */
|
||||
static list<named_pexpr_t>*attributes_in_context = 0;
|
||||
static std::list<named_pexpr_t>*attributes_in_context = 0;
|
||||
|
||||
/* Later version of bison (including 1.35) will not compile in stack
|
||||
extension if the output is compiled with C++ and either the YYSTYPE
|
||||
|
|
@ -132,15 +134,15 @@ static list<named_pexpr_t>*attributes_in_context = 0;
|
|||
static const struct str_pair_t pull_strength = { IVL_DR_PULL, IVL_DR_PULL };
|
||||
static const struct str_pair_t str_strength = { IVL_DR_STRONG, IVL_DR_STRONG };
|
||||
|
||||
static list<pform_port_t>* make_port_list(char*id, list<pform_range_t>*udims, PExpr*expr)
|
||||
static std::list<pform_port_t>* make_port_list(char*id, std::list<pform_range_t>*udims, PExpr*expr)
|
||||
{
|
||||
list<pform_port_t>*tmp = new list<pform_port_t>;
|
||||
std::list<pform_port_t>*tmp = new std::list<pform_port_t>;
|
||||
tmp->push_back(pform_port_t(lex_strings.make(id), udims, expr));
|
||||
delete[]id;
|
||||
return tmp;
|
||||
}
|
||||
static list<pform_port_t>* make_port_list(list<pform_port_t>*tmp,
|
||||
char*id, list<pform_range_t>*udims, PExpr*expr)
|
||||
static std::list<pform_port_t>* make_port_list(list<pform_port_t>*tmp,
|
||||
char*id, std::list<pform_range_t>*udims, PExpr*expr)
|
||||
{
|
||||
tmp->push_back(pform_port_t(lex_strings.make(id), udims, expr));
|
||||
delete[]id;
|
||||
|
|
@ -153,20 +155,20 @@ list<pform_range_t>* make_range_from_width(uint64_t wid)
|
|||
range.first = new PENumber(new verinum(wid-1, integer_width));
|
||||
range.second = new PENumber(new verinum((uint64_t)0, integer_width));
|
||||
|
||||
list<pform_range_t>*rlist = new list<pform_range_t>;
|
||||
std::list<pform_range_t>*rlist = new std::list<pform_range_t>;
|
||||
rlist->push_back(range);
|
||||
return rlist;
|
||||
}
|
||||
|
||||
static list<perm_string>* list_from_identifier(char*id)
|
||||
static std::list<perm_string>* list_from_identifier(char*id)
|
||||
{
|
||||
list<perm_string>*tmp = new list<perm_string>;
|
||||
std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make(id));
|
||||
delete[]id;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static list<perm_string>* list_from_identifier(list<perm_string>*tmp, char*id)
|
||||
static std::list<perm_string>* list_from_identifier(list<perm_string>*tmp, char*id)
|
||||
{
|
||||
tmp->push_back(lex_strings.make(id));
|
||||
delete[]id;
|
||||
|
|
@ -175,15 +177,15 @@ static list<perm_string>* list_from_identifier(list<perm_string>*tmp, char*id)
|
|||
|
||||
list<pform_range_t>* copy_range(list<pform_range_t>* orig)
|
||||
{
|
||||
list<pform_range_t>*copy = 0;
|
||||
std::list<pform_range_t>*copy = 0;
|
||||
|
||||
if (orig)
|
||||
copy = new list<pform_range_t> (*orig);
|
||||
copy = new std::list<pform_range_t> (*orig);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
template <class T> void append(vector<T>&out, const vector<T>&in)
|
||||
template <class T> void append(vector<T>&out, const std::vector<T>&in)
|
||||
{
|
||||
for (size_t idx = 0 ; idx < in.size() ; idx += 1)
|
||||
out.push_back(in[idx]);
|
||||
|
|
@ -207,7 +209,7 @@ static void strip_tail_items(list<PExpr*>*lst)
|
|||
*/
|
||||
static PECallFunction*make_call_function(perm_string tn, PExpr*arg)
|
||||
{
|
||||
vector<PExpr*> parms(1);
|
||||
std::vector<PExpr*> parms(1);
|
||||
parms[0] = arg;
|
||||
PECallFunction*tmp = new PECallFunction(tn, parms);
|
||||
return tmp;
|
||||
|
|
@ -215,16 +217,16 @@ static PECallFunction*make_call_function(perm_string tn, PExpr*arg)
|
|||
|
||||
static PECallFunction*make_call_function(perm_string tn, PExpr*arg1, PExpr*arg2)
|
||||
{
|
||||
vector<PExpr*> parms(2);
|
||||
std::vector<PExpr*> parms(2);
|
||||
parms[0] = arg1;
|
||||
parms[1] = arg2;
|
||||
PECallFunction*tmp = new PECallFunction(tn, parms);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static list<named_pexpr_t>* make_named_numbers(perm_string name, long first, long last, PExpr*val =0)
|
||||
static std::list<named_pexpr_t>* make_named_numbers(perm_string name, long first, long last, PExpr*val =0)
|
||||
{
|
||||
list<named_pexpr_t>*lst = new list<named_pexpr_t>;
|
||||
std::list<named_pexpr_t>*lst = new std::list<named_pexpr_t>;
|
||||
named_pexpr_t tmp;
|
||||
// We are counting up.
|
||||
if (first <= last) {
|
||||
|
|
@ -250,9 +252,9 @@ static list<named_pexpr_t>* make_named_numbers(perm_string name, long first, lon
|
|||
return lst;
|
||||
}
|
||||
|
||||
static list<named_pexpr_t>* make_named_number(perm_string name, PExpr*val =0)
|
||||
static std::list<named_pexpr_t>* make_named_number(perm_string name, PExpr*val =0)
|
||||
{
|
||||
list<named_pexpr_t>*lst = new list<named_pexpr_t>;
|
||||
std::list<named_pexpr_t>*lst = new std::list<named_pexpr_t>;
|
||||
named_pexpr_t tmp;
|
||||
tmp.name = name;
|
||||
tmp.parm = val;
|
||||
|
|
@ -282,7 +284,7 @@ static long check_enum_seq_value(const YYLTYPE&loc, verinum *arg, bool zero_ok)
|
|||
return value;
|
||||
}
|
||||
|
||||
static void current_task_set_statement(const YYLTYPE&loc, vector<Statement*>*s)
|
||||
static void current_task_set_statement(const YYLTYPE&loc, std::vector<Statement*>*s)
|
||||
{
|
||||
if (s == 0) {
|
||||
/* if the statement list is null, then the parser
|
||||
|
|
@ -320,7 +322,7 @@ static void current_task_set_statement(const YYLTYPE&loc, vector<Statement*>*s)
|
|||
current_task->set_statement(tmp);
|
||||
}
|
||||
|
||||
static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>*s)
|
||||
static void current_function_set_statement(const YYLTYPE&loc, std::vector<Statement*>*s)
|
||||
{
|
||||
if (s == 0) {
|
||||
/* if the statement list is null, then the parser
|
||||
|
|
@ -369,11 +371,11 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
|||
/* text items are C strings allocated by the lexor using
|
||||
strdup. They can be put into lists with the texts type. */
|
||||
char*text;
|
||||
list<perm_string>*perm_strings;
|
||||
std::list<perm_string>*perm_strings;
|
||||
|
||||
list<pform_port_t>*port_list;
|
||||
std::list<pform_port_t>*port_list;
|
||||
|
||||
vector<pform_tf_port_t>* tf_ports;
|
||||
std::vector<pform_tf_port_t>* tf_ports;
|
||||
|
||||
pform_name_t*pform_name;
|
||||
|
||||
|
|
@ -381,7 +383,7 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
|||
|
||||
hname_t*hier;
|
||||
|
||||
list<string>*strings;
|
||||
std::list<std::string>*strings;
|
||||
|
||||
struct str_pair_t drive;
|
||||
|
||||
|
|
@ -393,18 +395,18 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
|||
|
||||
Module::port_t *mport;
|
||||
LexicalScope::range_t* value_range;
|
||||
vector<Module::port_t*>*mports;
|
||||
std::vector<Module::port_t*>*mports;
|
||||
|
||||
named_number_t* named_number;
|
||||
list<named_number_t>* named_numbers;
|
||||
std::list<named_number_t>* named_numbers;
|
||||
|
||||
named_pexpr_t*named_pexpr;
|
||||
list<named_pexpr_t>*named_pexprs;
|
||||
std::list<named_pexpr_t>*named_pexprs;
|
||||
struct parmvalue_t*parmvalue;
|
||||
list<pform_range_t>*ranges;
|
||||
std::list<pform_range_t>*ranges;
|
||||
|
||||
PExpr*expr;
|
||||
list<PExpr*>*exprs;
|
||||
std::list<PExpr*>*exprs;
|
||||
|
||||
svector<PEEvent*>*event_expr;
|
||||
|
||||
|
|
@ -416,20 +418,20 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
|||
PBlock::BL_TYPE join_keyword;
|
||||
|
||||
PWire*wire;
|
||||
vector<PWire*>*wires;
|
||||
std::vector<PWire*>*wires;
|
||||
|
||||
PEventStatement*event_statement;
|
||||
Statement*statement;
|
||||
vector<Statement*>*statement_list;
|
||||
std::vector<Statement*>*statement_list;
|
||||
|
||||
net_decl_assign_t*net_decl_assign;
|
||||
enum_type_t*enum_type;
|
||||
|
||||
decl_assignment_t*decl_assignment;
|
||||
list<decl_assignment_t*>*decl_assignments;
|
||||
std::list<decl_assignment_t*>*decl_assignments;
|
||||
|
||||
struct_member_t*struct_member;
|
||||
list<struct_member_t*>*struct_members;
|
||||
std::list<struct_member_t*>*struct_members;
|
||||
struct_type_t*struct_type;
|
||||
|
||||
data_type_t*data_type;
|
||||
|
|
@ -445,7 +447,7 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
|||
|
||||
struct {
|
||||
data_type_t*type;
|
||||
list<PExpr*>*exprs;
|
||||
std::list<PExpr*>*exprs;
|
||||
} class_declaration_extends;
|
||||
|
||||
struct {
|
||||
|
|
@ -458,7 +460,7 @@ static void current_function_set_statement(const YYLTYPE&loc, vector<Statement*>
|
|||
verireal* realtime;
|
||||
|
||||
PSpecPath* specpath;
|
||||
list<index_component_t> *dimensions;
|
||||
std::list<index_component_t> *dimensions;
|
||||
|
||||
LexicalScope::lifetime_t lifetime;
|
||||
};
|
||||
|
|
@ -981,7 +983,7 @@ class_item_qualifier_opt
|
|||
|
||||
class_new /* IEEE1800-2005 A.2.4 */
|
||||
: K_new '(' expression_list_with_nuls ')'
|
||||
{ list<PExpr*>*expr_list = $3;
|
||||
{ std::list<PExpr*>*expr_list = $3;
|
||||
strip_tail_items(expr_list);
|
||||
PENewClass*tmp = new PENewClass(*expr_list);
|
||||
FILE_NAME(tmp, @1);
|
||||
|
|
@ -1197,14 +1199,14 @@ data_type /* IEEE1800-2005: A.2.2.1 */
|
|||
$$ = tmp;
|
||||
}
|
||||
| K_integer signed_unsigned_opt
|
||||
{ list<pform_range_t>*pd = make_range_from_width(integer_width);
|
||||
{ std::list<pform_range_t>*pd = make_range_from_width(integer_width);
|
||||
vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, $2, pd);
|
||||
tmp->reg_flag = true;
|
||||
tmp->integer_flag = true;
|
||||
$$ = tmp;
|
||||
}
|
||||
| K_time unsigned_signed_opt
|
||||
{ list<pform_range_t>*pd = make_range_from_width(64);
|
||||
{ std::list<pform_range_t>*pd = make_range_from_width(64);
|
||||
vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, $2, pd);
|
||||
tmp->reg_flag = !gn_system_verilog();
|
||||
$$ = tmp;
|
||||
|
|
@ -1750,12 +1752,12 @@ loop_statement /* IEEE1800-2005: A.6.8 */
|
|||
/* TODO: Replace register_variable_list with list_of_variable_decl_assignments. */
|
||||
list_of_variable_decl_assignments /* IEEE1800-2005 A.2.3 */
|
||||
: variable_decl_assignment
|
||||
{ list<decl_assignment_t*>*tmp = new list<decl_assignment_t*>;
|
||||
{ std::list<decl_assignment_t*>*tmp = new std::list<decl_assignment_t*>;
|
||||
tmp->push_back($1);
|
||||
$$ = tmp;
|
||||
}
|
||||
| list_of_variable_decl_assignments ',' variable_decl_assignment
|
||||
{ list<decl_assignment_t*>*tmp = $1;
|
||||
{ std::list<decl_assignment_t*>*tmp = $1;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -1800,13 +1802,13 @@ variable_decl_assignment /* IEEE1800-2005 A.2.3 */
|
|||
|
||||
loop_variables /* IEEE1800-2005: A.6.8 */
|
||||
: loop_variables ',' IDENTIFIER
|
||||
{ list<perm_string>*tmp = $1;
|
||||
{ std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
delete[]$3;
|
||||
$$ = tmp;
|
||||
}
|
||||
| IDENTIFIER
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
delete[]$1;
|
||||
$$ = tmp;
|
||||
|
|
@ -2115,7 +2117,7 @@ simple_immediate_assertion_statement /* IEEE1800-2012 A.6.10 */
|
|||
: assert_or_assume '(' expression ')' statement_or_null %prec less_than_K_else
|
||||
{
|
||||
if (gn_supported_assertions_flag) {
|
||||
list<PExpr*>arg_list;
|
||||
std::list<PExpr*>arg_list;
|
||||
PCallTask*tmp1 = new PCallTask(lex_strings.make("$error"), arg_list);
|
||||
FILE_NAME(tmp1, @1);
|
||||
PCondit*tmp2 = new PCondit($3, $5, tmp1);
|
||||
|
|
@ -2201,14 +2203,14 @@ simple_type_or_string /* IEEE1800-2005: A.2.2.1 */
|
|||
$$ = tmp;
|
||||
}
|
||||
| K_integer
|
||||
{ list<pform_range_t>*pd = make_range_from_width(integer_width);
|
||||
{ std::list<pform_range_t>*pd = make_range_from_width(integer_width);
|
||||
vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, true, pd);
|
||||
tmp->reg_flag = true;
|
||||
tmp->integer_flag = true;
|
||||
$$ = tmp;
|
||||
}
|
||||
| K_time
|
||||
{ list<pform_range_t>*pd = make_range_from_width(64);
|
||||
{ std::list<pform_range_t>*pd = make_range_from_width(64);
|
||||
vector_type_t*tmp = new vector_type_t(IVL_VT_LOGIC, false, pd);
|
||||
tmp->reg_flag = !gn_system_verilog();
|
||||
$$ = tmp;
|
||||
|
|
@ -2388,7 +2390,7 @@ task_declaration /* IEEE1800-2005: A.2.7 */
|
|||
|
||||
tf_port_declaration /* IEEE1800-2005: A.2.7 */
|
||||
: port_direction K_reg_opt unsigned_signed_opt dimensions_opt list_of_identifiers ';'
|
||||
{ vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1,
|
||||
{ std::vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1,
|
||||
$2 ? IVL_VT_LOGIC :
|
||||
IVL_VT_NO_TYPE,
|
||||
$3, $4, $5);
|
||||
|
|
@ -2399,7 +2401,7 @@ tf_port_declaration /* IEEE1800-2005: A.2.7 */
|
|||
shape. Generate a range ([31:0]) to make it work. */
|
||||
|
||||
| port_direction K_integer list_of_identifiers ';'
|
||||
{ list<pform_range_t>*range_stub = make_range_from_width(integer_width);
|
||||
{ std::list<pform_range_t>*range_stub = make_range_from_width(integer_width);
|
||||
vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_LOGIC, true,
|
||||
range_stub, $3, true);
|
||||
$$ = tmp;
|
||||
|
|
@ -2408,7 +2410,7 @@ tf_port_declaration /* IEEE1800-2005: A.2.7 */
|
|||
/* Ports can be time with a width of [63:0] (unsigned). */
|
||||
|
||||
| port_direction K_time list_of_identifiers ';'
|
||||
{ list<pform_range_t>*range_stub = make_range_from_width(64);
|
||||
{ std::list<pform_range_t>*range_stub = make_range_from_width(64);
|
||||
vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_LOGIC, false,
|
||||
range_stub, $3);
|
||||
$$ = tmp;
|
||||
|
|
@ -2417,7 +2419,7 @@ tf_port_declaration /* IEEE1800-2005: A.2.7 */
|
|||
/* Ports can be real or realtime. */
|
||||
|
||||
| port_direction real_or_realtime list_of_identifiers ';'
|
||||
{ vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_REAL, true,
|
||||
{ std::vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_REAL, true,
|
||||
0, $3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -2426,7 +2428,7 @@ tf_port_declaration /* IEEE1800-2005: A.2.7 */
|
|||
/* Ports can be string. */
|
||||
|
||||
| port_direction K_string list_of_identifiers ';'
|
||||
{ vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_STRING, true,
|
||||
{ std::vector<pform_tf_port_t>*tmp = pform_make_task_ports(@1, $1, IVL_VT_STRING, true,
|
||||
0, $3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -2445,7 +2447,7 @@ tf_port_declaration /* IEEE1800-2005: A.2.7 */
|
|||
tf_port_item /* IEEE1800-2005: A.2.7 */
|
||||
|
||||
: port_direction_opt data_type_or_implicit IDENTIFIER dimensions_opt tf_port_item_expr_opt
|
||||
{ vector<pform_tf_port_t>*tmp;
|
||||
{ std::vector<pform_tf_port_t>*tmp;
|
||||
NetNet::PortType use_port_type = $1;
|
||||
if ((use_port_type == NetNet::PIMPLICIT) && (gn_system_verilog() || ($2 == 0)))
|
||||
use_port_type = port_declaration_context.port_type;
|
||||
|
|
@ -2526,7 +2528,7 @@ tf_port_list /* IEEE1800-2005: A.2.7 */
|
|||
|
||||
tf_port_item_list
|
||||
: tf_port_item_list ',' tf_port_item
|
||||
{ vector<pform_tf_port_t>*tmp;
|
||||
{ std::vector<pform_tf_port_t>*tmp;
|
||||
if ($1 && $3) {
|
||||
size_t s1 = $1->size();
|
||||
tmp = $1;
|
||||
|
|
@ -2590,7 +2592,7 @@ value_range /* IEEE1800-2005: A.8.3 */
|
|||
|
||||
variable_dimension /* IEEE1800-2005: A.2.5 */
|
||||
: '[' expression ':' expression ']'
|
||||
{ list<pform_range_t> *tmp = new list<pform_range_t>;
|
||||
{ std::list<pform_range_t> *tmp = new std::list<pform_range_t>;
|
||||
pform_range_t index ($2,$4);
|
||||
tmp->push_back(index);
|
||||
$$ = tmp;
|
||||
|
|
@ -2602,20 +2604,20 @@ variable_dimension /* IEEE1800-2005: A.2.5 */
|
|||
cerr << @2 << ": warning: Use of SystemVerilog [size] dimension. "
|
||||
<< "Use at least -g2005-sv to remove this warning." << endl;
|
||||
}
|
||||
list<pform_range_t> *tmp = new list<pform_range_t>;
|
||||
list<pform_range_t> *tmp = new std::list<pform_range_t>;
|
||||
pform_range_t index ($2,0);
|
||||
tmp->push_back(index);
|
||||
$$ = tmp;
|
||||
}
|
||||
| '[' ']'
|
||||
{ list<pform_range_t> *tmp = new list<pform_range_t>;
|
||||
{ std::list<pform_range_t> *tmp = new std::list<pform_range_t>;
|
||||
pform_range_t index (0,0);
|
||||
tmp->push_back(index);
|
||||
$$ = tmp;
|
||||
}
|
||||
| '[' '$' ']'
|
||||
{ // SystemVerilog queue
|
||||
list<pform_range_t> *tmp = new list<pform_range_t>;
|
||||
list<pform_range_t> *tmp = new std::list<pform_range_t>;
|
||||
pform_range_t index (new PENull,0);
|
||||
if (!gn_system_verilog()) {
|
||||
yyerror("error: Queue declarations require SystemVerilog.");
|
||||
|
|
@ -2625,7 +2627,7 @@ variable_dimension /* IEEE1800-2005: A.2.5 */
|
|||
}
|
||||
| '[' '$' ':' expression ']'
|
||||
{ // SystemVerilog queue with a max size
|
||||
list<pform_range_t> *tmp = new list<pform_range_t>;
|
||||
list<pform_range_t> *tmp = new std::list<pform_range_t>;
|
||||
pform_range_t index (new PENull,$4);
|
||||
if (!gn_system_verilog()) {
|
||||
yyerror("error: Queue declarations require SystemVerilog.");
|
||||
|
|
@ -2663,7 +2665,7 @@ attribute_instance_list
|
|||
| K_PSTAR attribute_list K_STARP { $$ = $2; }
|
||||
| attribute_instance_list K_PSTAR K_STARP { $$ = $1; }
|
||||
| attribute_instance_list K_PSTAR attribute_list K_STARP
|
||||
{ list<named_pexpr_t>*tmp = $1;
|
||||
{ std::list<named_pexpr_t>*tmp = $1;
|
||||
if (tmp) {
|
||||
tmp->splice(tmp->end(), *$3);
|
||||
delete $3;
|
||||
|
|
@ -2674,13 +2676,13 @@ attribute_instance_list
|
|||
|
||||
attribute_list
|
||||
: attribute_list ',' attribute
|
||||
{ list<named_pexpr_t>*tmp = $1;
|
||||
{ std::list<named_pexpr_t>*tmp = $1;
|
||||
tmp->push_back(*$3);
|
||||
delete $3;
|
||||
$$ = tmp;
|
||||
}
|
||||
| attribute
|
||||
{ list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
|
||||
{ std::list<named_pexpr_t>*tmp = new std::list<named_pexpr_t>;
|
||||
tmp->push_back(*$1);
|
||||
delete $1;
|
||||
$$ = tmp;
|
||||
|
|
@ -2914,7 +2916,7 @@ enum_name_list
|
|||
{ $$ = $1;
|
||||
}
|
||||
| enum_name_list ',' enum_name
|
||||
{ list<named_pexpr_t>*lst = $1;
|
||||
{ std::list<named_pexpr_t>*lst = $1;
|
||||
lst->splice(lst->end(), *$3);
|
||||
delete $3;
|
||||
$$ = lst;
|
||||
|
|
@ -3018,12 +3020,12 @@ struct_data_type
|
|||
in IEEE 1800-2012 A.2.2.1. */
|
||||
struct_union_member_list
|
||||
: struct_union_member_list struct_union_member
|
||||
{ list<struct_member_t*>*tmp = $1;
|
||||
{ std::list<struct_member_t*>*tmp = $1;
|
||||
tmp->push_back($2);
|
||||
$$ = tmp;
|
||||
}
|
||||
| struct_union_member
|
||||
{ list<struct_member_t*>*tmp = new list<struct_member_t*>;
|
||||
{ std::list<struct_member_t*>*tmp = new std::list<struct_member_t*>;
|
||||
tmp->push_back($1);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -3111,12 +3113,12 @@ defparam_assign_list
|
|||
|
||||
delay1
|
||||
: '#' delay_value_simple
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($2);
|
||||
$$ = tmp;
|
||||
}
|
||||
| '#' '(' delay_value ')'
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -3124,23 +3126,23 @@ delay1
|
|||
|
||||
delay3
|
||||
: '#' delay_value_simple
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($2);
|
||||
$$ = tmp;
|
||||
}
|
||||
| '#' '(' delay_value ')'
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
| '#' '(' delay_value ',' delay_value ')'
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($3);
|
||||
tmp->push_back($5);
|
||||
$$ = tmp;
|
||||
}
|
||||
| '#' '(' delay_value ',' delay_value ',' delay_value ')'
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($3);
|
||||
tmp->push_back($5);
|
||||
tmp->push_back($7);
|
||||
|
|
@ -3155,12 +3157,12 @@ delay3_opt
|
|||
|
||||
delay_value_list
|
||||
: delay_value
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($1);
|
||||
$$ = tmp;
|
||||
}
|
||||
| delay_value_list ',' delay_value
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -3737,22 +3739,22 @@ expr_mintypmax
|
|||
|
||||
expression_list_with_nuls
|
||||
: expression_list_with_nuls ',' expression
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
if (tmp->empty()) tmp->push_back(0);
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
| expression
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($1);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
$$ = tmp;
|
||||
}
|
||||
| expression_list_with_nuls ','
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
if (tmp->empty()) tmp->push_back(0);
|
||||
tmp->push_back(0);
|
||||
$$ = tmp;
|
||||
|
|
@ -3761,12 +3763,12 @@ expression_list_with_nuls
|
|||
|
||||
expression_list_proper
|
||||
: expression_list_proper ',' expression
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
| expression
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($1);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -3848,7 +3850,7 @@ expr_primary
|
|||
call. It can also be a call to a class method (function). */
|
||||
|
||||
| hierarchy_identifier attribute_list_opt '(' expression_list_with_nuls ')'
|
||||
{ list<PExpr*>*expr_list = $4;
|
||||
{ std::list<PExpr*>*expr_list = $4;
|
||||
strip_tail_items(expr_list);
|
||||
PECallFunction*tmp = pform_make_call_function(@1, *$1, *expr_list);
|
||||
delete $1;
|
||||
|
|
@ -3884,7 +3886,7 @@ expr_primary
|
|||
}
|
||||
| SYSTEM_IDENTIFIER '(' ')'
|
||||
{ perm_string tn = lex_strings.make($1);
|
||||
const vector<PExpr*>empty;
|
||||
const std::vector<PExpr*>empty;
|
||||
PECallFunction*tmp = new PECallFunction(tn, empty);
|
||||
FILE_NAME(tmp, @1);
|
||||
delete[]$1;
|
||||
|
|
@ -4120,7 +4122,7 @@ expr_primary
|
|||
| '{' '}'
|
||||
{ // This is the empty queue syntax.
|
||||
if (gn_system_verilog()) {
|
||||
list<PExpr*> empty_list;
|
||||
std::list<PExpr*> empty_list;
|
||||
PEConcat*tmp = new PEConcat(empty_list);
|
||||
FILE_NAME(tmp, @1);
|
||||
$$ = tmp;
|
||||
|
|
@ -4188,7 +4190,7 @@ function_item_list
|
|||
| function_item_list function_item
|
||||
{ /* */
|
||||
if ($1 && $2) {
|
||||
vector<pform_tf_port_t>*tmp = $1;
|
||||
std::vector<pform_tf_port_t>*tmp = $1;
|
||||
size_t s1 = tmp->size();
|
||||
tmp->resize(s1 + $2->size());
|
||||
for (size_t idx = 0 ; idx < $2->size() ; idx += 1)
|
||||
|
|
@ -4488,13 +4490,13 @@ list_of_variable_port_identifiers
|
|||
|
||||
list_of_ports
|
||||
: port_opt
|
||||
{ vector<Module::port_t*>*tmp
|
||||
= new vector<Module::port_t*>(1);
|
||||
{ std::vector<Module::port_t*>*tmp
|
||||
= new std::vector<Module::port_t*>(1);
|
||||
(*tmp)[0] = $1;
|
||||
$$ = tmp;
|
||||
}
|
||||
| list_of_ports ',' port_opt
|
||||
{ vector<Module::port_t*>*tmp = $1;
|
||||
{ std::vector<Module::port_t*>*tmp = $1;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -4502,13 +4504,13 @@ list_of_ports
|
|||
|
||||
list_of_port_declarations
|
||||
: port_declaration
|
||||
{ vector<Module::port_t*>*tmp
|
||||
= new vector<Module::port_t*>(1);
|
||||
{ std::vector<Module::port_t*>*tmp
|
||||
= new std::vector<Module::port_t*>(1);
|
||||
(*tmp)[0] = $1;
|
||||
$$ = tmp;
|
||||
}
|
||||
| list_of_port_declarations ',' port_declaration
|
||||
{ vector<Module::port_t*>*tmp = $1;
|
||||
{ std::vector<Module::port_t*>*tmp = $1;
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -4517,7 +4519,7 @@ list_of_port_declarations
|
|||
perm_string name = lex_strings.make($3);
|
||||
ptmp = pform_module_port_reference(name, @3.text,
|
||||
@3.first_line);
|
||||
vector<Module::port_t*>*tmp = $1;
|
||||
std::vector<Module::port_t*>*tmp = $1;
|
||||
tmp->push_back(ptmp);
|
||||
|
||||
/* Get the port declaration details, the port type
|
||||
|
|
@ -4765,7 +4767,7 @@ lpvalue
|
|||
|
||||
cont_assign
|
||||
: lpvalue '=' expression
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($1);
|
||||
tmp->push_back($3);
|
||||
$$ = tmp;
|
||||
|
|
@ -4774,7 +4776,7 @@ cont_assign
|
|||
|
||||
cont_assign_list
|
||||
: cont_assign_list ',' cont_assign
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
tmp->splice(tmp->end(), *$3);
|
||||
delete $3;
|
||||
$$ = tmp;
|
||||
|
|
@ -5654,7 +5656,7 @@ parameter_value_opt
|
|||
FILE_NAME(tmp, @1);
|
||||
|
||||
struct parmvalue_t*lst = new struct parmvalue_t;
|
||||
lst->by_order = new list<PExpr*>;
|
||||
lst->by_order = new std::list<PExpr*>;
|
||||
lst->by_order->push_back(tmp);
|
||||
lst->by_name = 0;
|
||||
$$ = lst;
|
||||
|
|
@ -5666,7 +5668,7 @@ parameter_value_opt
|
|||
FILE_NAME(tmp, @1);
|
||||
|
||||
struct parmvalue_t*lst = new struct parmvalue_t;
|
||||
lst->by_order = new list<PExpr*>;
|
||||
lst->by_order = new std::list<PExpr*>;
|
||||
lst->by_order->push_back(tmp);
|
||||
lst->by_name = 0;
|
||||
$$ = lst;
|
||||
|
|
@ -5699,13 +5701,13 @@ parameter_value_byname
|
|||
|
||||
parameter_value_byname_list
|
||||
: parameter_value_byname
|
||||
{ list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
|
||||
{ std::list<named_pexpr_t>*tmp = new std::list<named_pexpr_t>;
|
||||
tmp->push_back(*$1);
|
||||
delete $1;
|
||||
$$ = tmp;
|
||||
}
|
||||
| parameter_value_byname_list ',' parameter_value_byname
|
||||
{ list<named_pexpr_t>*tmp = $1;
|
||||
{ std::list<named_pexpr_t>*tmp = $1;
|
||||
tmp->push_back(*$3);
|
||||
delete $3;
|
||||
$$ = tmp;
|
||||
|
|
@ -5817,13 +5819,13 @@ port_name
|
|||
|
||||
port_name_list
|
||||
: port_name_list ',' port_name
|
||||
{ list<named_pexpr_t>*tmp = $1;
|
||||
{ std::list<named_pexpr_t>*tmp = $1;
|
||||
tmp->push_back(*$3);
|
||||
delete $3;
|
||||
$$ = tmp;
|
||||
}
|
||||
| port_name
|
||||
{ list<named_pexpr_t>*tmp = new list<named_pexpr_t>;
|
||||
{ std::list<named_pexpr_t>*tmp = new std::list<named_pexpr_t>;
|
||||
tmp->push_back(*$1);
|
||||
delete $1;
|
||||
$$ = tmp;
|
||||
|
|
@ -5832,24 +5834,24 @@ port_name_list
|
|||
|
||||
port_conn_expression_list_with_nuls
|
||||
: port_conn_expression_list_with_nuls ',' attribute_list_opt expression
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
tmp->push_back($4);
|
||||
delete $3;
|
||||
$$ = tmp;
|
||||
}
|
||||
| attribute_list_opt expression
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($2);
|
||||
delete $1;
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back(0);
|
||||
$$ = tmp;
|
||||
}
|
||||
| port_conn_expression_list_with_nuls ','
|
||||
{ list<PExpr*>*tmp = $1;
|
||||
{ std::list<PExpr*>*tmp = $1;
|
||||
tmp->push_back(0);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -5954,7 +5956,7 @@ dimensions
|
|||
: variable_dimension
|
||||
{ $$ = $1; }
|
||||
| dimensions variable_dimension
|
||||
{ list<pform_range_t> *tmp = $1;
|
||||
{ std::list<pform_range_t> *tmp = $1;
|
||||
if ($2) {
|
||||
tmp->splice(tmp->end(), *$2);
|
||||
delete $2;
|
||||
|
|
@ -6008,13 +6010,13 @@ register_variable
|
|||
|
||||
register_variable_list
|
||||
: register_variable
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
}
|
||||
| register_variable_list ',' register_variable
|
||||
{ list<perm_string>*tmp = $1;
|
||||
{ std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
@ -6033,13 +6035,13 @@ net_variable
|
|||
|
||||
net_variable_list
|
||||
: net_variable
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
}
|
||||
| net_variable_list ',' net_variable
|
||||
{ list<perm_string>*tmp = $1;
|
||||
{ std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
@ -6185,7 +6187,7 @@ specify_edge_path_decl
|
|||
: specify_edge_path '=' '(' delay_value_list ')'
|
||||
{ $$ = pform_assign_path_delay($1, $4); }
|
||||
| specify_edge_path '=' delay_value_simple
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($3);
|
||||
$$ = pform_assign_path_delay($1, tmp);
|
||||
}
|
||||
|
|
@ -6222,7 +6224,7 @@ specify_simple_path_decl
|
|||
: specify_simple_path '=' '(' delay_value_list ')'
|
||||
{ $$ = pform_assign_path_delay($1, $4); }
|
||||
| specify_simple_path '=' delay_value_simple
|
||||
{ list<PExpr*>*tmp = new list<PExpr*>;
|
||||
{ std::list<PExpr*>*tmp = new std::list<PExpr*>;
|
||||
tmp->push_back($3);
|
||||
$$ = pform_assign_path_delay($1, tmp);
|
||||
}
|
||||
|
|
@ -6248,7 +6250,7 @@ specify_simple_path
|
|||
|
||||
specify_path_identifiers
|
||||
: IDENTIFIER
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
|
|
@ -6259,7 +6261,7 @@ specify_path_identifiers
|
|||
"in path declarations. The declaration "
|
||||
"will be applied to the whole vector.");
|
||||
}
|
||||
list<perm_string>*tmp = new list<perm_string>;
|
||||
std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
|
|
@ -6270,13 +6272,13 @@ specify_path_identifiers
|
|||
"in path declarations. The declaration "
|
||||
"will be applied to the whole vector.");
|
||||
}
|
||||
list<perm_string>*tmp = new list<perm_string>;
|
||||
std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
$$ = tmp;
|
||||
delete[]$1;
|
||||
}
|
||||
| specify_path_identifiers ',' IDENTIFIER
|
||||
{ list<perm_string>*tmp = $1;
|
||||
{ std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
@ -6287,7 +6289,7 @@ specify_path_identifiers
|
|||
"in path declarations. The declaration "
|
||||
"will be applied to the whole vector.");
|
||||
}
|
||||
list<perm_string>*tmp = $1;
|
||||
std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
@ -6298,7 +6300,7 @@ specify_path_identifiers
|
|||
"in path declarations. The declaration "
|
||||
"will be applied to the whole vector.");
|
||||
}
|
||||
list<perm_string>*tmp = $1;
|
||||
std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
@ -6839,7 +6841,7 @@ statement_item /* This is roughly statement_item in the LRM */
|
|||
$$ = tmp;
|
||||
}
|
||||
| SYSTEM_IDENTIFIER ';'
|
||||
{ list<PExpr*>pt;
|
||||
{ std::list<PExpr*>pt;
|
||||
PCallTask*tmp = new PCallTask(lex_strings.make($1), pt);
|
||||
FILE_NAME(tmp,@1);
|
||||
delete[]$1;
|
||||
|
|
@ -6885,7 +6887,7 @@ statement_item /* This is roughly statement_item in the LRM */
|
|||
}
|
||||
|
||||
| hierarchy_identifier ';'
|
||||
{ list<PExpr*>pt;
|
||||
{ std::list<PExpr*>pt;
|
||||
PCallTask*tmp = pform_make_call_task(@1, *$1, pt);
|
||||
delete $1;
|
||||
$$ = tmp;
|
||||
|
|
@ -6988,12 +6990,12 @@ statement_or_null_list_opt
|
|||
|
||||
statement_or_null_list
|
||||
: statement_or_null_list statement_or_null
|
||||
{ vector<Statement*>*tmp = $1;
|
||||
{ std::vector<Statement*>*tmp = $1;
|
||||
if ($2) tmp->push_back($2);
|
||||
$$ = tmp;
|
||||
}
|
||||
| statement_or_null
|
||||
{ vector<Statement*>*tmp = new vector<Statement*>(0);
|
||||
{ std::vector<Statement*>*tmp = new std::vector<Statement*>(0);
|
||||
if ($1) tmp->push_back($1);
|
||||
$$ = tmp;
|
||||
}
|
||||
|
|
@ -7007,13 +7009,13 @@ analog_statement
|
|||
/* Task items are, other than the statement, task port items and
|
||||
other block items. */
|
||||
task_item
|
||||
: block_item_decl { $$ = new vector<pform_tf_port_t>(0); }
|
||||
: block_item_decl { $$ = new std::vector<pform_tf_port_t>(0); }
|
||||
| tf_port_declaration { $$ = $1; }
|
||||
;
|
||||
|
||||
task_item_list
|
||||
: task_item_list task_item
|
||||
{ vector<pform_tf_port_t>*tmp = $1;
|
||||
{ std::vector<pform_tf_port_t>*tmp = $1;
|
||||
size_t s1 = tmp->size();
|
||||
tmp->resize(s1 + $2->size());
|
||||
for (size_t idx = 0 ; idx < $2->size() ; idx += 1)
|
||||
|
|
@ -7079,13 +7081,13 @@ udp_comb_entry
|
|||
|
||||
udp_comb_entry_list
|
||||
: udp_comb_entry
|
||||
{ list<string>*tmp = new list<string>;
|
||||
{ std::list<string>*tmp = new std::list<string>;
|
||||
tmp->push_back($1);
|
||||
delete[]$1;
|
||||
$$ = tmp;
|
||||
}
|
||||
| udp_comb_entry_list udp_comb_entry
|
||||
{ list<string>*tmp = $1;
|
||||
{ std::list<string>*tmp = $1;
|
||||
tmp->push_back($2);
|
||||
delete[]$2;
|
||||
$$ = tmp;
|
||||
|
|
@ -7094,13 +7096,13 @@ udp_comb_entry_list
|
|||
|
||||
udp_sequ_entry_list
|
||||
: udp_sequ_entry
|
||||
{ list<string>*tmp = new list<string>;
|
||||
{ std::list<string>*tmp = new std::list<string>;
|
||||
tmp->push_back($1);
|
||||
delete[]$1;
|
||||
$$ = tmp;
|
||||
}
|
||||
| udp_sequ_entry_list udp_sequ_entry
|
||||
{ list<string>*tmp = $1;
|
||||
{ std::list<string>*tmp = $1;
|
||||
tmp->push_back($2);
|
||||
delete[]$2;
|
||||
$$ = tmp;
|
||||
|
|
@ -7199,7 +7201,7 @@ udp_port_decl
|
|||
| K_output IDENTIFIER ';'
|
||||
{ perm_string pname = lex_strings.make($2);
|
||||
PWire*pp = new PWire(pname, NetNet::IMPLICIT, NetNet::POUTPUT, IVL_VT_LOGIC);
|
||||
vector<PWire*>*tmp = new vector<PWire*>(1);
|
||||
vector<PWire*>*tmp = new std::vector<PWire*>(1);
|
||||
(*tmp)[0] = pp;
|
||||
$$ = tmp;
|
||||
delete[]$2;
|
||||
|
|
@ -7207,7 +7209,7 @@ udp_port_decl
|
|||
| K_reg IDENTIFIER ';'
|
||||
{ perm_string pname = lex_strings.make($2);
|
||||
PWire*pp = new PWire(pname, NetNet::REG, NetNet::PIMPLICIT, IVL_VT_LOGIC);
|
||||
vector<PWire*>*tmp = new vector<PWire*>(1);
|
||||
vector<PWire*>*tmp = new std::vector<PWire*>(1);
|
||||
(*tmp)[0] = pp;
|
||||
$$ = tmp;
|
||||
delete[]$2;
|
||||
|
|
@ -7215,7 +7217,7 @@ udp_port_decl
|
|||
| K_reg K_output IDENTIFIER ';'
|
||||
{ perm_string pname = lex_strings.make($3);
|
||||
PWire*pp = new PWire(pname, NetNet::REG, NetNet::POUTPUT, IVL_VT_LOGIC);
|
||||
vector<PWire*>*tmp = new vector<PWire*>(1);
|
||||
vector<PWire*>*tmp = new std::vector<PWire*>(1);
|
||||
(*tmp)[0] = pp;
|
||||
$$ = tmp;
|
||||
delete[]$3;
|
||||
|
|
@ -7226,7 +7228,7 @@ udp_port_decls
|
|||
: udp_port_decl
|
||||
{ $$ = $1; }
|
||||
| udp_port_decls udp_port_decl
|
||||
{ vector<PWire*>*tmp = $1;
|
||||
{ std::vector<PWire*>*tmp = $1;
|
||||
size_t s1 = $1->size();
|
||||
tmp->resize(s1+$2->size());
|
||||
for (size_t idx = 0 ; idx < $2->size() ; idx += 1)
|
||||
|
|
@ -7238,13 +7240,13 @@ udp_port_decls
|
|||
|
||||
udp_port_list
|
||||
: IDENTIFIER
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($1));
|
||||
delete[]$1;
|
||||
$$ = tmp;
|
||||
}
|
||||
| udp_port_list ',' IDENTIFIER
|
||||
{ list<perm_string>*tmp = $1;
|
||||
{ std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($3));
|
||||
delete[]$3;
|
||||
$$ = tmp;
|
||||
|
|
@ -7260,13 +7262,13 @@ udp_initial_expr_opt
|
|||
|
||||
udp_input_declaration_list
|
||||
: K_input IDENTIFIER
|
||||
{ list<perm_string>*tmp = new list<perm_string>;
|
||||
{ std::list<perm_string>*tmp = new std::list<perm_string>;
|
||||
tmp->push_back(lex_strings.make($2));
|
||||
$$ = tmp;
|
||||
delete[]$2;
|
||||
}
|
||||
| udp_input_declaration_list ',' K_input IDENTIFIER
|
||||
{ list<perm_string>*tmp = $1;
|
||||
{ std::list<perm_string>*tmp = $1;
|
||||
tmp->push_back(lex_strings.make($4));
|
||||
$$ = tmp;
|
||||
delete[]$4;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ extern void pform_dump(std::ostream&out, const PTaskFunc*tf);
|
|||
*/
|
||||
extern int pform_parse(const char*path);
|
||||
|
||||
extern string vl_file;
|
||||
extern std::string vl_file;
|
||||
|
||||
extern void pform_set_timescale(int units, int prec, const char*file,
|
||||
unsigned lineno);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2021 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
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
# include <cstdio>
|
||||
# include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern const char*vl_file;
|
||||
unsigned error_count = 0;
|
||||
unsigned warn_count = 0;
|
||||
|
|
@ -75,4 +77,3 @@ int VLwrap()
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_parse_misc_H
|
||||
#define IVL_parse_misc_H
|
||||
/*
|
||||
* Copyright (c) 1998-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2021 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
|
||||
|
|
@ -64,7 +64,7 @@ extern void VLwarn(const YYLTYPE&loc, const char*msg);
|
|||
|
||||
extern void destroy_lexor();
|
||||
|
||||
extern ostream& operator << (ostream&, const YYLTYPE&loc);
|
||||
extern std::ostream& operator << (std::ostream&, const YYLTYPE&loc);
|
||||
|
||||
extern unsigned error_count, warn_count;
|
||||
extern unsigned long based_size;
|
||||
|
|
|
|||
2
pform.cc
2
pform.cc
|
|
@ -45,6 +45,8 @@
|
|||
# include "ivl_assert.h"
|
||||
# include "ivl_alloc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The "// synthesis translate_on/off" meta-comments cause this flag
|
||||
* to be turned off or on. The pform_make_behavior and similar
|
||||
|
|
|
|||
110
pform.h
110
pform.h
|
|
@ -89,8 +89,8 @@ extern bool pform_library_flag;
|
|||
|
||||
|
||||
struct parmvalue_t {
|
||||
list<PExpr*>*by_order;
|
||||
list<named_pexpr_t>*by_name;
|
||||
std::list<PExpr*>*by_order;
|
||||
std::list<named_pexpr_t>*by_name;
|
||||
};
|
||||
|
||||
struct str_pair_t { ivl_drive_t str0, str1; };
|
||||
|
|
@ -108,9 +108,9 @@ struct lgate {
|
|||
: parms(0), parms_by_name(0), file(NULL), lineno(0)
|
||||
{ }
|
||||
|
||||
string name;
|
||||
list<PExpr*>*parms;
|
||||
list<named_pexpr_t>*parms_by_name;
|
||||
std::string name;
|
||||
std::list<PExpr*>*parms;
|
||||
std::list<named_pexpr_t>*parms_by_name;
|
||||
|
||||
pform_range_t range;
|
||||
|
||||
|
|
@ -123,8 +123,8 @@ extern std::list<pform_range_t>* copy_range(std::list<pform_range_t>* orig);
|
|||
|
||||
/* Use this function to transform the parted form of the attribute
|
||||
list to the attribute map that is used later. */
|
||||
extern void pform_bind_attributes(map<perm_string,PExpr*>&attributes,
|
||||
list<named_pexpr_t>*attr,
|
||||
extern void pform_bind_attributes(std::map<perm_string,PExpr*>&attributes,
|
||||
std::list<named_pexpr_t>*attr,
|
||||
bool keep_attr =false);
|
||||
|
||||
/* The lexor calls this function to change the default nettype. */
|
||||
|
|
@ -168,8 +168,8 @@ extern PWire* pform_get_make_wire_in_scope(const struct vlltype&li,
|
|||
extern void pform_startmodule(const struct vlltype&loc, const char*name,
|
||||
bool program_block, bool is_interface,
|
||||
LexicalScope::lifetime_t lifetime,
|
||||
list<named_pexpr_t>*attr);
|
||||
extern void pform_module_set_ports(vector<Module::port_t*>*);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
extern void pform_module_set_ports(std::vector<Module::port_t*>*);
|
||||
extern void pform_set_scope_timescale(const struct vlltype&loc);
|
||||
|
||||
/* These functions are used when we have a complete port definition, either
|
||||
|
|
@ -180,14 +180,14 @@ extern void pform_module_define_port(const struct vlltype&li,
|
|||
NetNet::PortType,
|
||||
NetNet::Type type,
|
||||
data_type_t*vtype,
|
||||
list<named_pexpr_t>*attr,
|
||||
std::list<named_pexpr_t>*attr,
|
||||
bool keep_attr =false);
|
||||
extern void pform_module_define_port(const struct vlltype&li,
|
||||
list<pform_port_t>*ports,
|
||||
std::list<pform_port_t>*ports,
|
||||
NetNet::PortType,
|
||||
NetNet::Type type,
|
||||
data_type_t*vtype,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
|
||||
extern Module::port_t* pform_module_port_reference(perm_string name,
|
||||
const char*file,
|
||||
|
|
@ -209,16 +209,16 @@ extern void pform_set_constructor_return(PFunction*net);
|
|||
|
||||
extern void pform_end_class_declaration(const struct vlltype&loc);
|
||||
|
||||
extern void pform_make_udp(perm_string name, list<perm_string>*parms,
|
||||
std::vector<PWire*>*decl, list<string>*table,
|
||||
extern void pform_make_udp(perm_string name, std::list<perm_string>*parms,
|
||||
std::vector<PWire*>*decl, std::list<std::string>*table,
|
||||
Statement*init,
|
||||
const char*file, unsigned lineno);
|
||||
|
||||
extern void pform_make_udp(perm_string name,
|
||||
bool sync_flag, perm_string out_name,
|
||||
PExpr*sync_init,
|
||||
list<perm_string>*parms,
|
||||
list<string>*table,
|
||||
std::list<perm_string>*parms,
|
||||
std::list<std::string>*table,
|
||||
const char*file, unsigned lineno);
|
||||
/*
|
||||
* Package related functions.
|
||||
|
|
@ -289,7 +289,7 @@ extern verinum* pform_verinum_with_size(verinum*s, verinum*val,
|
|||
* This function takes the list of names as new genvars to declare in
|
||||
* the current module or generate scope.
|
||||
*/
|
||||
extern void pform_genvars(const struct vlltype&li, list<perm_string>*names);
|
||||
extern void pform_genvars(const struct vlltype&li, std::list<perm_string>*names);
|
||||
|
||||
/*
|
||||
* This flag is set by the parser to indicate the current generate block
|
||||
|
|
@ -309,7 +309,7 @@ extern void pform_start_generate_if(const struct vlltype&li, PExpr*test);
|
|||
extern void pform_start_generate_else(const struct vlltype&li);
|
||||
extern void pform_start_generate_case(const struct vlltype&lp, PExpr*test);
|
||||
extern void pform_start_generate_nblock(const struct vlltype&lp, char*name);
|
||||
extern void pform_generate_case_item(const struct vlltype&lp, list<PExpr*>*test);
|
||||
extern void pform_generate_case_item(const struct vlltype&lp, std::list<PExpr*>*test);
|
||||
extern void pform_generate_block_name(char*name);
|
||||
extern void pform_endgenerate(bool end_conditional);
|
||||
|
||||
|
|
@ -350,22 +350,22 @@ extern void pform_makewire(const struct vlltype&li, perm_string name,
|
|||
NetNet::Type type,
|
||||
NetNet::PortType pt,
|
||||
ivl_variable_type_t,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
|
||||
/* This form handles simple declarations */
|
||||
extern void pform_makewire(const struct vlltype&li,
|
||||
list<pform_range_t>*range,
|
||||
std::list<pform_range_t>*range,
|
||||
bool signed_flag,
|
||||
list<perm_string>*names,
|
||||
std::list<perm_string>*names,
|
||||
NetNet::Type type,
|
||||
NetNet::PortType,
|
||||
ivl_variable_type_t,
|
||||
list<named_pexpr_t>*attr,
|
||||
std::list<named_pexpr_t>*attr,
|
||||
PWSRType rt = SR_NET);
|
||||
|
||||
/* This form handles assignment declarations. */
|
||||
extern void pform_makewire(const struct vlltype&li,
|
||||
list<PExpr*>*delay,
|
||||
std::list<PExpr*>*delay,
|
||||
str_pair_t str,
|
||||
net_decl_assign_t*assign_list,
|
||||
NetNet::Type type,
|
||||
|
|
@ -382,8 +382,8 @@ extern void pform_makewire(const struct vlltype&li,
|
|||
extern void pform_makewire(const struct vlltype&li,
|
||||
struct_type_t*struct_type,
|
||||
NetNet::PortType,
|
||||
list<perm_string>*names,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<perm_string>*names,
|
||||
std::list<named_pexpr_t>*attr);
|
||||
|
||||
extern void pform_make_var_init(const struct vlltype&li,
|
||||
perm_string name, PExpr*expr);
|
||||
|
|
@ -393,15 +393,15 @@ extern void pform_make_var_init(const struct vlltype&li,
|
|||
the port type, i.e. input, output or inout, and, if specified, the
|
||||
range and signedness. If the wire does not exist, create it. */
|
||||
extern void pform_set_port_type(const struct vlltype&li,
|
||||
list<pform_port_t>*ports,
|
||||
std::list<pform_port_t>*ports,
|
||||
NetNet::PortType,
|
||||
data_type_t*dt,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
|
||||
extern void pform_set_reg_idx(perm_string name,
|
||||
std::list<pform_range_t>*indices);
|
||||
|
||||
extern void pform_set_data_type(const struct vlltype&li, data_type_t*, list<perm_string>*names, NetNet::Type net_type, list<named_pexpr_t>*attr);
|
||||
extern void pform_set_data_type(const struct vlltype&li, data_type_t*, std::list<perm_string>*names, NetNet::Type net_type, std::list<named_pexpr_t>*attr);
|
||||
|
||||
extern void pform_set_struct_type(const struct vlltype&li, struct_type_t*struct_type, std::list<perm_string>*names, NetNet::Type net_type, std::list<named_pexpr_t>*attr);
|
||||
|
||||
|
|
@ -416,7 +416,7 @@ extern void pform_set_class_type(const struct vlltype&li, class_type_t*class_typ
|
|||
passed in. */
|
||||
extern void pform_set_attrib(perm_string name, perm_string key,
|
||||
char*value);
|
||||
extern void pform_set_type_attrib(perm_string name, const string&key,
|
||||
extern void pform_set_type_attrib(perm_string name, const std::string&key,
|
||||
char*value);
|
||||
|
||||
extern LexicalScope::range_t* pform_parameter_value_range(bool exclude_flag,
|
||||
|
|
@ -427,24 +427,24 @@ extern void pform_set_parameter(const struct vlltype&loc,
|
|||
perm_string name,
|
||||
ivl_variable_type_t type,
|
||||
bool signed_flag,
|
||||
list<pform_range_t>*range,
|
||||
std::list<pform_range_t>*range,
|
||||
PExpr*expr, LexicalScope::range_t*value_range);
|
||||
extern void pform_set_localparam(const struct vlltype&loc,
|
||||
perm_string name,
|
||||
ivl_variable_type_t type,
|
||||
bool signed_flag,
|
||||
list<pform_range_t>*range,
|
||||
std::list<pform_range_t>*range,
|
||||
PExpr*expr);
|
||||
extern void pform_set_specparam(const struct vlltype&loc,
|
||||
perm_string name,
|
||||
list<pform_range_t>*range,
|
||||
std::list<pform_range_t>*range,
|
||||
PExpr*expr);
|
||||
extern void pform_set_defparam(const pform_name_t&name, PExpr*expr);
|
||||
|
||||
extern void pform_set_param_from_type(const struct vlltype&loc,
|
||||
const data_type_t *data_type,
|
||||
const char *name,
|
||||
list<pform_range_t> *¶m_range,
|
||||
std::list<pform_range_t> *¶m_range,
|
||||
bool ¶m_signed,
|
||||
ivl_variable_type_t ¶m_type);
|
||||
|
||||
|
|
@ -452,14 +452,14 @@ extern void pform_set_param_from_type(const struct vlltype&loc,
|
|||
* Functions related to specify blocks.
|
||||
*/
|
||||
extern PSpecPath*pform_make_specify_path(const struct vlltype&li,
|
||||
list<perm_string>*src, char pol,
|
||||
bool full_flag, list<perm_string>*dst);
|
||||
std::list<perm_string>*src, char pol,
|
||||
bool full_flag, std::list<perm_string>*dst);
|
||||
extern PSpecPath*pform_make_specify_edge_path(const struct vlltype&li,
|
||||
int edge_flag, /*posedge==true */
|
||||
list<perm_string>*src, char pol,
|
||||
bool full_flag, list<perm_string>*dst,
|
||||
std::list<perm_string>*src, char pol,
|
||||
bool full_flag, std::list<perm_string>*dst,
|
||||
PExpr*data_source_expression);
|
||||
extern PSpecPath*pform_assign_path_delay(PSpecPath*obj, list<PExpr*>*delays);
|
||||
extern PSpecPath*pform_assign_path_delay(PSpecPath*obj, std::list<PExpr*>*delays);
|
||||
|
||||
extern void pform_module_specify_path(PSpecPath*obj);
|
||||
|
||||
|
|
@ -468,17 +468,17 @@ extern void pform_module_specify_path(PSpecPath*obj);
|
|||
* or initial items.
|
||||
*/
|
||||
extern PProcess* pform_make_behavior(ivl_process_type_t, Statement*,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
extern void pform_mc_translate_on(bool flag);
|
||||
|
||||
extern std::vector<PWire*>* pform_make_udp_input_ports(list<perm_string>*);
|
||||
extern std::vector<PWire*>* pform_make_udp_input_ports(std::list<perm_string>*);
|
||||
|
||||
extern void pform_make_events(list<perm_string>*names,
|
||||
extern void pform_make_events(std::list<perm_string>*names,
|
||||
const char*file, unsigned lineno);
|
||||
/*
|
||||
* Make real datum objects.
|
||||
*/
|
||||
extern void pform_make_reals(list<perm_string>*names,
|
||||
extern void pform_make_reals(std::list<perm_string>*names,
|
||||
const char*file, unsigned lineno);
|
||||
|
||||
/*
|
||||
|
|
@ -488,19 +488,19 @@ extern void pform_make_reals(list<perm_string>*names,
|
|||
extern void pform_makegates(const struct vlltype&loc,
|
||||
PGBuiltin::Type type,
|
||||
struct str_pair_t str,
|
||||
list<PExpr*>*delay,
|
||||
std::list<PExpr*>*delay,
|
||||
svector<lgate>*gates,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
|
||||
extern void pform_make_modgates(const struct vlltype&loc,
|
||||
perm_string type,
|
||||
struct parmvalue_t*overrides,
|
||||
svector<lgate>*gates,
|
||||
list<named_pexpr_t>*attr);
|
||||
std::list<named_pexpr_t>*attr);
|
||||
|
||||
/* Make a continuous assignment node, with optional bit- or part- select. */
|
||||
extern void pform_make_pgassign_list(list<PExpr*>*alist,
|
||||
list<PExpr*>*del,
|
||||
extern void pform_make_pgassign_list(std::list<PExpr*>*alist,
|
||||
std::list<PExpr*>*del,
|
||||
struct str_pair_t str,
|
||||
const char* fn, unsigned lineno);
|
||||
|
||||
|
|
@ -510,14 +510,14 @@ extern std::vector<pform_tf_port_t>*pform_make_task_ports(const struct vlltype&l
|
|||
NetNet::PortType pt,
|
||||
ivl_variable_type_t vtype,
|
||||
bool signed_flag,
|
||||
list<pform_range_t>*range,
|
||||
list<perm_string>*names,
|
||||
std::list<pform_range_t>*range,
|
||||
std::list<perm_string>*names,
|
||||
bool isint = false);
|
||||
|
||||
extern std::vector<pform_tf_port_t>*pform_make_task_ports(const struct vlltype&loc,
|
||||
NetNet::PortType pt,
|
||||
data_type_t*vtype,
|
||||
list<perm_string>*names);
|
||||
std::list<perm_string>*names);
|
||||
|
||||
/*
|
||||
* The parser uses this function to convert a unary
|
||||
|
|
@ -540,7 +540,7 @@ extern PExpr* pform_genvar_inc_dec(const struct vlltype&loc, const char*name,
|
|||
* parses the source file and places all the modules it finds into the
|
||||
* mod list. The dump function dumps a module to the output stream.
|
||||
*/
|
||||
extern void pform_dump(ostream&out, Module*mod);
|
||||
extern void pform_dump(std::ostream&out, Module*mod);
|
||||
|
||||
/* ** pform_discipline.cc
|
||||
* Functions for handling the parse of natures and disciplines. These
|
||||
|
|
@ -560,10 +560,10 @@ extern void pform_discipline_potential(const struct vlltype&loc, const char*name
|
|||
extern void pform_discipline_flow(const struct vlltype&loc, const char*name);
|
||||
|
||||
extern void pform_attach_discipline(const struct vlltype&loc,
|
||||
ivl_discipline_t discipline, list<perm_string>*names);
|
||||
ivl_discipline_t discipline, std::list<perm_string>*names);
|
||||
|
||||
extern void pform_dump(ostream&out, const ivl_nature_s*);
|
||||
extern void pform_dump(ostream&out, const ivl_discipline_s*);
|
||||
extern void pform_dump(std::ostream&out, const ivl_nature_s*);
|
||||
extern void pform_dump(std::ostream&out, const ivl_discipline_s*);
|
||||
|
||||
/* ** pform_analog.cc
|
||||
*/
|
||||
|
|
@ -584,7 +584,7 @@ extern PExpr* pform_make_branch_probe_expression(const struct vlltype&loc,
|
|||
* is the hierarchical name of a valid parameter name and value
|
||||
* is the value user wants to assign to. The value should be constant.
|
||||
*/
|
||||
extern void parm_to_defparam_list(const string¶m);
|
||||
extern void parm_to_defparam_list(const std::string¶m);
|
||||
|
||||
/*
|
||||
* Tasks to set the timeunit or timeprecision for SystemVerilog.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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
|
||||
|
|
@ -23,6 +23,8 @@
|
|||
# include "parse_misc.h"
|
||||
# include "AStatement.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
AContrib* pform_contribution_statement(const struct vlltype&loc,
|
||||
PExpr*lval, PExpr*rval)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2019 Picture Elements, Inc.
|
||||
* Copyright (c) 2012-2021 Picture Elements, Inc.
|
||||
* Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -22,6 +22,8 @@
|
|||
# include "parse_misc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static void pform_set_class_type(const struct vlltype&li, class_type_t*, perm_string name, NetNet::Type net_type, list<named_pexpr_t>*attr)
|
||||
{
|
||||
PWire*net = pform_get_make_wire_in_scope(li, name, net_type, NetNet::NOT_A_PORT, IVL_VT_CLASS);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2021 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
|
||||
|
|
@ -23,6 +23,8 @@
|
|||
# include "parse_misc.h"
|
||||
# include "discipline.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
map<perm_string,ivl_nature_t> natures;
|
||||
map<perm_string,ivl_discipline_t> disciplines;
|
||||
map<perm_string,ivl_nature_t> access_function_nature;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
# include <iomanip>
|
||||
# include <typeinfo>
|
||||
|
||||
using namespace std;
|
||||
|
||||
ostream& operator << (ostream&out, const PExpr&obj)
|
||||
{
|
||||
obj.dump(out);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2016 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2012-2021 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
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
# include "PClass.h"
|
||||
# include "parse_misc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* The functions here help the parser put together class type declarations.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2012-2021 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
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
# include "parse_misc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static void pform_set_string_type(const struct vlltype&li, const string_type_t*, perm_string name, NetNet::Type net_type, list<named_pexpr_t>*attr)
|
||||
{
|
||||
PWire*net = pform_get_make_wire_in_scope(li, name, net_type, NetNet::NOT_A_PORT, IVL_VT_STRING);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2011-2021 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
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
# include "parse_misc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
ivl_variable_type_t struct_type_t::figure_packed_base_type(void) const
|
||||
{
|
||||
if (! packed_flag)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_pform_types_H
|
||||
#define IVL_pform_types_H
|
||||
/*
|
||||
* Copyright (c) 2007-2019 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2007-2021 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
|
||||
|
|
@ -82,12 +82,12 @@ typedef std::pair<PExpr*,PExpr*> pform_range_t;
|
|||
* declarations.
|
||||
*/
|
||||
struct pform_port_t {
|
||||
pform_port_t(perm_string n, list<pform_range_t>*ud, PExpr*e)
|
||||
pform_port_t(perm_string n, std::list<pform_range_t>*ud, PExpr*e)
|
||||
: name(n), udims(ud), expr(e) { }
|
||||
~pform_port_t() { }
|
||||
|
||||
perm_string name;
|
||||
list<pform_range_t>*udims;
|
||||
std::list<pform_range_t>*udims;
|
||||
PExpr*expr;
|
||||
};
|
||||
|
||||
|
|
@ -180,14 +180,14 @@ struct enum_type_t : public data_type_t {
|
|||
ivl_variable_type_t base_type;
|
||||
bool signed_flag;
|
||||
bool integer_flag; // True if "integer" was used
|
||||
std::unique_ptr< list<pform_range_t> > range;
|
||||
std::unique_ptr< list<named_pexpr_t> > names;
|
||||
std::unique_ptr< std::list<pform_range_t> > range;
|
||||
std::unique_ptr< std::list<named_pexpr_t> > names;
|
||||
LineInfo li;
|
||||
};
|
||||
|
||||
struct struct_member_t : public LineInfo {
|
||||
std::unique_ptr<data_type_t> type;
|
||||
std::unique_ptr< list<decl_assignment_t*> > names;
|
||||
std::unique_ptr< std::list<decl_assignment_t*> > names;
|
||||
void pform_dump(std::ostream&out, unsigned indent) const;
|
||||
};
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ struct struct_type_t : public data_type_t {
|
|||
|
||||
bool packed_flag;
|
||||
bool union_flag;
|
||||
std::unique_ptr< list<struct_member_t*> > members;
|
||||
std::unique_ptr< std::list<struct_member_t*> > members;
|
||||
};
|
||||
|
||||
struct atom2_type_t : public data_type_t {
|
||||
|
|
@ -244,7 +244,7 @@ struct vector_type_t : public data_type_t {
|
|||
bool reg_flag; // True if "reg" was used
|
||||
bool integer_flag; // True if "integer" was used
|
||||
bool implicit_flag; // True if this type is implicitly logic/reg
|
||||
std::unique_ptr< list<pform_range_t> > pdims;
|
||||
std::unique_ptr< std::list<pform_range_t> > pdims;
|
||||
};
|
||||
|
||||
struct array_base_t : public data_type_t {
|
||||
|
|
@ -253,7 +253,7 @@ struct array_base_t : public data_type_t {
|
|||
: base_type(btype), dims(pd) { }
|
||||
|
||||
data_type_t*base_type;
|
||||
std::unique_ptr< list<pform_range_t> > dims;
|
||||
std::unique_ptr< std::list<pform_range_t> > dims;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
# include "netmisc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* Search for the hierarchical name.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
%{
|
||||
/*
|
||||
* Copyright (c) 2000-2017 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -36,6 +36,8 @@
|
|||
# include "functor.h"
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct syn_token_t {
|
||||
int token;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
# include <cstring>
|
||||
# include "ivl_alloc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
static StringHeap api_strings;
|
||||
|
||||
/* THE FOLLOWING ARE FUNCTIONS THAT ARE CALLED FROM THE TARGET. */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2020 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -30,6 +30,8 @@
|
|||
# include "ivl_alloc.h"
|
||||
# include "ivl_assert.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* This is a little convenience function for converting a NetExpr
|
||||
* expression type to the expression type used by ivl_expr_t objects.
|
||||
|
|
|
|||
2
t-dll.cc
2
t-dll.cc
|
|
@ -34,6 +34,8 @@
|
|||
# include "ivl_assert.h"
|
||||
# include "ivl_alloc.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct dll_target dll_target_obj;
|
||||
|
||||
#if defined(__WIN32__)
|
||||
|
|
|
|||
4
t-dll.h
4
t-dll.h
|
|
@ -575,7 +575,7 @@ struct ivl_udp_s {
|
|||
ccharp_t*table; // zero terminated array of pointers
|
||||
perm_string file;
|
||||
unsigned lineno;
|
||||
string*ports;
|
||||
std::string*ports;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -616,7 +616,7 @@ struct ivl_nexus_ptr_s {
|
|||
*/
|
||||
struct ivl_nexus_s {
|
||||
ivl_nexus_s() : ptrs_(1), nexus_(0), name_(0), private_data(0) { }
|
||||
vector<ivl_nexus_ptr_s>ptrs_;
|
||||
std::vector<ivl_nexus_ptr_s>ptrs_;
|
||||
const Nexus*nexus_;
|
||||
const char*name_;
|
||||
void*private_data;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
# include "target.h"
|
||||
# include <typeinfo>
|
||||
|
||||
using namespace std;
|
||||
|
||||
target_t::~target_t()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
4
target.h
4
target.h
|
|
@ -185,10 +185,10 @@ struct expr_scan_t {
|
|||
/* This function takes a fully qualified Verilog name (which may have,
|
||||
for example, dots in it) and produces a mangled version that can be
|
||||
used by most any language. */
|
||||
extern string mangle(const string&str);
|
||||
extern std::string mangle(const std::string&str);
|
||||
|
||||
/* This function takes a string and produces an escaped version that can be
|
||||
used inside a string constant for a C++ compiler. */
|
||||
extern string stresc(const string&str);
|
||||
extern std::string stresc(const std::string&str);
|
||||
|
||||
#endif /* IVL_target_H */
|
||||
|
|
|
|||
4
util.h
4
util.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_util_H
|
||||
#define IVL_util_H
|
||||
/*
|
||||
* Copyright (c) 2000-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2021 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
|
||||
|
|
@ -43,7 +43,7 @@ struct attrib_list_t {
|
|||
verinum val;
|
||||
};
|
||||
|
||||
extern attrib_list_t* evaluate_attributes(const map<perm_string,PExpr*>&att,
|
||||
extern attrib_list_t* evaluate_attributes(const std::map<perm_string,PExpr*>&att,
|
||||
unsigned&natt,
|
||||
Design*des, NetScope*scope);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
# include <cstdio> // Needed to get snprintf for as_string().
|
||||
# include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#if !defined(HAVE_LROUND)
|
||||
/*
|
||||
* If the system doesn't provide the lround function, then we provide
|
||||
|
|
|
|||
14
verinum.h
14
verinum.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_verinum_H
|
||||
#define IVL_verinum_H
|
||||
/*
|
||||
* Copyright (c) 1998-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2021 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
|
||||
|
|
@ -25,11 +25,9 @@
|
|||
#ifdef HAVE_IOSFWD
|
||||
# include <iosfwd>
|
||||
#else
|
||||
class ostream;
|
||||
# include <iostream>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
* Numbers in Verilog are multibit strings, where each bit has 4
|
||||
* possible values: 0, 1, x or z. The verinum number is store in
|
||||
|
|
@ -42,7 +40,7 @@ class verinum {
|
|||
enum V { V0 = 0, V1, Vx, Vz };
|
||||
|
||||
verinum();
|
||||
explicit verinum(const string&str);
|
||||
explicit verinum(const std::string&str);
|
||||
verinum(const V*v, unsigned nbits, bool has_len =true);
|
||||
explicit verinum(V, unsigned nbits =1, bool has_len =true);
|
||||
verinum(uint64_t val, unsigned bits);
|
||||
|
|
@ -110,7 +108,7 @@ class verinum {
|
|||
|
||||
signed long as_long() const;
|
||||
double as_double() const;
|
||||
string as_string() const;
|
||||
std::string as_string() const;
|
||||
private:
|
||||
void signed_trim();
|
||||
|
||||
|
|
@ -154,8 +152,8 @@ extern verinum cast_to_width(const verinum&, unsigned width);
|
|||
needed to accurately represent the contained value, signed or not. */
|
||||
extern verinum trim_vnum(const verinum&);
|
||||
|
||||
extern ostream& operator<< (ostream&, const verinum&);
|
||||
extern ostream& operator<< (ostream&, verinum::V);
|
||||
extern std::ostream& operator<< (std::ostream&, const verinum&);
|
||||
extern std::ostream& operator<< (std::ostream&, verinum::V);
|
||||
|
||||
inline verinum::V bit4_z2x(verinum::V bit)
|
||||
{ return bit<2? bit : verinum::Vx; /* Relies on V0 and V1 being <2 */}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -29,6 +29,8 @@
|
|||
# include <cassert>
|
||||
# include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
verireal::verireal()
|
||||
{
|
||||
value_ = 0.0;
|
||||
|
|
|
|||
10
verireal.h
10
verireal.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_verireal_H
|
||||
#define IVL_verireal_H
|
||||
/*
|
||||
* Copyright (c) 1999-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2021 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
|
||||
|
|
@ -23,11 +23,9 @@
|
|||
#ifdef HAVE_IOSFWD
|
||||
# include <iosfwd>
|
||||
#else
|
||||
class ostream;
|
||||
# include <iostream>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
class verinum;
|
||||
|
||||
/*
|
||||
|
|
@ -39,7 +37,7 @@ class verinum;
|
|||
|
||||
class verireal {
|
||||
|
||||
friend ostream& operator<< (ostream&, const verireal&);
|
||||
friend std::ostream& operator<< (std::ostream&, const verireal&);
|
||||
friend verireal operator+ (const verireal&, const verireal&);
|
||||
friend verireal operator- (const verireal&, const verireal&);
|
||||
friend verireal operator* (const verireal&, const verireal&);
|
||||
|
|
@ -73,7 +71,7 @@ class verireal {
|
|||
double value_;
|
||||
};
|
||||
|
||||
extern ostream& operator<< (ostream&, const verireal&);
|
||||
extern std::ostream& operator<< (std::ostream&, const verireal&);
|
||||
extern verireal operator* (const verireal&, const verireal&);
|
||||
extern verireal operator/ (const verireal&, const verireal&);
|
||||
extern verireal operator/ (const verireal&, const verinum&);
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ class Architecture : public Scope, public LineInfo {
|
|||
virtual ~Statement() =0;
|
||||
|
||||
virtual int elaborate(Entity*ent, Architecture*arc);
|
||||
virtual int emit(ostream&out, Entity*ent, Architecture*arc);
|
||||
virtual void dump(ostream&out, int indent = 0) const;
|
||||
virtual int emit(std::ostream&out, Entity*ent, Architecture*arc);
|
||||
virtual void dump(std::ostream&out, int indent = 0) const;
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
@ -100,10 +100,10 @@ class Architecture : public Scope, public LineInfo {
|
|||
// of the specified entity. This method is used by the
|
||||
// elaborate code to display generated code to the specified
|
||||
// output.
|
||||
int emit(ostream&out, Entity*entity);
|
||||
int emit(std::ostream&out, Entity*entity);
|
||||
|
||||
// The dump method writes a debug display to the given output.
|
||||
void dump(ostream&out, perm_string of_entity, int indent = 0) const;
|
||||
void dump(std::ostream&out, perm_string of_entity, int indent = 0) const;
|
||||
|
||||
private:
|
||||
perm_string name_;
|
||||
|
|
@ -143,8 +143,8 @@ class GenerateStatement : public Architecture::Statement {
|
|||
|
||||
protected:
|
||||
int elaborate_statements(Entity*ent, Architecture*arc);
|
||||
int emit_statements(ostream&out, Entity*ent, Architecture*arc);
|
||||
void dump_statements(ostream&out, int indent) const;
|
||||
int emit_statements(std::ostream&out, Entity*ent, Architecture*arc);
|
||||
void dump_statements(std::ostream&out, int indent) const;
|
||||
|
||||
private:
|
||||
perm_string name_;
|
||||
|
|
@ -159,8 +159,8 @@ class ForGenerate : public GenerateStatement {
|
|||
~ForGenerate();
|
||||
|
||||
int elaborate(Entity*ent, Architecture*arc);
|
||||
int emit(ostream&out, Entity*entity, Architecture*arc);
|
||||
void dump(ostream&out, int ident =0) const;
|
||||
int emit(std::ostream&out, Entity*entity, Architecture*arc);
|
||||
void dump(std::ostream&out, int ident =0) const;
|
||||
|
||||
private:
|
||||
perm_string genvar_;
|
||||
|
|
@ -176,7 +176,7 @@ class IfGenerate : public GenerateStatement {
|
|||
~IfGenerate();
|
||||
|
||||
int elaborate(Entity*ent, Architecture*arc);
|
||||
int emit(ostream&out, Entity*entity, Architecture*arc);
|
||||
int emit(std::ostream&out, Entity*entity, Architecture*arc);
|
||||
|
||||
private:
|
||||
Expression*cond_;
|
||||
|
|
@ -194,8 +194,8 @@ class SignalAssignment : public Architecture::Statement {
|
|||
~SignalAssignment();
|
||||
|
||||
virtual int elaborate(Entity*ent, Architecture*arc);
|
||||
virtual int emit(ostream&out, Entity*entity, Architecture*arc);
|
||||
virtual void dump(ostream&out, int ident =0) const;
|
||||
virtual int emit(std::ostream&out, Entity*entity, Architecture*arc);
|
||||
virtual void dump(std::ostream&out, int ident =0) const;
|
||||
|
||||
private:
|
||||
ExpName*lval_;
|
||||
|
|
@ -209,8 +209,8 @@ class CondSignalAssignment : public Architecture::Statement {
|
|||
~CondSignalAssignment();
|
||||
|
||||
int elaborate(Entity*ent, Architecture*arc);
|
||||
int emit(ostream&out, Entity*entity, Architecture*arc);
|
||||
void dump(ostream&out, int ident =0) const;
|
||||
int emit(std::ostream&out, Entity*entity, Architecture*arc);
|
||||
void dump(std::ostream&out, int ident =0) const;
|
||||
|
||||
private:
|
||||
ExpName*lval_;
|
||||
|
|
@ -230,8 +230,8 @@ class ComponentInstantiation : public Architecture::Statement {
|
|||
~ComponentInstantiation();
|
||||
|
||||
virtual int elaborate(Entity*ent, Architecture*arc);
|
||||
virtual int emit(ostream&out, Entity*entity, Architecture*arc);
|
||||
virtual void dump(ostream&out, int indent =0) const;
|
||||
virtual int emit(std::ostream&out, Entity*entity, Architecture*arc);
|
||||
virtual void dump(std::ostream&out, int indent =0) const;
|
||||
|
||||
// Returns the expression that initializes a generic (or NULL if not found).
|
||||
Expression*find_generic_map(perm_string by_name) const;
|
||||
|
|
@ -256,13 +256,13 @@ class StatementList : public Architecture::Statement {
|
|||
return elaborate(ent, static_cast<ScopeBase*>(arc));
|
||||
}
|
||||
|
||||
int emit(ostream&out, Entity*ent, Architecture*arc) {
|
||||
int emit(std::ostream&out, Entity*ent, Architecture*arc) {
|
||||
return emit(out, ent, static_cast<ScopeBase*>(arc));
|
||||
}
|
||||
|
||||
virtual int elaborate(Entity*ent, ScopeBase*scope);
|
||||
virtual int emit(ostream&out, Entity*entity, ScopeBase*scope);
|
||||
virtual void dump(ostream&out, int indent =0) const;
|
||||
virtual int emit(std::ostream&out, Entity*entity, ScopeBase*scope);
|
||||
virtual void dump(std::ostream&out, int indent =0) const;
|
||||
|
||||
std::list<SequentialStmt*>& stmt_list() { return statements_; }
|
||||
|
||||
|
|
@ -277,8 +277,8 @@ class InitialStatement : public StatementList {
|
|||
InitialStatement(std::list<SequentialStmt*>*statement_list)
|
||||
: StatementList(statement_list) {}
|
||||
|
||||
int emit(ostream&out, Entity*entity, ScopeBase*scope);
|
||||
void dump(ostream&out, int indent =0) const;
|
||||
int emit(std::ostream&out, Entity*entity, ScopeBase*scope);
|
||||
void dump(std::ostream&out, int indent =0) const;
|
||||
};
|
||||
|
||||
// There is no direct VHDL counterpart to SV 'final' statement,
|
||||
|
|
@ -288,8 +288,8 @@ class FinalStatement : public StatementList {
|
|||
FinalStatement(std::list<SequentialStmt*>*statement_list)
|
||||
: StatementList(statement_list) {}
|
||||
|
||||
int emit(ostream&out, Entity*entity, ScopeBase*scope);
|
||||
void dump(ostream&out, int indent =0) const;
|
||||
int emit(std::ostream&out, Entity*entity, ScopeBase*scope);
|
||||
void dump(std::ostream&out, int indent =0) const;
|
||||
};
|
||||
|
||||
class ProcessStatement : public StatementList, public Scope {
|
||||
|
|
@ -302,8 +302,8 @@ class ProcessStatement : public StatementList, public Scope {
|
|||
~ProcessStatement();
|
||||
|
||||
int elaborate(Entity*ent, Architecture*arc);
|
||||
int emit(ostream&out, Entity*entity, Architecture*arc);
|
||||
void dump(ostream&out, int indent =0) const;
|
||||
int emit(std::ostream&out, Entity*entity, Architecture*arc);
|
||||
void dump(std::ostream&out, int indent =0) const;
|
||||
|
||||
private:
|
||||
perm_string iname_;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
# include <typeinfo>
|
||||
# include <cassert>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int Architecture::elaborate(Entity*entity)
|
||||
{
|
||||
int errors = 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2013 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2011-2021 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
|
||||
|
|
@ -28,6 +28,8 @@
|
|||
# include <typeinfo>
|
||||
# include <ivl_assert.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int Scope::emit_signals(ostream&out, Entity*entity, ScopeBase*scope)
|
||||
{
|
||||
int errors = 0;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
# include <iomanip>
|
||||
# include <typeinfo>
|
||||
|
||||
using namespace std;
|
||||
|
||||
static ostream& operator << (ostream&out, port_mode_t that)
|
||||
{
|
||||
switch (that) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IVL_entity_H
|
||||
#define IVL_entity_H
|
||||
/*
|
||||
* Copyright (c) 2011-2014 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2011-2021 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
|
||||
|
|
@ -127,15 +127,15 @@ class Entity : public ComponentBase {
|
|||
// declaration to allow for that case.
|
||||
void set_declaration_l_value(perm_string by_name, bool flag);
|
||||
|
||||
int emit(ostream&out);
|
||||
int emit(std::ostream&out);
|
||||
|
||||
void dump(ostream&out, int indent = 0) const;
|
||||
void dump(std::ostream&out, int indent = 0) const;
|
||||
|
||||
private:
|
||||
std::map<perm_string,Architecture*>arch_;
|
||||
Architecture*bind_arch_;
|
||||
|
||||
map<perm_string,VType::decl_t> declarations_;
|
||||
std::map<perm_string,VType::decl_t> declarations_;
|
||||
|
||||
int elaborate_generic_exprs_(void);
|
||||
int elaborate_ports_(void);
|
||||
|
|
@ -159,6 +159,6 @@ extern int emit_entities(void);
|
|||
* Use this function to dump a description of the design entities to a
|
||||
* file. This is for debug, not for any useful purpose.
|
||||
*/
|
||||
extern void dump_design_entities(ostream&file);
|
||||
extern void dump_design_entities(std::ostream&file);
|
||||
|
||||
#endif /* IVL_entity_H */
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue