diff --git a/PSpec.cc b/PSpec.cc index 976c533e7..0f5516240 100644 --- a/PSpec.cc +++ b/PSpec.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006 Stephen Williams + * Copyright (c) 2006-2011 Stephen Williams * * 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,11 +19,14 @@ # include "PSpec.h" -PSpecPath::PSpecPath(unsigned src_cnt, unsigned dst_cnt) +PSpecPath::PSpecPath(unsigned src_cnt, unsigned dst_cnt, char polarity, + bool full_flag) : conditional(false), condition(0), edge(0), src(src_cnt), dst(dst_cnt), data_source_expression(0) { + full_flag_ = full_flag; + polarity_ = polarity; } PSpecPath::~PSpecPath() diff --git a/PSpec.h b/PSpec.h index 3b65ba283..a2313e0e7 100644 --- a/PSpec.h +++ b/PSpec.h @@ -56,7 +56,8 @@ class PExpr; class PSpecPath : public LineInfo { public: - PSpecPath(unsigned src_cnt, unsigned dst_cnt); + PSpecPath(unsigned src_cnt, unsigned dst_cnt, char polarity, + bool full_flag); ~PSpecPath(); void elaborate(class Design*des, class NetScope*scope) const; @@ -70,9 +71,9 @@ class PSpecPath : public LineInfo { // Edge specification (-1==negedge, 0 = no edge, 1==posedge) int edge; // Is this a full connection. - bool full_flag; + bool full_flag_; // What is the polarity of the connection. - char polarity; + char polarity_; // Ordered set of source nodes of a path std::vector src; // Ordered set of destination nodes of a path diff --git a/elaborate.cc b/elaborate.cc index f115e6210..50a16e74a 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -4196,7 +4196,7 @@ void PSpecPath::elaborate(Design*des, NetScope*scope) const /* A parallel connection does not support more than a one to one connection (source/destination). */ - if (! full_flag && ((src.size() != 1) || (dst.size() != 1))) { + if (! full_flag_ && ((src.size() != 1) || (dst.size() != 1))) { /* To be compatible with NC-Verilog we allow a parallel connection * with multiple sources/destinations if all the paths are only a * single bit wide (a scalar or a one bit vector). */ @@ -4324,7 +4324,7 @@ void PSpecPath::elaborate(Design*des, NetScope*scope) const // For a parallel connection the source and destination // must be the same width. - if (! full_flag) { + if (! full_flag_) { unsigned long src_wid = src_sig->vector_width(); if (src_wid != dst_wid) { cerr << get_fileline() << ": error: For a " diff --git a/pform.cc b/pform.cc index 476830b28..64405fc19 100644 --- a/pform.cc +++ b/pform.cc @@ -2344,10 +2344,8 @@ extern PSpecPath* pform_make_specify_path(const struct vlltype&li, list*src, char pol, bool full_flag, list*dst) { - PSpecPath*path = new PSpecPath(src->size(), dst->size()); + PSpecPath*path = new PSpecPath(src->size(), dst->size(), pol, full_flag); FILE_NAME(path, li.text, li.first_line); - path->polarity = pol; - path->full_flag = full_flag; unsigned idx; list::const_iterator cur; diff --git a/pform_dump.cc b/pform_dump.cc index ccb74830f..cd8829ccf 100644 --- a/pform_dump.cc +++ b/pform_dump.cc @@ -945,8 +945,8 @@ void PSpecPath::dump(std::ostream&out, unsigned ind) const } out << " "; - if (polarity) out << polarity; - if (full_flag) out << "*> "; + if (polarity_) out << polarity_; + if (full_flag_) out << "*> "; else out << "=> "; if (data_source_expression)