Change iterators to use prefix ++ since it is more efficient.
This patch changes all the iterator code to use a prefix ++ instead of postfix since it is more efficient (no need for a temporary). It is likely that the compiler could optimize this away, but lets make it efficient from the start.
This commit is contained in:
parent
77feb50d7b
commit
225ca1e205
6
HName.h
6
HName.h
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __HName_H
|
||||
#define __HName_H
|
||||
/*
|
||||
* Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2010 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
|
||||
|
|
@ -94,10 +94,10 @@ inline ostream& operator<< (ostream&out, const list<hname_t>&ll)
|
|||
{
|
||||
list<hname_t>::const_iterator cur = ll.begin();
|
||||
out << *cur;
|
||||
cur ++;
|
||||
++ cur;
|
||||
while (cur != ll.end()) {
|
||||
out << "." << *cur;
|
||||
cur ++;
|
||||
++ cur;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ cppcheck: $(O:.o=.cc) $(srcdir)/dosify.c $(srcdir)/version.c
|
|||
cppcheck-all:
|
||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) cppcheck && ) true
|
||||
$(foreach dir,$(NOTUSED),$(MAKE) -C $(dir) cppcheck && ) true
|
||||
cppcheck
|
||||
$(MAKE) cppcheck
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in config.status
|
||||
./config.status --file=$@
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ unsigned Module::find_port(const char*name) const
|
|||
PGate* Module::get_gate(perm_string name)
|
||||
{
|
||||
for (list<PGate*>::iterator cur = gates_.begin()
|
||||
; cur != gates_.end()
|
||||
; cur ++ ) {
|
||||
; cur != gates_.end() ; ++ cur ) {
|
||||
|
||||
if ((*cur)->get_name() == name)
|
||||
return *cur;
|
||||
|
|
|
|||
|
|
@ -1112,7 +1112,7 @@ void NetScope::dump(ostream&o) const
|
|||
{
|
||||
map<perm_string,param_expr_t>::const_iterator pp;
|
||||
for (pp = parameters.begin()
|
||||
; pp != parameters.end() ; pp ++) {
|
||||
; pp != parameters.end() ; ++ pp ) {
|
||||
o << " parameter ";
|
||||
|
||||
o << pp->second.type << " ";
|
||||
|
|
@ -1162,7 +1162,7 @@ void NetScope::dump(ostream&o) const
|
|||
}
|
||||
|
||||
for (pp = localparams.begin()
|
||||
; pp != localparams.end() ; pp ++) {
|
||||
; pp != localparams.end() ; ++ pp ) {
|
||||
o << " localparam " << (*pp).first << " = " <<
|
||||
*(*pp).second.expr << ";" << endl;
|
||||
}
|
||||
|
|
@ -1172,7 +1172,7 @@ void NetScope::dump(ostream&o) const
|
|||
{
|
||||
list<pair<pform_name_t,NetExpr*> >::const_iterator pp;
|
||||
for (pp = defparams.begin()
|
||||
; pp != defparams.end() ; pp ++ ) {
|
||||
; pp != defparams.end() ; ++ pp ) {
|
||||
o << " defparam " << (*pp).first << " = " <<
|
||||
*(*pp).second << ";" << endl;
|
||||
}
|
||||
|
|
@ -1181,7 +1181,7 @@ void NetScope::dump(ostream&o) const
|
|||
{
|
||||
list<pair<list<hname_t>,NetExpr*> >::const_iterator pp;
|
||||
for (pp = defparams_later.begin()
|
||||
; pp != defparams_later.end() ; pp ++ ) {
|
||||
; pp != defparams_later.end() ; ++ pp ) {
|
||||
o << " defparam(later) " << pp->first << " = " <<
|
||||
*(pp->second) << ";" << endl;
|
||||
}
|
||||
|
|
@ -1203,7 +1203,7 @@ void NetScope::dump(ostream&o) const
|
|||
// Dump specparams
|
||||
typedef map<perm_string,spec_val_t>::const_iterator specparam_it_t;
|
||||
for (specparam_it_t cur = specparams.begin()
|
||||
; cur != specparams.end() ; cur ++ ) {
|
||||
; cur != specparams.end() ; ++ cur ) {
|
||||
o << " specparam " << (*cur).first
|
||||
<< " = ";
|
||||
spec_val_t value = (*cur).second;
|
||||
|
|
@ -1240,7 +1240,7 @@ void NetScope::dump(ostream&o) const
|
|||
|
||||
/* Dump any sub-scopes. */
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
cur->second->dump(o);
|
||||
}
|
||||
|
||||
|
|
@ -1518,7 +1518,7 @@ void Design::dump(ostream&o) const
|
|||
o << "DESIGN TIME PRECISION: 10e" << get_precision() << endl;
|
||||
o << "SCOPES:" << endl;
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
(*scope)->dump(o);
|
||||
|
||||
o << "ELABORATED NODES:" << endl;
|
||||
|
|
|
|||
|
|
@ -1984,7 +1984,7 @@ static void probe_index_expr_width(Design*des, NetScope*scope,
|
|||
const name_component_t&name)
|
||||
{
|
||||
for (list<index_component_t>::const_iterator cur = name.index.begin()
|
||||
; cur != name.index.end() ; cur ++) {
|
||||
; cur != name.index.end() ; ++ cur ) {
|
||||
|
||||
if (cur->msb)
|
||||
probe_expr_width(des, scope, cur->msb);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static void collect_scope_parameters_(NetScope*scope,
|
|||
const map<perm_string,LexicalScope::param_expr_t>¶meters)
|
||||
{
|
||||
for (mparm_it_t cur = parameters.begin()
|
||||
; cur != parameters.end() ; cur ++) {
|
||||
; cur != parameters.end() ; ++ cur ) {
|
||||
|
||||
NetEParam*tmp = new NetEParam;
|
||||
tmp->set_line(*((*cur).second.expr));
|
||||
|
|
@ -68,7 +68,7 @@ static void collect_scope_localparams_(NetScope*scope,
|
|||
const map<perm_string,LexicalScope::param_expr_t>&localparams)
|
||||
{
|
||||
for (mparm_it_t cur = localparams.begin()
|
||||
; cur != localparams.end() ; cur ++) {
|
||||
; cur != localparams.end() ; ++ cur ) {
|
||||
|
||||
NetEParam*tmp = new NetEParam;
|
||||
tmp->set_line(*((*cur).second.expr));
|
||||
|
|
@ -172,7 +172,7 @@ static void elaborate_scope_parameters_(Design*des, NetScope*scope,
|
|||
const map<perm_string,LexicalScope::param_expr_t>¶meters)
|
||||
{
|
||||
for (mparm_it_t cur = parameters.begin()
|
||||
; cur != parameters.end() ; cur ++) {
|
||||
; cur != parameters.end() ; ++ cur ) {
|
||||
|
||||
// A parameter can not have the same name as a genvar.
|
||||
if (scope->find_genvar((*cur).first)) {
|
||||
|
|
@ -191,7 +191,7 @@ static void elaborate_scope_localparams_(Design*des, NetScope*scope,
|
|||
const map<perm_string,LexicalScope::param_expr_t>&localparams)
|
||||
{
|
||||
for (mparm_it_t cur = localparams.begin()
|
||||
; cur != localparams.end() ; cur ++) {
|
||||
; cur != localparams.end() ; ++ cur ) {
|
||||
|
||||
// A localparam can not have the same name as a genvar.
|
||||
if (scope->find_genvar((*cur).first)) {
|
||||
|
|
@ -210,7 +210,7 @@ static void replace_scope_parameters_(NetScope*scope, const LineInfo&loc,
|
|||
const Module::replace_t&replacements)
|
||||
{
|
||||
for (Module::replace_t::const_iterator cur = replacements.begin()
|
||||
; cur != replacements.end() ; cur ++) {
|
||||
; cur != replacements.end() ; ++ cur ) {
|
||||
|
||||
NetExpr*val = (*cur).second;
|
||||
if (val == 0) {
|
||||
|
|
@ -240,7 +240,7 @@ static void elaborate_scope_events_(Design*des, NetScope*scope,
|
|||
const map<perm_string,PEvent*>&events)
|
||||
{
|
||||
for (map<perm_string,PEvent*>::const_iterator et = events.begin()
|
||||
; et != events.end() ; et ++ ) {
|
||||
; et != events.end() ; ++ et ) {
|
||||
|
||||
(*et).second->elaborate_scope(des, scope);
|
||||
}
|
||||
|
|
@ -253,7 +253,7 @@ static void elaborate_scope_tasks(Design*des, NetScope*scope,
|
|||
typedef map<perm_string,PTask*>::const_iterator tasks_it_t;
|
||||
|
||||
for (tasks_it_t cur = tasks.begin()
|
||||
; cur != tasks.end() ; cur ++ ) {
|
||||
; cur != tasks.end() ; ++ cur ) {
|
||||
|
||||
hname_t use_name( (*cur).first );
|
||||
// A task can not have the same name as another scope object.
|
||||
|
|
@ -308,7 +308,7 @@ static void elaborate_scope_funcs(Design*des, NetScope*scope,
|
|||
typedef map<perm_string,PFunction*>::const_iterator funcs_it_t;
|
||||
|
||||
for (funcs_it_t cur = funcs.begin()
|
||||
; cur != funcs.end() ; cur ++ ) {
|
||||
; cur != funcs.end() ; ++ cur ) {
|
||||
|
||||
hname_t use_name( (*cur).first );
|
||||
// A function can not have the same name as another scope object.
|
||||
|
|
@ -376,7 +376,7 @@ class generate_schemes_work_item_t : public elaborator_work_item_t {
|
|||
// elaboration.
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = mod_->generate_schemes.begin()
|
||||
; cur != mod_->generate_schemes.end() ; cur ++ ) {
|
||||
; cur != mod_->generate_schemes.end() ; ++ cur ) {
|
||||
(*cur) -> generate_scope(des, scope_);
|
||||
}
|
||||
}
|
||||
|
|
@ -399,7 +399,7 @@ bool Module::elaborate_scope(Design*des, NetScope*scope,
|
|||
|
||||
// Add the genvars to the scope.
|
||||
typedef map<perm_string,LineInfo*>::const_iterator genvar_it_t;
|
||||
for (genvar_it_t cur = genvars.begin(); cur != genvars.end(); cur++ ) {
|
||||
for (genvar_it_t cur = genvars.begin(); cur != genvars.end(); ++ cur ) {
|
||||
scope->add_genvar((*cur).first, (*cur).second);
|
||||
}
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ bool Module::elaborate_scope(Design*des, NetScope*scope,
|
|||
|
||||
typedef list<Module::named_expr_t>::const_iterator defparms_iter_t;
|
||||
for (defparms_iter_t cur = defparms.begin()
|
||||
; cur != defparms.end() ; cur ++) {
|
||||
; cur != defparms.end() ; ++ cur ) {
|
||||
|
||||
PExpr*ex = cur->second;
|
||||
assert(ex);
|
||||
|
|
@ -496,7 +496,7 @@ bool Module::elaborate_scope(Design*des, NetScope*scope,
|
|||
|
||||
typedef list<PGate*>::const_iterator gates_it_t;
|
||||
for (gates_it_t cur = gates_.begin()
|
||||
; cur != gates_.end() ; cur ++ ) {
|
||||
; cur != gates_.end() ; ++ cur ) {
|
||||
|
||||
(*cur) -> elaborate_scope(des, scope);
|
||||
}
|
||||
|
|
@ -509,7 +509,7 @@ bool Module::elaborate_scope(Design*des, NetScope*scope,
|
|||
typedef list<PProcess*>::const_iterator proc_it_t;
|
||||
|
||||
for (proc_it_t cur = behaviors.begin()
|
||||
; cur != behaviors.end() ; cur ++ ) {
|
||||
; cur != behaviors.end() ; ++ cur ) {
|
||||
|
||||
(*cur) -> statement() -> elaborate_scope(des, scope);
|
||||
}
|
||||
|
|
@ -849,7 +849,7 @@ bool PGenerate::generate_scope_case_(Design*des, NetScope*container)
|
|||
// Detect that the item is a default.
|
||||
if (item->item_test.size() == 0) {
|
||||
default_item = item;
|
||||
cur ++;
|
||||
++ cur;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -881,7 +881,7 @@ bool PGenerate::generate_scope_case_(Design*des, NetScope*container)
|
|||
if (match_flag)
|
||||
break;
|
||||
|
||||
cur ++;
|
||||
++ cur;
|
||||
}
|
||||
|
||||
delete case_value_co;
|
||||
|
|
@ -1017,7 +1017,7 @@ void PGenerate::elaborate_subscope_direct_(Design*des, NetScope*scope)
|
|||
{
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++ ) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur) -> generate_scope(des, scope);
|
||||
}
|
||||
}
|
||||
|
|
@ -1026,7 +1026,7 @@ void PGenerate::elaborate_subscope_(Design*des, NetScope*scope)
|
|||
{
|
||||
// Add the genvars to this scope.
|
||||
typedef map<perm_string,LineInfo*>::const_iterator genvar_it_t;
|
||||
for (genvar_it_t cur = genvars.begin(); cur != genvars.end(); cur++ ) {
|
||||
for (genvar_it_t cur = genvars.begin(); cur != genvars.end(); ++ cur ) {
|
||||
scope->add_genvar((*cur).first, (*cur).second);
|
||||
}
|
||||
|
||||
|
|
@ -1036,7 +1036,7 @@ void PGenerate::elaborate_subscope_(Design*des, NetScope*scope)
|
|||
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++ ) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur) -> generate_scope(des, scope);
|
||||
}
|
||||
|
||||
|
|
@ -1057,13 +1057,13 @@ void PGenerate::elaborate_subscope_(Design*des, NetScope*scope)
|
|||
// their own scopes.
|
||||
typedef list<PGate*>::const_iterator pgate_list_it_t;
|
||||
for (pgate_list_it_t cur = gates.begin()
|
||||
; cur != gates.end() ; cur ++) {
|
||||
; cur != gates.end() ; ++ cur ) {
|
||||
(*cur) ->elaborate_scope(des, scope);
|
||||
}
|
||||
|
||||
typedef list<PProcess*>::const_iterator proc_it_t;
|
||||
for (proc_it_t cur = behaviors.begin()
|
||||
; cur != behaviors.end() ; cur ++ ) {
|
||||
; cur != behaviors.end() ; ++ cur ) {
|
||||
(*cur) -> statement() -> elaborate_scope(des, scope);
|
||||
}
|
||||
|
||||
|
|
@ -1331,7 +1331,7 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
|
|||
replace[*cur] = (*overrides_)[jdx];
|
||||
|
||||
jdx += 1;
|
||||
cur ++;
|
||||
++ cur;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1352,7 +1352,7 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
|
|||
// parameter value with the new expression.
|
||||
|
||||
for (mparm_local_it_t cur = replace.begin()
|
||||
; cur != replace.end() ; cur ++ ) {
|
||||
; cur != replace.end() ; ++ cur ) {
|
||||
|
||||
PExpr*tmp = (*cur).second;
|
||||
// No expression means that the parameter is not
|
||||
|
|
|
|||
27
elab_sig.cc
27
elab_sig.cc
|
|
@ -87,7 +87,7 @@ bool PScope::elaborate_sig_wires_(Design*des, NetScope*scope) const
|
|||
bool flag = true;
|
||||
|
||||
for (map<perm_string,PWire*>::const_iterator wt = wires.begin()
|
||||
; wt != wires.end() ; wt ++ ) {
|
||||
; wt != wires.end() ; ++ wt ) {
|
||||
|
||||
PWire*cur = (*wt).second;
|
||||
NetNet*sig = cur->elaborate_sig(des, scope);
|
||||
|
|
@ -143,7 +143,7 @@ static void elaborate_sig_funcs(Design*des, NetScope*scope,
|
|||
typedef map<perm_string,PFunction*>::const_iterator mfunc_it_t;
|
||||
|
||||
for (mfunc_it_t cur = funcs.begin()
|
||||
; cur != funcs.end() ; cur ++) {
|
||||
; cur != funcs.end() ; ++ cur ) {
|
||||
|
||||
hname_t use_name ( (*cur).first );
|
||||
NetScope*fscope = scope->child(use_name);
|
||||
|
|
@ -165,7 +165,7 @@ static void elaborate_sig_tasks(Design*des, NetScope*scope,
|
|||
typedef map<perm_string,PTask*>::const_iterator mtask_it_t;
|
||||
|
||||
for (mtask_it_t cur = tasks.begin()
|
||||
; cur != tasks.end() ; cur ++) {
|
||||
; cur != tasks.end() ; ++ cur ) {
|
||||
NetScope*tscope = scope->child( hname_t((*cur).first) );
|
||||
assert(tscope);
|
||||
(*cur).second->elaborate_sig(des, tscope);
|
||||
|
|
@ -229,7 +229,7 @@ bool Module::elaborate_sig(Design*des, NetScope*scope) const
|
|||
// scope in.
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++ ) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur) -> elaborate_sig(des, scope);
|
||||
}
|
||||
|
||||
|
|
@ -241,8 +241,7 @@ bool Module::elaborate_sig(Design*des, NetScope*scope) const
|
|||
const list<PGate*>&gl = get_gates();
|
||||
|
||||
for (list<PGate*>::const_iterator gt = gl.begin()
|
||||
; gt != gl.end()
|
||||
; gt ++ ) {
|
||||
; gt != gl.end() ; ++ gt ) {
|
||||
|
||||
flag &= (*gt)->elaborate_sig(des, scope);
|
||||
}
|
||||
|
|
@ -261,7 +260,7 @@ bool Module::elaborate_sig(Design*des, NetScope*scope) const
|
|||
typedef list<PProcess*>::const_iterator proc_it_t;
|
||||
|
||||
for (proc_it_t cur = behaviors.begin()
|
||||
; cur != behaviors.end() ; cur ++ ) {
|
||||
; cur != behaviors.end() ; ++ cur ) {
|
||||
|
||||
(*cur) -> statement() -> elaborate_sig(des, scope);
|
||||
}
|
||||
|
|
@ -338,7 +337,7 @@ bool PGenerate::elaborate_sig(Design*des, NetScope*container) const
|
|||
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
PGenerate*item = *cur;
|
||||
if (item->direct_nested_ || !item->scope_list_.empty()) {
|
||||
flag &= item->elaborate_sig(des, container);
|
||||
|
|
@ -349,7 +348,7 @@ bool PGenerate::elaborate_sig(Design*des, NetScope*container) const
|
|||
|
||||
typedef list<NetScope*>::const_iterator scope_list_it_t;
|
||||
for (scope_list_it_t cur = scope_list_.begin()
|
||||
; cur != scope_list_.end() ; cur ++ ) {
|
||||
; cur != scope_list_.end() ; ++ cur ) {
|
||||
|
||||
NetScope*scope = *cur;
|
||||
|
||||
|
|
@ -382,7 +381,7 @@ bool PGenerate::elaborate_sig_direct_(Design*des, NetScope*container) const
|
|||
bool flag = true;
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
PGenerate*item = *cur;
|
||||
if (item->direct_nested_ || !item->scope_list_.empty()) {
|
||||
// Found the item, and it is direct nested.
|
||||
|
|
@ -398,7 +397,7 @@ bool PGenerate::elaborate_sig_(Design*des, NetScope*scope) const
|
|||
// in the current scope.
|
||||
typedef map<perm_string,PWire*>::const_iterator wires_it_t;
|
||||
for (wires_it_t wt = wires.begin()
|
||||
; wt != wires.end() ; wt ++ ) {
|
||||
; wt != wires.end() ; ++ wt ) {
|
||||
|
||||
PWire*cur = (*wt).second;
|
||||
|
||||
|
|
@ -414,19 +413,19 @@ bool PGenerate::elaborate_sig_(Design*des, NetScope*scope) const
|
|||
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++ ) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur) -> elaborate_sig(des, scope);
|
||||
}
|
||||
|
||||
typedef list<PGate*>::const_iterator pgate_list_it_t;
|
||||
for (pgate_list_it_t cur = gates.begin()
|
||||
; cur != gates.end() ; cur ++) {
|
||||
; cur != gates.end() ; ++ cur ) {
|
||||
(*cur) ->elaborate_sig(des, scope);
|
||||
}
|
||||
|
||||
typedef list<PProcess*>::const_iterator proc_it_t;
|
||||
for (proc_it_t cur = behaviors.begin()
|
||||
; cur != behaviors.end() ; cur ++ ) {
|
||||
; cur != behaviors.end() ; ++ cur ) {
|
||||
(*cur) -> statement() -> elaborate_sig(des, scope);
|
||||
}
|
||||
|
||||
|
|
|
|||
40
elaborate.cc
40
elaborate.cc
|
|
@ -4069,7 +4069,7 @@ void PSpecPath::elaborate(Design*des, NetScope*scope) const
|
|||
/* Create all the various paths from the path specifier. */
|
||||
typedef std::vector<perm_string>::const_iterator str_vector_iter;
|
||||
for (str_vector_iter cur = dst.begin()
|
||||
; cur != dst.end() ; cur ++) {
|
||||
; cur != dst.end() ; ++ cur ) {
|
||||
|
||||
if (debug_elaborate) {
|
||||
cerr << get_fileline() << ": debug: Path to " << (*cur);
|
||||
|
|
@ -4137,7 +4137,7 @@ void PSpecPath::elaborate(Design*des, NetScope*scope) const
|
|||
|
||||
unsigned idx = 0;
|
||||
for (str_vector_iter cur_src = src.begin()
|
||||
; cur_src != src.end() ; cur_src ++) {
|
||||
; cur_src != src.end() ; ++ cur_src ) {
|
||||
NetNet*src_sig = scope->find_signal(*cur_src);
|
||||
assert(src_sig);
|
||||
|
||||
|
|
@ -4175,7 +4175,7 @@ static void elaborate_functions(Design*des, NetScope*scope,
|
|||
{
|
||||
typedef map<perm_string,PFunction*>::const_iterator mfunc_it_t;
|
||||
for (mfunc_it_t cur = funcs.begin()
|
||||
; cur != funcs.end() ; cur ++) {
|
||||
; cur != funcs.end() ; ++ cur ) {
|
||||
|
||||
hname_t use_name ( (*cur).first );
|
||||
NetScope*fscope = scope->child(use_name);
|
||||
|
|
@ -4189,7 +4189,7 @@ static void elaborate_tasks(Design*des, NetScope*scope,
|
|||
{
|
||||
typedef map<perm_string,PTask*>::const_iterator mtask_it_t;
|
||||
for (mtask_it_t cur = tasks.begin()
|
||||
; cur != tasks.end() ; cur ++) {
|
||||
; cur != tasks.end() ; ++ cur ) {
|
||||
|
||||
hname_t use_name ( (*cur).first );
|
||||
NetScope*tscope = scope->child(use_name);
|
||||
|
|
@ -4210,7 +4210,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const
|
|||
// Elaborate specparams
|
||||
typedef map<perm_string,PExpr*>::const_iterator specparam_it_t;
|
||||
for (specparam_it_t cur = specparams.begin()
|
||||
; cur != specparams.end() ; cur ++ ) {
|
||||
; cur != specparams.end() ; ++ cur ) {
|
||||
|
||||
probe_expr_width(des, scope, (*cur).second);
|
||||
need_constant_expr = true;
|
||||
|
|
@ -4255,7 +4255,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const
|
|||
// Elaborate within the generate blocks.
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++ ) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur)->elaborate(des, scope);
|
||||
}
|
||||
|
||||
|
|
@ -4273,8 +4273,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const
|
|||
const list<PGate*>&gl = get_gates();
|
||||
|
||||
for (list<PGate*>::const_iterator gt = gl.begin()
|
||||
; gt != gl.end()
|
||||
; gt ++ ) {
|
||||
; gt != gl.end() ; ++ gt ) {
|
||||
|
||||
(*gt)->elaborate(des, scope);
|
||||
}
|
||||
|
|
@ -4287,7 +4286,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const
|
|||
// Elaborate the specify paths of the module.
|
||||
|
||||
for (list<PSpecPath*>::const_iterator sp = specify_paths.begin()
|
||||
; sp != specify_paths.end() ; sp ++) {
|
||||
; sp != specify_paths.end() ; ++ sp ) {
|
||||
|
||||
(*sp)->elaborate(des, scope);
|
||||
}
|
||||
|
|
@ -4314,7 +4313,7 @@ bool PGenerate::elaborate(Design*des, NetScope*container) const
|
|||
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
PGenerate*item = *cur;
|
||||
if (item->direct_nested_ || !item->scope_list_.empty()) {
|
||||
flag &= item->elaborate(des, container);
|
||||
|
|
@ -4325,7 +4324,7 @@ bool PGenerate::elaborate(Design*des, NetScope*container) const
|
|||
|
||||
typedef list<NetScope*>::const_iterator scope_list_it_t;
|
||||
for (scope_list_it_t cur = scope_list_.begin()
|
||||
; cur != scope_list_.end() ; cur ++ ) {
|
||||
; cur != scope_list_.end() ; ++ cur ) {
|
||||
|
||||
NetScope*scope = *cur;
|
||||
// Check that this scope is one that is contained in the
|
||||
|
|
@ -4368,7 +4367,7 @@ bool PGenerate::elaborate_direct_(Design*des, NetScope*container) const
|
|||
bool flag = true;
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
PGenerate*item = *cur;
|
||||
if (item->direct_nested_ || !item->scope_list_.empty()) {
|
||||
// Found the item, and it is direct nested.
|
||||
|
|
@ -4384,16 +4383,16 @@ bool PGenerate::elaborate_(Design*des, NetScope*scope) const
|
|||
elaborate_tasks(des, scope, tasks);
|
||||
|
||||
typedef list<PGate*>::const_iterator gates_it_t;
|
||||
for (gates_it_t cur = gates.begin() ; cur != gates.end() ; cur ++ )
|
||||
for (gates_it_t cur = gates.begin() ; cur != gates.end() ; ++ cur )
|
||||
(*cur)->elaborate(des, scope);
|
||||
|
||||
typedef list<PProcess*>::const_iterator proc_it_t;
|
||||
for (proc_it_t cur = behaviors.begin(); cur != behaviors.end(); cur++)
|
||||
for (proc_it_t cur = behaviors.begin(); cur != behaviors.end(); ++ cur )
|
||||
(*cur)->elaborate(des, scope);
|
||||
|
||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||
for (generate_it_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur ++ ) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur)->elaborate(des, scope);
|
||||
}
|
||||
|
||||
|
|
@ -4408,13 +4407,13 @@ bool PScope::elaborate_behaviors_(Design*des, NetScope*scope) const
|
|||
// involves scanning the PProcess* list, creating a NetProcTop
|
||||
// for each process.
|
||||
for (list<PProcess*>::const_iterator st = behaviors.begin()
|
||||
; st != behaviors.end() ; st ++ ) {
|
||||
; st != behaviors.end() ; ++ st ) {
|
||||
|
||||
result_flag &= (*st)->elaborate(des, scope);
|
||||
}
|
||||
|
||||
for (list<AProcess*>::const_iterator st = analog_behaviors.begin()
|
||||
; st != analog_behaviors.end() ; st ++ ) {
|
||||
; st != analog_behaviors.end() ; ++ st ) {
|
||||
|
||||
result_flag &= (*st)->elaborate(des, scope);
|
||||
}
|
||||
|
|
@ -4439,7 +4438,7 @@ class elaborate_root_scope_t : public elaborator_work_item_t {
|
|||
{
|
||||
Module::replace_t root_repl;
|
||||
for (list<Module::named_expr_t>::iterator cur = Module::user_defparms.begin()
|
||||
; cur != Module::user_defparms.end() ; cur++) {
|
||||
; cur != Module::user_defparms.end() ; ++ cur ) {
|
||||
|
||||
pform_name_t tmp_name = cur->first;
|
||||
if (peek_head_name(tmp_name) != scope_->basename())
|
||||
|
|
@ -4498,7 +4497,7 @@ class later_defparams : public elaborator_work_item_t {
|
|||
{
|
||||
list<NetScope*>tmp_list;
|
||||
for (set<NetScope*>::iterator cur = des->defparams_later.begin()
|
||||
; cur != des->defparams_later.end() ; cur ++ )
|
||||
; cur != des->defparams_later.end() ; ++ cur )
|
||||
tmp_list.push_back(*cur);
|
||||
|
||||
des->defparams_later.clear();
|
||||
|
|
@ -4561,8 +4560,7 @@ Design* elaborate(list<perm_string>roots)
|
|||
|
||||
// Scan the root modules by name, and elaborate their scopes.
|
||||
for (list<perm_string>::const_iterator root = roots.begin()
|
||||
; root != roots.end()
|
||||
; root++) {
|
||||
; root != roots.end() ; ++ root ) {
|
||||
|
||||
// Look for the root module in the list.
|
||||
map<perm_string,Module*>::const_iterator mod = pform_modules.find(*root);
|
||||
|
|
|
|||
14
emit.cc
14
emit.cc
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2010 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
|
||||
|
|
@ -386,11 +386,11 @@ void NetScope::emit_scope(struct target_t*tgt) const
|
|||
tgt->event(cur);
|
||||
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
cur->second->emit_scope(tgt);
|
||||
|
||||
for (signals_map_iter_t cur = signals_map_.begin()
|
||||
; cur != signals_map_.end() ; cur ++) {
|
||||
; cur != signals_map_.end() ; ++ cur ) {
|
||||
tgt->signal(cur->second);
|
||||
}
|
||||
|
||||
|
|
@ -414,7 +414,7 @@ bool NetScope::emit_defs(struct target_t*tgt) const
|
|||
switch (type_) {
|
||||
case MODULE:
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
flag &= cur->second->emit_defs(tgt);
|
||||
break;
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ bool NetScope::emit_defs(struct target_t*tgt) const
|
|||
break;
|
||||
default: /* BEGIN_END and FORK_JOIN, GENERATE... */
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
flag &= cur->second->emit_defs(tgt);
|
||||
break;
|
||||
}
|
||||
|
|
@ -448,7 +448,7 @@ int Design::emit(struct target_t*tgt) const
|
|||
|
||||
// enumerate the scopes
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
(*scope)->emit_scope(tgt);
|
||||
|
||||
|
||||
|
|
@ -471,7 +471,7 @@ int Design::emit(struct target_t*tgt) const
|
|||
// emit task and function definitions
|
||||
bool tasks_rc = true;
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
tasks_rc &= (*scope)->emit_defs(tgt);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ attrib_list_t* evaluate_attributes(const map<perm_string,PExpr*>&att,
|
|||
unsigned idx = 0;
|
||||
|
||||
typedef map<perm_string,PExpr*>::const_iterator iter_t;
|
||||
for (iter_t cur = att.begin() ; cur != att.end() ; cur ++, idx++) {
|
||||
for (iter_t cur = att.begin() ; cur != att.end() ; ++ cur , idx += 1) {
|
||||
table[idx].key = (*cur).first;
|
||||
PExpr*exp = (*cur).second;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1999-2010 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
|
||||
|
|
@ -100,7 +100,7 @@ void functor_t::lpm_ureduce(class Design*, class NetUReduce*)
|
|||
void NetScope::run_functor(Design*des, functor_t*fun)
|
||||
{
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
cur->second->run_functor(des, fun);
|
||||
|
||||
for (NetEvent*cur = events_ ; cur ; /* */) {
|
||||
|
|
@ -124,7 +124,7 @@ void Design::functor(functor_t*fun)
|
|||
{
|
||||
// Scan the scopes
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
(*scope)->run_functor(this, fun);
|
||||
|
||||
// apply to processes
|
||||
|
|
|
|||
|
|
@ -149,8 +149,7 @@ int build_library_index(const char*path, bool key_case_sensitive)
|
|||
char*key = 0;
|
||||
|
||||
for (list<const char*>::iterator suf = library_suff.begin()
|
||||
; suf != library_suff.end()
|
||||
; suf ++ ) {
|
||||
; suf != library_suff.end() ; ++ suf ) {
|
||||
const char*sufptr = *suf;
|
||||
unsigned sufsiz = strlen(sufptr);
|
||||
|
||||
|
|
|
|||
33
main.cc
33
main.cc
|
|
@ -732,7 +732,7 @@ static void EOC_cleanup(void)
|
|||
cleanup_sys_func_table();
|
||||
|
||||
for (list<const char*>::iterator suf = library_suff.begin() ;
|
||||
suf != library_suff.end() ; suf ++ ) {
|
||||
suf != library_suff.end() ; ++ suf ) {
|
||||
free((void *)*suf);
|
||||
}
|
||||
library_suff.clear();
|
||||
|
|
@ -742,7 +742,7 @@ static void EOC_cleanup(void)
|
|||
free(depfile_name);
|
||||
|
||||
for (map<string, const char*>::iterator flg = flags.begin() ;
|
||||
flg != flags.end() ; flg ++ ) {
|
||||
flg != flags.end() ; ++ flg ) {
|
||||
free((void *)flg->second);
|
||||
}
|
||||
flags.clear();
|
||||
|
|
@ -938,24 +938,22 @@ int main(int argc, char*argv[])
|
|||
ofstream out (pf_path);
|
||||
out << "PFORM DUMP NATURES:" << endl;
|
||||
for (map<perm_string,ivl_nature_t>::iterator cur = natures.begin()
|
||||
; cur != natures.end() ; cur ++ ) {
|
||||
; cur != natures.end() ; ++ cur ) {
|
||||
pform_dump(out, (*cur).second);
|
||||
}
|
||||
out << "PFORM DUMP DISCIPLINES:" << endl;
|
||||
for (map<perm_string,ivl_discipline_t>::iterator cur = disciplines.begin()
|
||||
; cur != disciplines.end() ; cur ++ ) {
|
||||
; cur != disciplines.end() ; ++ cur ) {
|
||||
pform_dump(out, (*cur).second);
|
||||
}
|
||||
out << "PFORM DUMP MODULES:" << endl;
|
||||
for (map<perm_string,Module*>::iterator mod = pform_modules.begin()
|
||||
; mod != pform_modules.end()
|
||||
; mod ++ ) {
|
||||
; mod != pform_modules.end() ; ++ mod ) {
|
||||
pform_dump(out, (*mod).second);
|
||||
}
|
||||
out << "PFORM DUMP PRIMITIVES:" << endl;
|
||||
for (map<perm_string,PUdp*>::iterator idx = pform_primitives.begin()
|
||||
; idx != pform_primitives.end()
|
||||
; idx ++ ) {
|
||||
; idx != pform_primitives.end() ; ++ idx ) {
|
||||
(*idx).second->dump(out);
|
||||
}
|
||||
}
|
||||
|
|
@ -974,14 +972,12 @@ int main(int argc, char*argv[])
|
|||
if (verbose_flag)
|
||||
cout << "LOCATING TOP-LEVEL MODULES" << endl << " ";
|
||||
for (mod = pform_modules.begin()
|
||||
; mod != pform_modules.end()
|
||||
; mod++) {
|
||||
; mod != pform_modules.end() ; ++ mod ) {
|
||||
find_module_mention(mentioned_p, mod->second);
|
||||
}
|
||||
|
||||
for (mod = pform_modules.begin()
|
||||
; mod != pform_modules.end()
|
||||
; mod++) {
|
||||
; mod != pform_modules.end() ; ++ mod ) {
|
||||
|
||||
/* Don't choose library modules. */
|
||||
if ((*mod).second->library_flag)
|
||||
|
|
@ -1061,7 +1057,7 @@ int main(int argc, char*argv[])
|
|||
|
||||
/* Done with all the pform data. Delete the modules. */
|
||||
for (map<perm_string,Module*>::iterator idx = pform_modules.begin()
|
||||
; idx != pform_modules.end() ; idx ++) {
|
||||
; idx != pform_modules.end() ; ++ idx ) {
|
||||
|
||||
delete (*idx).second;
|
||||
(*idx).second = 0;
|
||||
|
|
@ -1158,8 +1154,7 @@ int main(int argc, char*argv[])
|
|||
|
||||
map<perm_string,unsigned>::const_iterator idx;
|
||||
for (idx = missing_modules.begin()
|
||||
; idx != missing_modules.end()
|
||||
; idx ++)
|
||||
; idx != missing_modules.end() ; ++ idx )
|
||||
cerr << " " << (*idx).first
|
||||
<< " referenced " << (*idx).second
|
||||
<< " times."<< endl;
|
||||
|
|
@ -1174,7 +1169,7 @@ static void find_module_mention(map<perm_string,bool>&check_map, Module*mod)
|
|||
{
|
||||
list<PGate*> gates = mod->get_gates();
|
||||
list<PGate*>::const_iterator gate;
|
||||
for (gate = gates.begin(); gate != gates.end(); gate++) {
|
||||
for (gate = gates.begin(); gate != gates.end(); ++ gate ) {
|
||||
PGModule*tmp = dynamic_cast<PGModule*>(*gate);
|
||||
if (tmp) {
|
||||
// Note that this module has been instantiated
|
||||
|
|
@ -1184,7 +1179,7 @@ static void find_module_mention(map<perm_string,bool>&check_map, Module*mod)
|
|||
|
||||
list<PGenerate*>::const_iterator cur;
|
||||
for (cur = mod->generate_schemes.begin()
|
||||
; cur != mod->generate_schemes.end() ; cur ++) {
|
||||
; cur != mod->generate_schemes.end() ; ++ cur ) {
|
||||
find_module_mention(check_map, *cur);
|
||||
}
|
||||
}
|
||||
|
|
@ -1192,7 +1187,7 @@ static void find_module_mention(map<perm_string,bool>&check_map, Module*mod)
|
|||
static void find_module_mention(map<perm_string,bool>&check_map, PGenerate*schm)
|
||||
{
|
||||
list<PGate*>::const_iterator gate;
|
||||
for (gate = schm->gates.begin(); gate != schm->gates.end(); gate++) {
|
||||
for (gate = schm->gates.begin(); gate != schm->gates.end(); ++ gate ) {
|
||||
PGModule*tmp = dynamic_cast<PGModule*>(*gate);
|
||||
if (tmp) {
|
||||
// Note that this module has been instantiated
|
||||
|
|
@ -1202,7 +1197,7 @@ static void find_module_mention(map<perm_string,bool>&check_map, PGenerate*schm)
|
|||
|
||||
list<PGenerate*>::const_iterator cur;
|
||||
for (cur = schm->generate_schemes.begin()
|
||||
; cur != schm->generate_schemes.end() ; cur ++) {
|
||||
; cur != schm->generate_schemes.end() ; ++ cur ) {
|
||||
find_module_mention(check_map, *cur);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ NetScope* Design::find_scope(const std::list<hname_t>&path) const
|
|||
return 0;
|
||||
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin()
|
||||
; scope != root_scopes_.end(); scope++) {
|
||||
; scope != root_scopes_.end(); ++ scope ) {
|
||||
|
||||
NetScope*cur = *scope;
|
||||
if (path.front() != cur->fullname())
|
||||
|
|
@ -213,14 +213,14 @@ NetScope* Design::find_scope(NetScope*scope, const std::list<hname_t>&path,
|
|||
void Design::run_defparams()
|
||||
{
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
(*scope)->run_defparams(this);
|
||||
}
|
||||
|
||||
void NetScope::run_defparams(Design*des)
|
||||
{
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
cur->second->run_defparams(des);
|
||||
|
||||
while (! defparams.empty()) {
|
||||
|
|
@ -312,7 +312,7 @@ void NetScope::run_defparams_later(Design*des)
|
|||
// All the scopes that this defparam set touched should have
|
||||
// their parameters re-evaluated.
|
||||
for (set<NetScope*>::iterator cur = target_scopes.begin()
|
||||
; cur != target_scopes.end() ; cur ++ )
|
||||
; cur != target_scopes.end() ; ++ cur )
|
||||
(*cur)->evaluate_parameters(des);
|
||||
|
||||
// If there are some scopes that still have missing scopes,
|
||||
|
|
@ -326,7 +326,7 @@ void NetScope::run_defparams_later(Design*des)
|
|||
void Design::evaluate_parameters()
|
||||
{
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
(*scope)->evaluate_parameters(this);
|
||||
}
|
||||
|
||||
|
|
@ -610,7 +610,7 @@ void NetScope::evaluate_parameter_real_(Design*des, param_ref_t cur)
|
|||
void NetScope::evaluate_parameters(Design*des)
|
||||
{
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
cur->second->evaluate_parameters(des);
|
||||
|
||||
if (debug_scopes)
|
||||
|
|
@ -659,7 +659,7 @@ void NetScope::evaluate_parameters(Design*des)
|
|||
void Design::residual_defparams()
|
||||
{
|
||||
for (list<NetScope*>::const_iterator scope = root_scopes_.begin();
|
||||
scope != root_scopes_.end(); scope++)
|
||||
scope != root_scopes_.end(); ++ scope )
|
||||
(*scope)->residual_defparams(this);
|
||||
}
|
||||
|
||||
|
|
@ -676,7 +676,7 @@ void NetScope::residual_defparams(Design*des)
|
|||
}
|
||||
|
||||
for (map<hname_t,NetScope*>::const_iterator cur = children_.begin()
|
||||
; cur != children_.end() ; cur ++)
|
||||
; cur != children_.end() ; ++ cur )
|
||||
cur->second->residual_defparams(des);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2010 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
|
||||
|
|
@ -138,7 +138,7 @@ void NetEvent::find_similar_event(list<NetEvent*>&event_list)
|
|||
probes_->find_similar_probes(first_probes);
|
||||
|
||||
for (list<NetEvProbe*>::iterator idx = first_probes.begin()
|
||||
; idx != first_probes.end() ; idx ++) {
|
||||
; idx != first_probes.end() ; ++ idx ) {
|
||||
|
||||
candidate_events.insert( (*idx)->event() );
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ void NetEvent::find_similar_event(list<NetEvent*>&event_list)
|
|||
|
||||
set<NetEvent*> candidate_tmp;
|
||||
for (list<NetEvProbe*>::iterator idx = similar_probes.begin()
|
||||
; idx != similar_probes.end() ; idx ++) {
|
||||
; idx != similar_probes.end() ; ++ idx ) {
|
||||
|
||||
NetEvent*tmp = (*idx)->event();
|
||||
if (candidate_events.find(tmp) != candidate_events.end())
|
||||
|
|
@ -178,7 +178,7 @@ void NetEvent::find_similar_event(list<NetEvent*>&event_list)
|
|||
for remaining compatibility details and save the survivors
|
||||
in the event_list that the caller passed. */
|
||||
for (set<NetEvent*>::iterator idx = candidate_events.begin()
|
||||
; idx != candidate_events.end() ; idx ++) {
|
||||
; idx != candidate_events.end() ; ++ idx ) {
|
||||
|
||||
NetEvent*tmp = *idx;
|
||||
|
||||
|
|
@ -459,4 +459,3 @@ NetProc* NetEvWait::statement()
|
|||
{
|
||||
return statement_;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ void join_island(NetPins*obj)
|
|||
// process, and thus they will join my island. This process
|
||||
// will recurse until all the connected branches join this island.
|
||||
for (list<NetObj*>::iterator cur = uncommitted_neighbors.begin()
|
||||
; cur != uncommitted_neighbors.end() ; cur ++ ) {
|
||||
; cur != uncommitted_neighbors.end() ; ++ cur ) {
|
||||
join_island(*cur);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@ std::list<hname_t> eval_scope_path(Design*des, NetScope*scope,
|
|||
|
||||
typedef pform_name_t::const_iterator pform_path_it;
|
||||
|
||||
for (pform_path_it cur = path.begin() ; cur != path.end(); cur++) {
|
||||
for (pform_path_it cur = path.begin() ; cur != path.end(); ++ cur ) {
|
||||
const name_component_t&comp = *cur;
|
||||
res.push_back( eval_path_component(des,scope,comp) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ void nodangle_f::event(Design*des, NetEvent*ev)
|
|||
list<NetEvent*> match;
|
||||
ev->find_similar_event(match);
|
||||
for (list<NetEvent*>::iterator idx = match.begin()
|
||||
; idx != match.end() ; idx ++) {
|
||||
; idx != match.end() ; ++ idx ) {
|
||||
|
||||
NetEvent*tmp = *idx;
|
||||
assert(tmp != ev);
|
||||
|
|
|
|||
4
parse.y
4
parse.y
|
|
@ -2283,12 +2283,12 @@ module_item
|
|||
| K_output var_type unsigned_signed_opt range_opt list_of_port_identifiers ';'
|
||||
{ list<pair<perm_string,PExpr*> >::const_iterator pp;
|
||||
list<perm_string>*tmp = new list<perm_string>;
|
||||
for (pp = $5->begin(); pp != $5->end(); pp++) {
|
||||
for (pp = $5->begin(); pp != $5->end(); ++ pp ) {
|
||||
tmp->push_back((*pp).first);
|
||||
}
|
||||
pform_makewire(@1, $4, $3, tmp, $2, NetNet::POUTPUT,
|
||||
IVL_VT_NO_TYPE, 0, SR_BOTH);
|
||||
for (pp = $5->begin(); pp != $5->end(); pp++) {
|
||||
for (pp = $5->begin(); pp != $5->end(); ++ pp ) {
|
||||
if ((*pp).second) {
|
||||
pform_make_reginit(@1, (*pp).first, (*pp).second);
|
||||
}
|
||||
|
|
|
|||
32
pform.cc
32
pform.cc
|
|
@ -448,7 +448,7 @@ void pform_set_timescale(int unit, int prec,
|
|||
/* Look to see if we have any modules without a timescale. */
|
||||
bool have_no_ts = false;
|
||||
map<perm_string,Module*>::iterator mod;
|
||||
for (mod = pform_modules.begin(); mod != pform_modules.end(); mod++) {
|
||||
for (mod = pform_modules.begin(); mod != pform_modules.end(); ++ mod ) {
|
||||
const Module*mp = (*mod).second;
|
||||
if (mp->time_from_timescale ||
|
||||
mp->timescale_warn_done) continue;
|
||||
|
|
@ -466,7 +466,7 @@ void pform_set_timescale(int unit, int prec,
|
|||
<< endl;
|
||||
|
||||
for (mod = pform_modules.begin()
|
||||
; mod != pform_modules.end() ; mod++) {
|
||||
; mod != pform_modules.end() ; ++ mod ) {
|
||||
Module*mp = (*mod).second;
|
||||
if (mp->time_from_timescale ||
|
||||
mp->timescale_warn_done) continue;
|
||||
|
|
@ -1078,8 +1078,7 @@ static void process_udp_table(PUdp*udp, list<string>*table,
|
|||
svector<char> output (table->size());
|
||||
{ unsigned idx = 0;
|
||||
for (list<string>::iterator cur = table->begin()
|
||||
; cur != table->end()
|
||||
; cur ++, idx += 1) {
|
||||
; cur != table->end() ; ++ cur , idx += 1) {
|
||||
string tmp = *cur;
|
||||
|
||||
/* Pull the input values from the string. */
|
||||
|
|
@ -1435,8 +1434,7 @@ void pform_set_net_range(list<perm_string>*names,
|
|||
assert((range == 0) || (range->count() == 2));
|
||||
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_set_net_range(txt, range, signed_flag, dt, rt);
|
||||
}
|
||||
|
|
@ -1469,7 +1467,7 @@ static void pform_make_event(perm_string name, const char*fn, unsigned ln)
|
|||
void pform_make_events(list<perm_string>*names, const char*fn, unsigned ln)
|
||||
{
|
||||
list<perm_string>::iterator cur;
|
||||
for (cur = names->begin() ; cur != names->end() ; cur++) {
|
||||
for (cur = names->begin() ; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_make_event(txt, fn, ln);
|
||||
}
|
||||
|
|
@ -1930,8 +1928,7 @@ void pform_makewire(const vlltype&li,
|
|||
PWSRType rt)
|
||||
{
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_makewire(li, txt, type, pt, dt, attr);
|
||||
/* This has already been done for real variables. */
|
||||
|
|
@ -2066,7 +2063,7 @@ svector<PWire*>*pform_make_task_ports(NetNet::PortType pt,
|
|||
assert(names);
|
||||
svector<PWire*>*res = new svector<PWire*>(0);
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end() ; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
|
||||
perm_string name = *cur;
|
||||
|
||||
|
|
@ -2355,8 +2352,7 @@ void pform_set_port_type(const struct vlltype&li,
|
|||
NetNet::PortType pt)
|
||||
{
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_set_port_type(txt, pt, li.text, li.first_line);
|
||||
pform_set_net_range(txt, range, signed_flag, IVL_VT_NO_TYPE,
|
||||
|
|
@ -2393,8 +2389,7 @@ static void pform_set_reg_integer(perm_string name)
|
|||
void pform_set_reg_integer(list<perm_string>*names)
|
||||
{
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_set_reg_integer(txt);
|
||||
}
|
||||
|
|
@ -2423,8 +2418,7 @@ static void pform_set_reg_time(perm_string name)
|
|||
void pform_set_reg_time(list<perm_string>*names)
|
||||
{
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_set_reg_time(txt);
|
||||
}
|
||||
|
|
@ -2455,8 +2449,7 @@ static void pform_set_integer_2atom(uint64_t width, bool signed_flag, perm_strin
|
|||
void pform_set_integer_2atom(uint64_t width, bool signed_flag, list<perm_string>*names)
|
||||
{
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
pform_set_integer_2atom(width, signed_flag, txt);
|
||||
}
|
||||
|
|
@ -2469,8 +2462,7 @@ svector<PWire*>* pform_make_udp_input_ports(list<perm_string>*names)
|
|||
|
||||
unsigned idx = 0;
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end()
|
||||
; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
perm_string txt = *cur;
|
||||
PWire*pp = new PWire(txt,
|
||||
NetNet::IMPLICIT,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2008-2010 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
|
||||
|
|
@ -188,7 +188,7 @@ void pform_attach_discipline(const struct vlltype&loc,
|
|||
ivl_discipline_t discipline, list<perm_string>*names)
|
||||
{
|
||||
for (list<perm_string>::iterator cur = names->begin()
|
||||
; cur != names->end() ; cur ++ ) {
|
||||
; cur != names->end() ; ++ cur ) {
|
||||
|
||||
PWire* cur_net = pform_get_wire_in_scope(*cur);
|
||||
if (cur_net == 0) {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ ostream& operator<< (ostream&out, const name_component_t&that)
|
|||
|
||||
typedef std::list<index_component_t>::const_iterator index_it_t;
|
||||
for (index_it_t idx = that.index.begin()
|
||||
; idx != that.index.end() ; idx++) {
|
||||
; idx != that.index.end() ; ++ idx ) {
|
||||
|
||||
out << *idx;
|
||||
}
|
||||
|
|
@ -103,10 +103,10 @@ ostream& operator<< (ostream&o, const pform_name_t&that)
|
|||
cur = that.begin();
|
||||
o << *cur;
|
||||
|
||||
cur++;
|
||||
++ cur;
|
||||
while (cur != that.end()) {
|
||||
o << "." << *cur;
|
||||
cur++;
|
||||
++ cur;
|
||||
}
|
||||
|
||||
return o;
|
||||
|
|
@ -149,7 +149,7 @@ static void dump_attributes_map(ostream&out,
|
|||
int ind)
|
||||
{
|
||||
for (map<perm_string,PExpr*>::const_iterator idx = attributes.begin()
|
||||
; idx != attributes.end() ; idx++ ) {
|
||||
; idx != attributes.end() ; ++ idx ) {
|
||||
|
||||
out << setw(ind) << "" << "(* " << (*idx).first;
|
||||
if ((*idx).second) {
|
||||
|
|
@ -1005,28 +1005,28 @@ void PGenerate::dump(ostream&out, unsigned indent) const
|
|||
dump_wires_(out, indent+2);
|
||||
|
||||
for (list<PGate*>::const_iterator idx = gates.begin()
|
||||
; idx != gates.end() ; idx++) {
|
||||
; idx != gates.end() ; ++ idx ) {
|
||||
(*idx)->dump(out, indent+2);
|
||||
}
|
||||
|
||||
for (list<PProcess*>::const_iterator idx = behaviors.begin()
|
||||
; idx != behaviors.end() ; idx++) {
|
||||
; idx != behaviors.end() ; ++ idx ) {
|
||||
(*idx)->dump(out, indent+2);
|
||||
}
|
||||
|
||||
for (list<AProcess*>::const_iterator idx = analog_behaviors.begin()
|
||||
; idx != analog_behaviors.end() ; idx++) {
|
||||
; idx != analog_behaviors.end() ; ++ idx ) {
|
||||
(*idx)->dump(out, indent+2);
|
||||
}
|
||||
|
||||
typedef map<perm_string,LineInfo*>::const_iterator genvar_iter_t;
|
||||
for (genvar_iter_t cur = genvars.begin()
|
||||
; cur != genvars.end() ; cur++) {
|
||||
; cur != genvars.end() ; ++ cur ) {
|
||||
out << setw(indent+2) << "" << "genvar " << ((*cur).first) << ";" << endl;
|
||||
}
|
||||
|
||||
for (list<PGenerate*>::const_iterator idx = generate_schemes.begin()
|
||||
; idx != generate_schemes.end() ; idx++) {
|
||||
; idx != generate_schemes.end() ; ++ idx ) {
|
||||
(*idx)->dump(out, indent+2);
|
||||
}
|
||||
|
||||
|
|
@ -1041,7 +1041,7 @@ void LexicalScope::dump_parameters_(ostream&out, unsigned indent) const
|
|||
{
|
||||
typedef map<perm_string,param_expr_t>::const_iterator parm_iter_t;
|
||||
for (parm_iter_t cur = parameters.begin()
|
||||
; cur != parameters.end() ; cur ++) {
|
||||
; cur != parameters.end() ; ++ cur ) {
|
||||
out << setw(indent) << "" << "parameter "
|
||||
<< (*cur).second.type << " ";
|
||||
if ((*cur).second.signed_flag)
|
||||
|
|
@ -1090,7 +1090,7 @@ void LexicalScope::dump_localparams_(ostream&out, unsigned indent) const
|
|||
{
|
||||
typedef map<perm_string,param_expr_t>::const_iterator parm_iter_t;
|
||||
for (parm_iter_t cur = localparams.begin()
|
||||
; cur != localparams.end() ; cur ++) {
|
||||
; cur != localparams.end() ; ++ cur ) {
|
||||
out << setw(indent) << "" << "localparam ";
|
||||
if ((*cur).second.msb)
|
||||
out << "[" << *(*cur).second.msb << ":"
|
||||
|
|
@ -1106,7 +1106,7 @@ void LexicalScope::dump_localparams_(ostream&out, unsigned indent) const
|
|||
void LexicalScope::dump_events_(ostream&out, unsigned indent) const
|
||||
{
|
||||
for (map<perm_string,PEvent*>::const_iterator cur = events.begin()
|
||||
; cur != events.end() ; cur ++ ) {
|
||||
; cur != events.end() ; ++ cur ) {
|
||||
PEvent*ev = (*cur).second;
|
||||
out << setw(indent) << "" << "event " << ev->name() << "; // "
|
||||
<< ev->get_fileline() << endl;
|
||||
|
|
@ -1117,7 +1117,7 @@ void LexicalScope::dump_wires_(ostream&out, unsigned indent) const
|
|||
{
|
||||
// Iterate through and display all the wires.
|
||||
for (map<perm_string,PWire*>::const_iterator wire = wires.begin()
|
||||
; wire != wires.end() ; wire ++ ) {
|
||||
; wire != wires.end() ; ++ wire ) {
|
||||
|
||||
(*wire).second->dump(out, indent);
|
||||
}
|
||||
|
|
@ -1128,7 +1128,7 @@ void Module::dump(ostream&out) const
|
|||
if (attributes.begin() != attributes.end()) {
|
||||
out << "(* ";
|
||||
for (map<perm_string,PExpr*>::const_iterator idx = attributes.begin()
|
||||
; idx != attributes.end() ; idx++ ) {
|
||||
; idx != attributes.end() ; ++ idx ) {
|
||||
if (idx != attributes.begin()) {
|
||||
out << " , ";
|
||||
}
|
||||
|
|
@ -1166,26 +1166,26 @@ void Module::dump(ostream&out) const
|
|||
|
||||
typedef map<perm_string,LineInfo*>::const_iterator genvar_iter_t;
|
||||
for (genvar_iter_t cur = genvars.begin()
|
||||
; cur != genvars.end() ; cur++) {
|
||||
; cur != genvars.end() ; ++ cur ) {
|
||||
out << " genvar " << ((*cur).first) << ";" << endl;
|
||||
}
|
||||
|
||||
typedef list<PGenerate*>::const_iterator genscheme_iter_t;
|
||||
for (genscheme_iter_t cur = generate_schemes.begin()
|
||||
; cur != generate_schemes.end() ; cur++) {
|
||||
; cur != generate_schemes.end() ; ++ cur ) {
|
||||
(*cur)->dump(out, 4);
|
||||
}
|
||||
|
||||
typedef map<perm_string,PExpr*>::const_iterator specparm_iter_t;
|
||||
for (specparm_iter_t cur = specparams.begin()
|
||||
; cur != specparams.end() ; cur ++) {
|
||||
; cur != specparams.end() ; ++ cur ) {
|
||||
out << " specparam " << (*cur).first << " = "
|
||||
<< *(*cur).second << ";" << endl;
|
||||
}
|
||||
|
||||
typedef list<Module::named_expr_t>::const_iterator parm_hiter_t;
|
||||
for (parm_hiter_t cur = defparms.begin()
|
||||
; cur != defparms.end() ; cur ++) {
|
||||
; cur != defparms.end() ; ++ cur ) {
|
||||
out << " defparam " << (*cur).first << " = ";
|
||||
if ((*cur).second)
|
||||
out << *(*cur).second << ";" << endl;
|
||||
|
|
@ -1201,7 +1201,7 @@ void Module::dump(ostream&out) const
|
|||
// Dump the task definitions.
|
||||
typedef map<perm_string,PTask*>::const_iterator task_iter_t;
|
||||
for (task_iter_t cur = tasks.begin()
|
||||
; cur != tasks.end() ; cur ++) {
|
||||
; cur != tasks.end() ; ++ cur ) {
|
||||
out << " task " << (*cur).first << ";" << endl;
|
||||
(*cur).second->dump(out, 6);
|
||||
out << " endtask;" << endl;
|
||||
|
|
@ -1210,7 +1210,7 @@ void Module::dump(ostream&out) const
|
|||
// Dump the function definitions.
|
||||
typedef map<perm_string,PFunction*>::const_iterator func_iter_t;
|
||||
for (func_iter_t cur = funcs.begin()
|
||||
; cur != funcs.end() ; cur ++) {
|
||||
; cur != funcs.end() ; ++ cur ) {
|
||||
out << " function " << (*cur).first << ";" << endl;
|
||||
(*cur).second->dump(out, 6);
|
||||
out << " endfunction;" << endl;
|
||||
|
|
@ -1219,28 +1219,25 @@ void Module::dump(ostream&out) const
|
|||
|
||||
// Iterate through and display all the gates
|
||||
for (list<PGate*>::const_iterator gate = gates_.begin()
|
||||
; gate != gates_.end()
|
||||
; gate ++ ) {
|
||||
; gate != gates_.end() ; ++ gate ) {
|
||||
|
||||
(*gate)->dump(out);
|
||||
}
|
||||
|
||||
|
||||
for (list<PProcess*>::const_iterator behav = behaviors.begin()
|
||||
; behav != behaviors.end()
|
||||
; behav ++ ) {
|
||||
; behav != behaviors.end() ; ++ behav ) {
|
||||
|
||||
(*behav)->dump(out, 4);
|
||||
}
|
||||
|
||||
for (list<AProcess*>::const_iterator idx = analog_behaviors.begin()
|
||||
; idx != analog_behaviors.end() ; idx++) {
|
||||
; idx != analog_behaviors.end() ; ++ idx) {
|
||||
(*idx)->dump(out, 4);
|
||||
}
|
||||
|
||||
for (list<PSpecPath*>::const_iterator spec = specify_paths.begin()
|
||||
; spec != specify_paths.end()
|
||||
; spec ++ ) {
|
||||
; spec != specify_paths.end() ; ++ spec ) {
|
||||
|
||||
(*spec)->dump(out, 4);
|
||||
}
|
||||
|
|
@ -1283,8 +1280,7 @@ void PUdp::dump(ostream&out) const
|
|||
// Dump the attributes for the primitive as attribute
|
||||
// statements.
|
||||
for (map<string,PExpr*>::const_iterator idx = attributes.begin()
|
||||
; idx != attributes.end()
|
||||
; idx ++) {
|
||||
; idx != attributes.end() ; ++ idx ) {
|
||||
out << " attribute " << (*idx).first;
|
||||
if ((*idx).second)
|
||||
out << " = " << *(*idx).second;
|
||||
|
|
|
|||
|
|
@ -1644,7 +1644,7 @@ extern "C" int ivl_scope_children(ivl_scope_t net,
|
|||
void*cd)
|
||||
{
|
||||
for (map<hname_t,ivl_scope_t>::iterator cur = net->children.begin()
|
||||
; cur != net->children.end() ; cur ++) {
|
||||
; cur != net->children.end() ; ++ cur ) {
|
||||
int rc = func(cur->second, cd);
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
|
|
|
|||
8
t-dll.cc
8
t-dll.cc
|
|
@ -468,7 +468,7 @@ void dll_target::make_scope_parameters(ivl_scope_t scop, const NetScope*net)
|
|||
typedef map<perm_string,NetScope::param_expr_t>::const_iterator pit_t;
|
||||
|
||||
for (pit_t cur_pit = net->parameters.begin()
|
||||
; cur_pit != net->parameters.end() ; cur_pit ++) {
|
||||
; cur_pit != net->parameters.end() ; ++ cur_pit ) {
|
||||
|
||||
assert(idx < scop->nparam_);
|
||||
ivl_parameter_t cur_par = scop->param_ + idx;
|
||||
|
|
@ -482,7 +482,7 @@ void dll_target::make_scope_parameters(ivl_scope_t scop, const NetScope*net)
|
|||
idx += 1;
|
||||
}
|
||||
for (pit_t cur_pit = net->localparams.begin()
|
||||
; cur_pit != net->localparams.end() ; cur_pit ++) {
|
||||
; cur_pit != net->localparams.end() ; ++ cur_pit ) {
|
||||
|
||||
assert(idx < scop->nparam_);
|
||||
ivl_parameter_t cur_par = scop->param_ + idx;
|
||||
|
|
@ -603,7 +603,7 @@ bool dll_target::start_design(const Design*des)
|
|||
des_.disciplines.resize(disciplines.size());
|
||||
unsigned idx = 0;
|
||||
for (map<perm_string,ivl_discipline_t>::const_iterator cur = disciplines.begin()
|
||||
; cur != disciplines.end() ; cur ++) {
|
||||
; cur != disciplines.end() ; ++ cur ) {
|
||||
des_.disciplines[idx] = cur->second;
|
||||
idx += 1;
|
||||
}
|
||||
|
|
@ -611,7 +611,7 @@ bool dll_target::start_design(const Design*des)
|
|||
|
||||
root_scopes = des->find_root_scopes();
|
||||
for (list<NetScope*>::const_iterator scop = root_scopes.begin();
|
||||
scop != root_scopes.end(); scop++)
|
||||
scop != root_scopes.end(); ++ scop )
|
||||
add_root(des_, *scop);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ void vvp_fun_modpath::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
out_at[idx] -= now;
|
||||
}
|
||||
|
||||
for (cur ++ ; cur != candidate_list.end() ; cur ++) {
|
||||
for (cur ++ ; cur != candidate_list.end() ; ++ cur ) {
|
||||
src = *cur;
|
||||
for (unsigned idx = 0 ; idx < 12 ; idx += 1) {
|
||||
vvp_time64_t tmp = src->wake_time_ + src->delay_[idx];
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ bool vvp_island_branch_tran::run_test_enabled()
|
|||
static void island_send_value(list<vvp_branch_ptr_t>&connections, const vvp_vector8_t&val)
|
||||
{
|
||||
for (list<vvp_branch_ptr_t>::iterator idx = connections.begin()
|
||||
; idx != connections.end() ; idx ++ ) {
|
||||
; idx != connections.end() ; ++ idx ) {
|
||||
|
||||
vvp_island_branch*tmp_ptr = idx->ptr();
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ static void island_send_value(list<vvp_branch_ptr_t>&connections, const vvp_vect
|
|||
static void mark_done_flags(list<vvp_branch_ptr_t>&connections)
|
||||
{
|
||||
for (list<vvp_branch_ptr_t>::iterator idx = connections.begin()
|
||||
; idx != connections.end() ; idx ++ ) {
|
||||
; idx != connections.end() ; ++ idx ) {
|
||||
|
||||
vvp_island_branch*tmp_ptr = idx->ptr();
|
||||
vvp_island_branch_tran*cur = dynamic_cast<vvp_island_branch_tran*>(tmp_ptr);
|
||||
|
|
@ -186,7 +186,7 @@ static void mark_done_flags(list<vvp_branch_ptr_t>&connections)
|
|||
static void mark_visited_flags(list<vvp_branch_ptr_t>&connections)
|
||||
{
|
||||
for (list<vvp_branch_ptr_t>::iterator idx = connections.begin()
|
||||
; idx != connections.end() ; idx ++ ) {
|
||||
; idx != connections.end() ; ++ idx ) {
|
||||
|
||||
vvp_island_branch*tmp_ptr = idx->ptr();
|
||||
vvp_island_branch_tran*cur = dynamic_cast<vvp_island_branch_tran*>(tmp_ptr);
|
||||
|
|
@ -200,7 +200,7 @@ static void mark_visited_flags(list<vvp_branch_ptr_t>&connections)
|
|||
static void clear_visited_flags(list<vvp_branch_ptr_t>&connections)
|
||||
{
|
||||
for (list<vvp_branch_ptr_t>::iterator idx = connections.begin()
|
||||
; idx != connections.end() ; idx ++ ) {
|
||||
; idx != connections.end() ; ++ idx ) {
|
||||
|
||||
vvp_island_branch_tran*tmp_ptr = BRANCH_TRAN(idx->ptr());
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ static void resolve_values_from_connections(vvp_vector8_t&val,
|
|||
list<vvp_branch_ptr_t>&connections)
|
||||
{
|
||||
for (list<vvp_branch_ptr_t>::iterator idx = connections.begin()
|
||||
; idx != connections.end() ; idx ++ ) {
|
||||
; idx != connections.end() ; ++ idx ) {
|
||||
vvp_vector8_t tmp = get_value_from_branch(*idx);
|
||||
if (val.size() == 0)
|
||||
val = tmp;
|
||||
|
|
@ -287,7 +287,7 @@ static void push_value_through_branches(const vvp_vector8_t&val,
|
|||
list<vvp_branch_ptr_t>&connections)
|
||||
{
|
||||
for (list<vvp_branch_ptr_t>::iterator idx = connections.begin()
|
||||
; idx != connections.end() ; idx ++ ) {
|
||||
; idx != connections.end() ; ++ idx ) {
|
||||
|
||||
vvp_island_branch_tran*tmp_ptr = BRANCH_TRAN(idx->ptr());
|
||||
unsigned tmp_ab = idx->port();
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ static void final_cleanup()
|
|||
#ifdef CHECK_WITH_VALGRIND
|
||||
/* Clean up the file name table. */
|
||||
for (vector<const char*>::iterator cur = file_names.begin();
|
||||
cur != file_names.end() ; cur++) {
|
||||
cur != file_names.end() ; ++ cur ) {
|
||||
delete[] *cur;
|
||||
}
|
||||
/* Clear the static result buffer. */
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ void exec_ufunc_delete(vvp_code_t euf_code)
|
|||
void ufunc_pool_delete(void)
|
||||
{
|
||||
map<ufunc_core*, bool>::iterator iter;
|
||||
for (iter = ufunc_map.begin(); iter != ufunc_map.end(); iter++) {
|
||||
for (iter = ufunc_map.begin(); iter != ufunc_map.end(); ++ iter ) {
|
||||
delete iter->first;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ static void thread_word_delete_real(vpiHandle item)
|
|||
void vpi_handle_delete()
|
||||
{
|
||||
map<vpiHandle, bool>::iterator iter;
|
||||
for (iter = handle_map.begin(); iter != handle_map.end(); iter++) {
|
||||
for (iter = handle_map.begin(); iter != handle_map.end(); ++ iter ) {
|
||||
if (iter->second) thread_vthr_delete_real(iter->first);
|
||||
else thread_word_delete_real(iter->first);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -456,7 +456,7 @@ static void child_delete(vthread_t base)
|
|||
void vthreads_delete(struct __vpiScope*scope)
|
||||
{
|
||||
for (std::set<vthread_t>::iterator cur = scope->threads.begin()
|
||||
; cur != scope->threads.end() ; cur ++) {
|
||||
; cur != scope->threads.end() ; ++ cur ) {
|
||||
delete *cur;
|
||||
}
|
||||
scope->threads.clear();
|
||||
|
|
|
|||
|
|
@ -116,14 +116,14 @@ void vvp_net_pool_delete()
|
|||
local_net_pool_count = 0;
|
||||
|
||||
map<vvp_net_t*, bool>::iterator iter;
|
||||
for (iter = vvp_net_map.begin(); iter != vvp_net_map.end(); iter++) {
|
||||
for (iter = vvp_net_map.begin(); iter != vvp_net_map.end(); ++ iter ) {
|
||||
vvp_nets_del += 1;
|
||||
VALGRIND_MEMPOOL_FREE(iter->first->pool, iter->first);
|
||||
}
|
||||
vvp_net_map.clear();
|
||||
|
||||
map<sfunc_core*, bool>::iterator siter;
|
||||
for (siter = sfunc_map.begin(); siter != sfunc_map.end(); siter++) {
|
||||
for (siter = sfunc_map.begin(); siter != sfunc_map.end(); ++ siter ) {
|
||||
delete siter->first;
|
||||
}
|
||||
sfunc_map.clear();
|
||||
|
|
|
|||
Loading…
Reference in New Issue