예제 #1
0
        private static IProgcomCPU CreateCPU()
        {
            IProgcomCPU cpu = ProgcomSupport.CreateCPU();

            cpu.Memory[41] = 1024; // vector precision
            cpu.Memory[43] = 16;   // speed precision
            return(cpu);
        }
예제 #2
0
        public ProgcomUnit(ISignalProcessor s)
        {
            mSignalProcessor = s;
            mCPU             = CreateCPU();
            mAssembler       = CreateAssembler();

            IO = new ProgcomIO(this, 32, null);
        }
예제 #3
0
        public ProgcomUnit(ISignalProcessor s)
        {
            mSignalProcessor = s;
            mCPU = CreateCPU();
            mAssembler = CreateAssembler();

            IO = new ProgcomIO(this, 32, null);
        }
예제 #4
0
        public static IProgcomAssembler GetCompatibleAssembler(this IProgcomCPU cpu)
        {
            LoadTypes();
            if (mAssemblerType == null)
            {
                throw new MissingReferenceException("Could not find ProgCom.Assembler2");
            }
            object assembler = mCPUType.InvokeMember("getCompatibleAssembler",
                                                     BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance,
                                                     null, DuckTyping.Uncast(cpu), null);

            return(DuckTyping.Cast <IProgcomAssembler>(assembler));
        }