//cout << "block abs. pos: " << absPos.x() << "," << absPos.y() << " | ";
//cout << "block current. pos: " << currentPosition.x() << "," << currentPosition.y() << " | ";
- if ((gapX < 0) && (absPos.x() == marginConn)) {
+ if ((position == Left) || (position == Right)) {
+ gapX = 0;
+ }
+ else if ((gapX < 0) && (absPos.x() == marginConn)) {
gapX = 0;
}
else if (absPos.x()+gapX < marginConn) {
gapX = marginConn-absPos.x();
}
- if ((gapY < 0) && (absPos.y() == marginConn)) {
+ if ((position == Top) || (position == Bottom)) {
+ gapY = 0;
+ }
+ else if ((gapY < 0) && (absPos.y() == marginConn)) {
gapY = 0;
}
else if (absPos.y()+gapY < marginConn) {
functionalBlock->addInterface(ctlIface);
}
}
- // connect clk and rst to group clk/rst or to clkrstgen
- if ((name != "clkrstgen") && (parentGroupBlock != NULL)) {
- try {
- functionalBlock->connectClkReset();
- }
- catch(Exception e) {
- AbstractBlock* source = (AbstractBlock *)(e.getSource());
- cerr << qPrintable(source->getName()) << ":" << qPrintable(e.getMessage()) << endl;
- throw(e);
- }
- }
// creating InterfaceItem
createInterfaceItems();