Go to the documentation of this file.
65 const std::string& name,
66 const std::string& widthFormula,
73 widthFormula_(widthFormula),
74 realWidth_(realWidth),
76 direction_(direction),
77 parentBlock_(&parent),
78 hasStaticValue_(
false),
87 msg <<
name <<
" has a negative width.";
106 const std::string& name,
113 widthFormula_(
Conversion::toString(realWidth)),
114 realWidth_(realWidth),
116 direction_(direction),
117 parentBlock_(&parent),
118 hasStaticValue_(
false),
127 msg <<
name <<
" has a negative width.";
147 const std::string& name,
148 const std::string& widthFormula,
154 widthFormula_(widthFormula),
157 direction_(direction),
158 parentBlock_(&parent),
159 hasStaticValue_(
false),
171 : name_(other.name_),
172 widthFormula_(other.widthFormula_),
173 realWidth_(other.realWidth_),
174 dataType_(other.dataType_),
175 direction_(other.direction_),
176 parentBlock_(nullptr),
177 hasStaticValue_(other.hasStaticValue_),
178 staticValue_(other.staticValue_),
179 signal_(other.signal_) {
187 const std::string& name,
188 const std::string& widthFormula,
193 widthFormula_(widthFormula),
196 direction_(direction),
197 parentBlock_(nullptr),
198 hasStaticValue_(
false),
210 if (param.
name() == formula) {
217 bool success =
false;
233 std::string newName)
const {
235 newName = this->
name();
301 +
name() +
") to " + newname +
302 " is not unique within the block.");
351 +
" doesn't have actual bit width.");
460 const std::string& name,
461 const std::string& widthFormula,
467 dataType,
OUT, parent, signal) {
471 const std::string& name,
472 const std::string& widthFormula,
476 :
NetlistPort(name, widthFormula, dataType,
OUT, parent, signal) {
480 const std::string& name,
481 const std::string& widthFormula,
488 const std::string& name,
495 const std::string& name,
501 const std::string& name,
502 const std::string& widthFormula,
508 dataType,
IN, parent, signal) {
512 const std::string& name,
513 const std::string& widthFormula,
517 :
NetlistPort(name, widthFormula, dataType,
IN, parent, signal) {
521 const std::string& name,
522 const std::string& widthFormula,
529 const std::string& name,
536 const std::string& name,
bool hasStaticValue_
Indicates if port is connected to vcc or gnd.
DataType dataType_
Data type of the port.
std::string widthFormula_
Formula for the width of the port.
NetlistPort * addPort(NetlistPort *port)
NetlistPort(const std::string &name, const std::string &widthFormula, int realWidth, DataType dataType, Direction direction, BaseNetlistBlock &parent, Signal signal=Signal())
const BaseNetlistBlock & parentBlock() const
OutBitPort(const std::string &name, BaseNetlistBlock &parent, Signal signal=Signal())
void removePort(NetlistPort *port)
std::string widthFormula() const
void setDirection(Direction direction)
Direction direction() const
InBitPort(const std::string &name, BaseNetlistBlock &parent, Signal signal=Signal())
void setToStatic(StaticSignal value) const
Direction direction_
Direction of the port.
void assignSignal(Signal signal)
InPort(const std::string &name, const std::string &widthFormula, int realWidth, DataType dataType, BaseNetlistBlock &parent, Signal signal=Signal())
virtual const Netlist & netlist() const
OutPort(const std::string &name, const std::string &widthFormula, int realWidth, DataType dataType, BaseNetlistBlock &parent, Signal signal=Signal())
StaticSignal staticValue() const
#define assert(condition)
Signal signal_
Assigned port usage.
bool realWidthAvailable() const
size_t parameterCount() const
NetlistPort * copyTo(BaseNetlistBlock &newParent, std::string newName="") const
#define THROW_EXCEPTION(exceptionType, message)
Exception wrapper macro that automatically includes file name, line number and function name where th...
const TCEString & name() const
bool hasParentBlock() const
const TCEString & value() const
int realWidth_
Real width of the port.
virtual NetlistPort * clone(bool asMirrored=false) const
DataType dataType() const
std::string name_
Name of the port.
void setParent(BaseNetlistBlock *parent)
void setWidthFormula(const std::string &newFormula)
bool resolveRealWidth(int &width) const
find Finds info of the inner loops in the false
DataType
Data types of hardware ports.
bool hasStaticValue() const
Parameter parameter(size_t index) const
Signal assignedSignal() const
static int toInt(const T &source)
BaseNetlistBlock * parentBlock_
The parent netlist block.
void rename(const std::string &newname)
Direction
Direction of the port.
StaticSignal staticValue_
Static signal value.
virtual const NetlistPort & port(size_t index) const