示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
 public MUX2TransactionSite(MUX2 host) :
     base(host)
 {
     _host = host;
 }
示例#4
0
        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);
        }
示例#5
0
 public MUX2TransactionSite(MUX2 host) :
     base(host)
 {
     _host = host;
 }