QString ret="";
bool ok;
- cout << "iface " << qPrintable(name) << " must be evaluated to vhdl :" << qPrintable(width) << " with type = " << qPrintable(getTypeString()) << endl;
+ //cout << "iface " << qPrintable(name) << " must be evaluated to vhdl :" << qPrintable(width) << " with type = " << qPrintable(getTypeString()) << endl;
+
+ if (context == Instance) {
+ if (direction == Output) {
+ ret = "from_"+owner->getName()+"_"+name;
+ }
+ else if (direction == InOut) {
+ ret = "fromto_"+owner->getName()+"_"+name;
+ }
+ return ret;
+ }
// create the width part
QString widthStr = "";
ret += widthStr;
}
else if (context == Signal) {
- ret = widthStr;
- }
- else if (context == Architecture) {
-
+ if (direction == Output) {
+ ret = "from_"+owner->getName()+"_"+name+" : "+widthStr;
+ }
+ else if (direction == InOut) {
+ ret = "fromto_"+owner->getName()+"_"+name+" : "+widthStr;
+ }
+ else if (direction == Input) {
+ ret = owner->getName()+"_"+name+" : "+widthStr;
+ }
}
return ret;