예제 #1
0
파일: MUX2.cs 프로젝트: cephdon/systemsharp
        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
파일: MUX2.cs 프로젝트: cephdon/systemsharp
        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
파일: MUX2.cs 프로젝트: cephdon/systemsharp
 public MUX2TransactionSite(MUX2 host) :
     base(host)
 {
     _host = host;
 }