133 if(orChannel)
return nullptr;
134 if(hpbin->isValid()==
false)
return nullptr;
136 TGCChannelSLBOut* slbout =
nullptr;
139 TGCModuleId* hpb = hpbin->getModule();
142 if(!hpb)
return nullptr;
147 if(!mapId)
return nullptr;
161 TGCModuleId* slb =
nullptr;
176 blockInHPB = hpbin->getBlock();
177 nSlb = hpbin->getChannel()/(numOfBlock*2);
178 port = blockInHPB*slbInBlock+nSlb;
179 size = mapId->size();
181 if(mapId->connector(
i)==port){
182 slb = mapId->popModuleId(
i);
186 blockInSlb = (hpbin->getChannel() - nSlb*(numOfBlock*2))/2;
187 posInHpb = (hpbin->getChannel() - (numOfBlock*2)*nSlb)%2;
188 channel = (chInBlock/2)*posInHpb;
193 blockInHPB = hpbin->getBlock();
194 nSlb = hpbin->getChannel()/(numOfBlock*2);
195 port = blockInHPB*slbInBlock+nSlb;
196 size = mapId->size();
198 if(mapId->connector(
i)== -1*port){
199 slb = mapId->popModuleId(
i);
203 blockInSlb = (hpbin->getChannel() - nSlb*(numOfBlock*2))/2;
204 posInHpb = (hpbin->getChannel() - (numOfBlock*2)*nSlb)%2;
205 channel = (chInBlock/2)*posInHpb;
209 blockInHPB = hpbin->getBlock();
210 if(blockInHPB==0 && hpbin->getChannel()<numOfBlock) port=1;
212 size = mapId->size();
214 if(mapId->connector(
i)== -1*port){
215 slb = mapId->popModuleId(
i);
219 blockInSlb = (hpbin->getChannel())%numOfBlock;
220 if(blockInHPB == 1 && hpbin->getChannel() >= numOfBlock) blockInSlb = blockInSlb + numOfBlock/2;
229 delete mapId; mapId =
nullptr;
230 if(!slb)
return nullptr;
235 int SLBID = slb->getId();
236 if((chInBlock*blockInSlb+
channel)>chInBlock*numOfBlock){
240 }
else if(
channel > chInBlock){
245 slbout =
new TGCChannelSLBOut(slb->getSideType(),
247 slb->getRegionType(),