|
@@ -657,9 +657,13 @@ namespace Venus_RT.Modules
|
|
|
|
|
|
public class LoadlockTask : ModuleTask
|
|
|
{
|
|
|
+ private Dictionary<int, int> _wafersDelayTime = new Dictionary<int, int>();
|
|
|
public LoadlockTask(ModuleName ll) : base(ll)
|
|
|
{
|
|
|
SlotNum = SC.GetValue<int>($"{ll}.SlotNumber");
|
|
|
+
|
|
|
+ for (int slot = 0; slot < SlotNum; slot++)
|
|
|
+ _wafersDelayTime[slot] = -1;
|
|
|
}
|
|
|
|
|
|
public override int TimeToReady
|
|
@@ -667,9 +671,35 @@ namespace Venus_RT.Modules
|
|
|
get { return Scheduler.IsAvailable ? 0 : (Scheduler.TimeToReady + 500) / 1000; }
|
|
|
}
|
|
|
|
|
|
+ public int ReayOutWafersInTime(int seconds)
|
|
|
+ {
|
|
|
+
|
|
|
+ int readyOut = 0;
|
|
|
+ foreach(var slot in _wafersDelayTime)
|
|
|
+ {
|
|
|
+ if (slot.Value >= 0 && Scheduler.WaferArrivedTicks(slot.Key) / 1000 + seconds > slot.Value)
|
|
|
+ readyOut++;
|
|
|
+ }
|
|
|
+
|
|
|
+ return readyOut;
|
|
|
+ }
|
|
|
+
|
|
|
public override void WaferArrived(WaferTask wafer, int slot)
|
|
|
{
|
|
|
Scheduler.WaferArrived(slot);
|
|
|
+ if(ModuleHelper.IsLoadPort(wafer.destMod))
|
|
|
+ {
|
|
|
+ _wafersDelayTime[slot] = wafer.llDelayTime;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _wafersDelayTime[slot] = -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void WaferLeaved(WaferTask wafer, int slot)
|
|
|
+ {
|
|
|
+ _wafersDelayTime[slot] = -1;
|
|
|
}
|
|
|
|
|
|
public bool PreVent()
|
|
@@ -2255,6 +2285,7 @@ namespace Venus_RT.Modules
|
|
|
|
|
|
var atmWaferCount = _lstWaferTasks.Where(wafer => ModuleHelper.IsEFEMRobot(wafer.currentMod) || ModuleHelper.IsAligner(wafer.currentMod)).Count();
|
|
|
var efemRobotWafers = _lstWaferTasks.Where(wafer => ModuleHelper.IsEFEMRobot(wafer.currentMod)).ToList();
|
|
|
+ var validHands = (_efemRobotSingleArmOption == 0 ? 2 : 1);
|
|
|
if (LLInOutPath == SequenceLLInOutPath.AInBOut || LLInOutPath == SequenceLLInOutPath.BInAOut) // don need check system wafer existence as no blocking risk
|
|
|
{
|
|
|
var inLL = LLInOutPath == SequenceLLInOutPath.AInBOut ? ModuleName.LLA : ModuleName.LLB;
|
|
@@ -2284,14 +2315,16 @@ namespace Venus_RT.Modules
|
|
|
// don need pass by aligner
|
|
|
else
|
|
|
{
|
|
|
- if (_lstWaferTasks.Count(wt => wt.currentMod == outLL || (wt.currentMod == ModuleName.TMRobot && ModuleHelper.IsLoadPort(wt.destMod))) == 0 && _lstWaferTasks.Count(wt => wt.currentMod == inLL || wt.currentMod == ModuleName.EfemRobot) < (_efemRobotSingleArmOption == 0 ? 2 : 1))
|
|
|
+ // throughput is bad while loadlock need delay
|
|
|
+ var outModule = _dictModuleTask[outLL] as LoadlockTask;
|
|
|
+ if ((_lstWaferTasks.Count(wt => wt.currentMod == outLL || (wt.currentMod == ModuleName.TMRobot && ModuleHelper.IsLoadPort(wt.destMod))) == 0 || atmWaferCount < validHands - outModule.ReayOutWafersInTime(20)) && _lstWaferTasks.Count(wt => wt.currentMod == inLL || wt.currentMod == ModuleName.EfemRobot) < validHands)
|
|
|
{
|
|
|
if (ForwardATMWafers(inLL))
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if((inLLWaferStatus.emptySlot.Count == 2 || (inLLWaferStatus.emptySlot.Count == 1 && _efemRobotSingleArmOption != 0) && _dictModuleTask[inLL].TimeToReady < 2))
|
|
|
+ if (inLLWaferStatus.emptySlot.Count >= validHands && _dictModuleTask[inLL].TimeToReady < 2)
|
|
|
{
|
|
|
ExchangeWaferWithLL(inLL);
|
|
|
}
|