|
@@ -642,7 +642,7 @@ namespace Venus_RT.Modules
|
|
|
var inSlots = mod == ModuleName.LLA ? _LLAInSlot : _LLBInSlot;
|
|
|
foreach (var slot in inSlots)
|
|
|
{
|
|
|
- if (WaferManager.Instance.CheckNoWafer(mod, slot) && !_movingItems.Exists(item => item.DestinationModule == mod && item.DestinationSlot == slot))
|
|
|
+ if (WaferManager.Instance.CheckNoWafer(mod, slot) && !_movingItems.Exists(item => item.DestinationModule == mod && item.DestinationSlot == slot) && !IsSlotReservedByEFEM(mod, slot))
|
|
|
validSlot.Add(slot);
|
|
|
|
|
|
if (WaferManager.Instance.CheckHasWafer(mod, slot) && _movingItems.Exists(item => item.SourceModule == mod && item.SourceSlot == slot))
|
|
@@ -662,6 +662,25 @@ namespace Venus_RT.Modules
|
|
|
return validSlot.Distinct().ToList();
|
|
|
}
|
|
|
|
|
|
+ private int GetModuleSlotCount(ModuleName mod)
|
|
|
+ {
|
|
|
+ int nSlotCount = 1;
|
|
|
+ if(ModuleHelper.IsLoadLock(mod))
|
|
|
+ {
|
|
|
+ nSlotCount = mod == ModuleName.LLA ? _LLASlotNumber : _LLBSlotNumber;
|
|
|
+ }
|
|
|
+ else if(ModuleHelper.IsLoadPort(mod))
|
|
|
+ {
|
|
|
+ nSlotCount = SC.GetValue<int>("EFEM.LoadPort.SlotNumber");
|
|
|
+ }
|
|
|
+ else if(ModuleHelper.IsTMRobot(mod) || ModuleHelper.IsEFEMRobot(mod))
|
|
|
+ {
|
|
|
+ nSlotCount = 2;
|
|
|
+ }
|
|
|
+
|
|
|
+ return nSlotCount;
|
|
|
+ }
|
|
|
+
|
|
|
List<MoveItem> SearchWaitInSlots(ModuleName inModule)
|
|
|
{
|
|
|
List<MoveItem> inSlots = new List<MoveItem>();
|
|
@@ -725,7 +744,7 @@ namespace Venus_RT.Modules
|
|
|
|
|
|
foreach(var slot in _vacReadyOutSlots)
|
|
|
{
|
|
|
- if (_vacModules[slot.Module].MovingStatus == MovingStatus.Moving)
|
|
|
+ if (_vacModules[slot.Module].MovingStatus != MovingStatus.Idle)
|
|
|
continue;
|
|
|
|
|
|
if (ModuleHelper.IsLoadLock(slot.Module))
|
|
@@ -778,10 +797,10 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
// check whether match double move pattern
|
|
|
var same_dest = SearchWaitInSlots(destSlot.Module);
|
|
|
- foreach (var item in same_dest)
|
|
|
+ if(same_dest.Count > 0)
|
|
|
{
|
|
|
- _movingItems.Add(item);
|
|
|
- UpdateItemMovingStatus(item);
|
|
|
+ _movingItems.Add(same_dest[0]);
|
|
|
+ UpdateItemMovingStatus(same_dest[0]);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1020,7 +1039,7 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
if(robotSlots.Count >= 1)
|
|
|
{
|
|
|
- if(WaferManager.Instance.CheckNoWafer(ll, slot))
|
|
|
+ if(WaferManager.Instance.CheckNoWafer(ll, slot) && !IsSlotReservedByTM(ll, slot))
|
|
|
{
|
|
|
_efemMovingItems.Add(new MoveItem(ModuleName.EfemRobot, robotSlots.First(), ll, slot, (Hand)robotSlots.First()));
|
|
|
robotSlots.RemoveAt(0);
|
|
@@ -1074,6 +1093,22 @@ namespace Venus_RT.Modules
|
|
|
return (WaferManager.Instance.CheckHasWafer(ModuleName.EfemRobot, 0) ? 1 : 0) + (WaferManager.Instance.CheckHasWafer(ModuleName.EfemRobot, 1) ? 1 : 0);
|
|
|
}
|
|
|
|
|
|
+ private bool IsSlotReservedByEFEM(ModuleName ll, int slot)
|
|
|
+ {
|
|
|
+ if (_efemMovingItems.Exists(item => item.DestinationModule == ll && item.DestinationSlot == slot))
|
|
|
+ return true;
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool IsSlotReservedByTM(ModuleName ll, int slot)
|
|
|
+ {
|
|
|
+ if (_movingItems.Exists(item => item.DestinationModule == ll && item.DestinationSlot == slot))
|
|
|
+ return true;
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private Tuple<int, int> GetLLProcessStatusCount(ModuleName ll)
|
|
|
{
|
|
|
int processedCount = 0;
|
|
@@ -1126,6 +1161,25 @@ namespace Venus_RT.Modules
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ private bool IsForwardPathBlocking(ModuleName mod, int slot)
|
|
|
+ {
|
|
|
+ var wafer = WaferManager.Instance.GetWafer(mod, slot);
|
|
|
+ if (wafer.IsEmpty || wafer.ProcessJob == null || wafer.ProcessJob.Sequence == null || wafer.NextSequenceStep >= wafer.ProcessJob.Sequence.Steps.Count)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ foreach (var next_module in wafer.ProcessJob.Sequence.Steps[wafer.NextSequenceStep].StepModules)
|
|
|
+ {
|
|
|
+ var SlotNumber = GetModuleSlotCount(next_module);
|
|
|
+ for(int i = 0; i < SlotNumber; i++)
|
|
|
+ {
|
|
|
+ if (WaferManager.Instance.CheckNoWafer(next_module, i))
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
private bool ProcessLPEFEMRobotTask(ModuleName lp)
|
|
|
{
|
|
|
// check return
|
|
@@ -1150,14 +1204,20 @@ namespace Venus_RT.Modules
|
|
|
if(_efemMovingItems.Count == 0 && IsReadyPushWaferIn())
|
|
|
{
|
|
|
var outSlots = GetNextWaferInJobQueue(lp);
|
|
|
- foreach (var slot in outSlots)
|
|
|
+
|
|
|
+ var hand = GetEFEMRobotFreeHand();
|
|
|
+ if (hand != Hand.None && outSlots.Count > 0)
|
|
|
{
|
|
|
- var hand = GetEFEMRobotFreeHand();
|
|
|
- if (hand != Hand.None)
|
|
|
- {
|
|
|
- _efemMovingItems.Add(new MoveItem(lp, slot, ModuleName.EfemRobot, (int)hand, hand));
|
|
|
- }
|
|
|
+ _efemMovingItems.Add(new MoveItem(lp, outSlots[0], ModuleName.EfemRobot, (int)hand, hand));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ hand = GetEFEMRobotFreeHand();
|
|
|
+ if (hand != Hand.None && outSlots.Count> 1 && !IsForwardPathBlocking(lp, outSlots[1]))
|
|
|
+ {
|
|
|
+ _efemMovingItems.Add(new MoveItem(lp, outSlots[1], ModuleName.EfemRobot, (int)hand, hand));
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return _efemMovingItems.Count > 0;
|
|
@@ -1473,6 +1533,25 @@ namespace Venus_RT.Modules
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ private void UpateSequenceStep(List<MoveItem> items)
|
|
|
+ {
|
|
|
+ foreach(var item in items)
|
|
|
+ {
|
|
|
+ if(!ModuleHelper.IsTMRobot(item.DestinationModule) && !ModuleHelper.IsEFEMRobot(item.DestinationModule))
|
|
|
+ {
|
|
|
+ var wafer = WaferManager.Instance.GetWafer(item.DestinationModule, item.DestinationSlot);
|
|
|
+ if(!wafer.IsEmpty && (wafer.NextSequenceStep >= wafer.ProcessJob.Sequence.Steps.Count || wafer.ProcessJob.Sequence.Steps[wafer.NextSequenceStep].StepModules.Contains(item.DestinationModule)))
|
|
|
+ {
|
|
|
+ wafer.NextSequenceStep++;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // should not go here
|
|
|
+ LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"UpateSequenceStep() failed, location: {item.DestinationModule}:{item.DestinationSlot}, NextSequenceStep: {wafer.NextSequenceStep}");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
private void CheckWaferArrived()
|
|
|
{
|
|
|
if (_cycleState != RState.Running)
|
|
@@ -1493,18 +1572,12 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
// wafer arrive
|
|
|
_vacWaferTargets.Remove(tar.Key);
|
|
|
- if(!ModuleHelper.IsTMRobot(tar.Key.Module))
|
|
|
- wafer.NextSequenceStep++;
|
|
|
- else
|
|
|
+
|
|
|
+ if (ModuleHelper.IsPm(tar.Key.Module))
|
|
|
{
|
|
|
- LOG.Write(eEvent.WARN_ROUTER, ModuleName.System, $"Wafer {wafer.WaferOrigin} Skip increase NextSequenceStep while move to {tar.Key.Module}");
|
|
|
+ _vacModules[tar.Key.Module].MovingStatus = MovingStatus.WaitProcess;
|
|
|
}
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- // should not go here
|
|
|
- LOG.Write(eEvent.ERR_ROUTINE_FAILED, ModuleName.System, $"wafer {wafer.WaferOrigin} iner id dismatch, before move{tar.Value}, after move {wafer.InnerId}.");
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1514,21 +1587,18 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
foreach(var item in _movingItems)
|
|
|
{
|
|
|
- if(ModuleHelper.IsPm(item.DestinationModule))
|
|
|
- {
|
|
|
- _vacModules[item.DestinationModule].MovingStatus = MovingStatus.WaitProcess;
|
|
|
- }
|
|
|
- else if(ModuleHelper.IsLoadLock(item.DestinationModule))
|
|
|
+ if(_vacModules[item.DestinationModule].MovingStatus == MovingStatus.Moving)
|
|
|
{
|
|
|
_vacModules[item.DestinationModule].MovingStatus = MovingStatus.Idle;
|
|
|
}
|
|
|
|
|
|
- if(ModuleHelper.IsLoadLock(item.SourceModule) || (ModuleHelper.IsPm(item.SourceModule) && _vacModules[item.SourceModule].MovingStatus == MovingStatus.Moving))
|
|
|
+ if(_vacModules[item.SourceModule].MovingStatus == MovingStatus.Moving)
|
|
|
{
|
|
|
_vacModules[item.SourceModule].MovingStatus = MovingStatus.Idle;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ UpateSequenceStep(_movingItems);
|
|
|
_movingItems.Clear();
|
|
|
}
|
|
|
|
|
@@ -1547,9 +1617,6 @@ namespace Venus_RT.Modules
|
|
|
{
|
|
|
// wafer arrive
|
|
|
_atmWaferTargets.Remove(tar.Key);
|
|
|
-
|
|
|
- if (!ModuleHelper.IsEFEMRobot(tar.Key.Module))
|
|
|
- wafer.NextSequenceStep++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1566,6 +1633,7 @@ namespace Venus_RT.Modules
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ UpateSequenceStep(_efemMovingItems);
|
|
|
_efemMovingItems.Clear();
|
|
|
}
|
|
|
}
|