public IXILMapping TryAllocate(Component host, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes, IProject proj) { if (instr.Name != InstructionCodes.Select) { return(null); } int width = TypeLowering.Instance.GetWireWidth(operandTypes[1]); MUX2 mux2 = new MUX2(width); return(new MUX2XILMapping(mux2.TASite)); }
public IEnumerable <IXILMapping> TryMap(ITransactionSite taSite, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes) { var fu = taSite.Host; MUX2 mux2 = fu as MUX2; if (mux2 == null) { yield break; } if (instr.Name != InstructionCodes.Select) { yield break; } int width = TypeLowering.Instance.GetWireWidth(operandTypes[1]); if (width != mux2.Width) { yield break; } yield return(new MUX2XILMapping(mux2.TASite)); }
public MUX2TransactionSite(MUX2 host) : base(host) { _host = host; }
public IXILMapping TryAllocate(Component host, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes, IProject proj) { if (instr.Name != InstructionCodes.Select) return null; int width = TypeLowering.Instance.GetWireWidth(operandTypes[1]); MUX2 mux2 = new MUX2(width); return new MUX2XILMapping(mux2.TASite); }