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