public Link(GeneratedCpu inCpu, int inPortNo, GeneratedCpu outCpu, int outPortNo) { this._inCpu = inCpu; this._inPortNo = inPortNo; this._outCpu = outCpu; this._outPortNo = outPortNo; }
public bool removeGroup(GeneratedCpu g) { try { g.disableBarrier(); _groupCpu.Remove(g); _b.RemoveParticipant(); return(true); } catch { return(false); } }
public bool addGroup(GeneratedCpu g) { try { _b.AddParticipant(); _groupCpu.Add(g); g.enableBarrier(_b); return(true); } catch { return(false); } }
public bool addLink(int inPortNo, GeneratedCpu outCpu, int outPortNo) { foreach (Link l in _linkList) { if (l._inPortNo == inPortNo) { return(false); } } Link newL = new Link(this, inPortNo, outCpu, outPortNo); lock (_linkLock){ _linkList.Add(newL); } return(true);//#todo }
public bool generate(int iCpuId) { bool ret = false; try { GeneratedCpu genCpu = new GeneratedCpu(_icpu[iCpuId]._cputype, _icpu[iCpuId].getName()); genCpu.setDebugLockObj(_debugLock); _gcpu.Add(genCpu); ret = true; } catch { } return(ret); }
public bool Exists(GeneratedCpu g) { return(_groupCpu.Contains(g)); }