public IXILMapping TryAllocate(Component host, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes, IProject proj) { if (instr.Name != InstructionCodes.Concat) { return(null); } if (!operandTypes[0].CILType.Equals(typeof(StdLogicVector)) || !resultTypes[0].CILType.Equals(typeof(StdLogicVector))) { return(null); } if (!operandTypes.All(t => t.Equals(operandTypes[0]))) { return(null); } int wordWidth = (int)operandTypes[0].TypeParams[0]; Concatenizer cc = new Concatenizer(operandTypes.Length, wordWidth); return(new ConcatXILMapping(cc)); }
public IEnumerable <IXILMapping> TryMap(ITransactionSite taSite, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes) { var fu = taSite.Host; Concatenizer cc = fu as Concatenizer; if (cc == null) { yield break; } if (instr.Name != InstructionCodes.Concat) { yield break; } if (!operandTypes[0].CILType.Equals(typeof(StdLogicVector)) || !resultTypes[0].CILType.Equals(typeof(StdLogicVector))) { yield break; } if (!operandTypes.All(t => t.Equals(operandTypes[0]))) { yield break; } int wordWidth = (int)operandTypes[0].TypeParams[0]; if (cc.WordWidth != wordWidth || cc.NumWords != operandTypes.Length) { yield break; } yield return(new ConcatXILMapping(cc)); }
public Transactor(Concatenizer host) : base(host) { _host = host; }
public IXILMapping TryAllocate(Component host, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes, IProject proj) { if (instr.Name != InstructionCodes.Concat) return null; if (!operandTypes[0].CILType.Equals(typeof(StdLogicVector)) || !resultTypes[0].CILType.Equals(typeof(StdLogicVector))) return null; if (!operandTypes.All(t => t.Equals(operandTypes[0]))) return null; int wordWidth = (int)operandTypes[0].TypeParams[0]; Concatenizer cc = new Concatenizer(operandTypes.Length, wordWidth); return new ConcatXILMapping(cc); }
public ConcatXILMapping(Concatenizer host) : base(host.TASite, EMappingKind.LightweightResource) { _host = host; }