示例#1
0
        public IXILMapping TryAllocate(Component host, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes, IProject targetProject)
        {
            if (instr.Name != InstructionCodes.Abs)
            {
                return(null);
            }

            var operandFormat = operandTypes[0].GetFixFormat();

            if (operandFormat == null)
            {
                return(null);
            }

            var resultFormat = resultTypes[0].GetFixFormat();

            if (resultFormat == null)
            {
                return(null);
            }

            if (operandFormat.FracWidth != resultFormat.FracWidth)
            {
                return(null);
            }

            var fu = new FixedAbs(
                operandFormat.TotalWidth,
                resultFormat.TotalWidth,
                ComputeLatency(operandFormat.TotalWidth, resultFormat.TotalWidth));

            return(new AbsMapping(fu));
        }
示例#2
0
 public TASiteImpl(FixedAbs host) :
     base(host)
 {
     _host = host;
 }
示例#3
0
        public IXILMapping TryAllocate(Component host, XILInstr instr, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes, IProject targetProject)
        {
            if (instr.Name != InstructionCodes.Abs)
                return null;

            var operandFormat = operandTypes[0].GetFixFormat();
            if (operandFormat == null)
                return null;

            var resultFormat = resultTypes[0].GetFixFormat();
            if (resultFormat == null)
                return null;

            if (operandFormat.FracWidth != resultFormat.FracWidth)
                return null;

            var fu = new FixedAbs(
                operandFormat.TotalWidth, 
                resultFormat.TotalWidth,
                ComputeLatency(operandFormat.TotalWidth, resultFormat.TotalWidth));
            return new AbsMapping(fu);
        }
示例#4
0
 public AbsMapping(FixedAbs fu)
 {
     _fu = fu;
 }
示例#5
0
 public TASiteImpl(FixedAbs host) :
     base(host)
 {
     _host = host;
 }
示例#6
0
 public AbsMapping(FixedAbs fu)
 {
     _fu = fu;
 }