虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

Auto-Machine-Learning-Methods-Sys

  • 开放式汇编器系统的设计

    汇编器在微处理器的验证和应用中举足轻重,如何设计通用的汇编器一直是研究的热点之一。本文提出了一种开放式的汇编器系统设计思想,在汇编语言与机器语言间插入中间代码CMDL(code mapping description language)语言,打破汇编语言与机器语言的直接映射关系,由此建立起一套描述汇编语言与机器语言的开放式映射体系。基于此开放式映射体系开发了一套汇编器系统,具有较高层次上的通用性和可移植性。【关键词】指令集,CMDL,汇编器,开放式 Design of Retargetable Assembler System Liu Ling Feng Wen Nan Wang Ying Chun Jiang An Ping Ji Li Jiu IME of Peking University, 100871【摘要】An assembler plays a very important role in the field of microprocessor verifications and applications, thus how to build a retargetable assembler system has been a hotspot in this field for long time. This paper presents a new method about the retargetable assembler system design.It provides a kind of language CMDL, code mapping description language. During the process of assembling, assembler languages are firstly translated to CMDL, and then mapped to the machine codes. In an other word, CMDL is inserted between assembler languages and machine codes during the translation procedure. As a medium code, CMDL has a lot of features, such as high extraction, strong descript capabilities. It can describe almost all attributes of assembler languages. By breaking the direct mapping relationship between assembler languages and machine codes, the complexities of machine codes are hided to the users, therefore, the new retargetable assembler system has higher retargetable level by converting the mapping from assembler languages and machine codes to assembler languages and CMDL, and implementationof it becomes easier. Based on the new mapping system structure, a retargetable assemblersystem is developed. It proved the whole system has good retargetability and implantability.【关键词】instruction set, symbol table, assembler, lexical analysis, retargetability

    标签: 开放式 汇编器

    上传时间: 2013-10-10

    上传用户:meiguiweishi

  • PCA9549 Octal bus switch with

    The PCA9549 provides eight bits of high speed TTL-compatible bus switching controlledby the I2C-bus. The low ON-state resistance of the switch allows connections to be madewith minimal propagation delay. Any individual A to B channel or combination of channelscan be selected via the I2C-bus, determined by the contents of the programmable Controlregister. When the I2C-bus bit is HIGH (logic 1), the switch is on and data can flow fromPort A to Port B, or vice versa. When the I2C-bus bit is LOW (logic 0), the switch is open,creating a high-impedance state between the two ports, which stops the data flow.An active LOW reset input (RESET) allows the PCA9549 to recover from a situationwhere the I2C-bus is stuck in a LOW state. Pulling the RESET pin LOW resets the I2C-busstate machine and causes all the bits to be open, as does the internal power-on resetfunction.

    标签: switch Octal 9549 with

    上传时间: 2014-11-22

    上传用户:xcy122677

  • PCA9548A 8 channel I2C bus swi

    The PCA9548A is an octal bidirectional translating switch controlled via the I2C-bus. TheSCL/SDA upstream pair fans out to eight downstream pairs, or channels. Any individualSCx/SDx channel or combination of channels can be selected, determined by thecontents of the programmable control register.An active LOW reset input allows the PCA9548A to recover from a situation where one ofthe downstream I2C-buses is stuck in a LOW state. Pulling the RESET pin LOW resets theI2C-bus state machine and causes all the channels to be deselected as does the internalPower-on reset function.

    标签: channel 9548A 9548 PCA

    上传时间: 2013-10-13

    上传用户:bakdesec

  • 8-bit I2C-bus and SMBus IO port with reset

    The PCA9557 is a silicon CMOS circuit which provides parallel input/output expansion for SMBus and I2C-bus applications. The PCA9557 consists of an 8-bit input port register, 8-bit output port register, and an I2C-bus/SMBus interface. It has low current consumption and a high-impedance open-drain output pin, IO0. The system master can enable the PCA9557’s I/O as either input or output by writing to the configuration register. The system master can also invert the PCA9557 inputs by writing to the active HIGH polarity inversion register. Finally, the system master can reset the PCA9557 in the event of a time-out by asserting a LOW in the reset input. The power-on reset puts the registers in their default state and initializes the I2C-bus/SMBus state machine. The RESET pin causes the same reset/initialization to occur without de-powering the part.

    标签: C-bus SMBus reset port

    上传时间: 2014-01-18

    上传用户:bs2005

  • ADC Oversampling Techniques fo

    Luminary Micro provides an analog-to-digital converter (ADC) module on some members of theStellaris microcontroller family. The hardware resolution of the ADC is 10 bits; however, due to noiseand other accuracy-diminishing factors, the true accuracy is less than 10 bits. This application noteprovides a software-based oversampling technique, resulting in an improved Effective Number OfBits (ENOB) in the conversion result. This document describes methods of oversampling an inputsignal, and the impact on precision and overall system performance.

    标签: Oversampling Techniques ADC fo

    上传时间: 2013-12-17

    上传用户:zhyiroy

  • Using the Stellaris Microcontr

    Luminary Micro Stellaris™ microcontrollers that are equipped with an analog-to-digital converter(ADC), use an innovative sequence-based sampling architecture designed to be extremely flexible,yet easy to use. This application note describes the sampling architecture of the ADC. Sinceprogrammers can configure Stellaris microcontrollers either through the powerful StellarisFamilyDriver Library or through direct writes to the device's control registers, this application note describesboth methods. The information presented in this document is intended to complement the ADCchapter of the device datasheet, and assumes the reader has a basic understanding of howADCsfunction.

    标签: Microcontr Stellaris Using the

    上传时间: 2013-10-14

    上传用户:blans

  • USB Demonstration for DK3200 w

    The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 MicrocontrollerCore. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementationof the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision1.1.This application note describes a demonstration program that has been written for the DK3200 hardwaredemonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to workwith the device, using the HID class as a ready-made device driver for the USB connection.IN-APPLICATION-PROGRAMMING (IAP) AND IN-SYSTEM-PROGRAMMING (ISP)Since the μPSD contains two independent Flash memory arrays, the Micro Controller Unit (MCU) can executecode from one memory while erasing and programming the other. Product firmware updates in thefield can be reliably performed over any communication channel (such as CAN, Ethernet, UART, J1850)using this unique architecture. For In-Application-Programming (IAP), all code is updated through theMCU. The main advantage for the user is that the firmware can be updated remotely. The target applicationruns and takes care on its own program code and data memory.IAP is not the only method to program the firmware in μPSD devices. They can also be programmed usingIn-System-Programming (ISP). A IEEE1149.1-compliant JTAG interface is included on the μPSD. Withthis, the entire device can be rapidly programmed while soldered to the circuit board (Main Flash memory,Secondary Boot Flash memory, the PLD, and all configuration areas). This requires no MCU participation.The MCU is completely bypassed. So, the μPSD can be programmed or reprogrammed any time, anywhere, even when completely uncommitted.Both methods take place with the device in its normal hardware environment, soldered to a printed circuitboard. The IAP method cannot be used without previous use of ISP, because IAP utilizes a small amountof resident code to receive the service commands, and to perform the desired operations.

    标签: Demonstration 3200 USB for

    上传时间: 2014-02-27

    上传用户:zhangzhenyu

  • 87C576微控制器的在线编程

    The 87C576 includes two separate methods of programming theEPROM array, the traditional modified Quick-Pulse method, and anew On-Board Programming technique (OBP).Quick Pulse programming is a method using a number of devicepins in parallel (see Figure 1) and is the traditional way in which87C51 family members have been programmed. The Quick-Pulsemethod supports the following programming functions:– program USER EPROM– verify USER EPROM– program KEY EPROM– program security bits– verify security bits– read signature bytesThe Quick-Pulse method is quite easily suited to standardprogramming equipment as evidenced by the numerous vendors of87C51 compatible programmers on the market today. Onedisadvantage is that this method is not well suited to programming inthe embedded application because of the large number of signallines that must be isolated from the application. In addition, parallelsignals from a programmer would need to be cabled to theapplication’s circuit board, or the application circuit board wouldneed to have logic built-in to perform the programming functions.These requirements have generally made in-circuit programmingusing the modified Quick Pulse method impractical in almost all87C51 family applications.

    标签: 87C576 微控制器 编程

    上传时间: 2013-10-21

    上传用户:xiaozhiqban

  • 驱动程序与应用程序的接口

    有两种方式可以让设备和应用程序之间联系:1. 通过为设备创建的一个符号链;2. 通过输出到一个接口WDM驱动程序建议使用输出到一个接口而不推荐使用创建符号链的方法。这个接口保证PDO的安全,也保证安全地创建一个惟一的、独立于语言的访问设备的方法。一个应用程序使用Win32APIs来调用设备。在某个Win32 APIs和设备对象的分发函数之间存在一个映射关系。获得对设备对象访问的第一步就是打开一个设备对象的句柄。 用符号链打开一个设备的句柄为了打开一个设备,应用程序需要使用CreateFile。如果该设备有一个符号链出口,应用程序可以用下面这个例子的形式打开句柄:hDevice = CreateFile("\\\\.\\OMNIPORT3",  GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ,  NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL ,NULL);文件路径名的前缀“\\.\”告诉系统本调用希望打开一个设备。这个设备必须有一个符号链,以便应用程序能够打开它。有关细节查看有关Kdevice和CreateLink的内容。在上述调用中第一个参数中前缀后的部分就是这个符号链的名字。注意:CreatFile中的第一个参数不是Windows 98/2000中驱动程序(.sys文件)的路径。是到设备对象的符号链。如果使用DriverWizard产生驱动程序,它通常使用类KunitizedName来构成设备的符号链。这意味着符号链名有一个附加的数字,通常是0。例如:如果链接名称的主干是L“TestDevice”那么在CreateFile中的串就该是“\\\\.\\TestDevice0”。如果应用程序需要被覆盖的I/O,第六个参数(Flags)必须或上FILE_FLAG_OVERLAPPED。 使用一个输出接口打开句柄用这种方式打开一个句柄会稍微麻烦一些。DriverWorks库提供两个助手类来使获得对该接口的访问容易一些,这两个类是CDeviceInterface, 和 CdeviceInterfaceClass。CdeviceInterfaceClass类封装了一个设备信息集,该信息集包含了特殊类中的所有设备接口信息。应用程序能有用CdeviceInterfaceClass类的一个实例来获得一个或更多的CdeviceInterface类的实例。CdeviceInterface类是一个单一设备接口的抽象。它的成员函数DevicePath()返回一个路径名的指针,该指针可以在CreateFile中使用来打开设备。下面用一个小例子来显示这些类最基本的使用方法:extern GUID TestGuid;HANDLE OpenByInterface(  GUID* pClassGuid,  DWORD instance,  PDWORD pError){  CDeviceInterfaceClass DevClass(pClassGuid, pError);  if (*pError != ERROR_SUCCESS)    return INVALID_HANDLE_VALUE;  CDeviceInterface DevInterface(&DevClass, instance, pError);  if (*pError != ERROR_SUCCESS)    return INVALID_HANDLE_VALUE;  cout << "The device path is "    << DevInterface.DevicePath()    << endl;   HANDLE hDev;  hDev = CreateFile(   DevInterface.DevicePath(),    GENERIC_READ | GENERIC_WRITE,    FILE_SHARE_READ | FILE_SHARE_WRITE,    NULL,    OPEN_EXISTING,    FILE_ATTRIBUTE_NORMAL,    NULL  );  if (hDev == INVALID_HANDLE_VALUE)    *pError = GetLastError();  return hDev;} 在设备中执行I/O操作一旦应用程序获得一个有效的设备句柄,它就能使用Win32 APIs来产生到设备对象的IRPs。下面的表显示了这种对应关系。Win32 API  DRIVER_FUNCTION_xxxIRP_MJ_xxx  KDevice subclass member function CreateFile  CREATE  Create ReadFile  READ  Read WriteFile  WRITE  Write DeviceIoControl  DEVICE_CONTROL  DeviceControl CloseHandle  CLOSECLEANUP  CloseCleanUp 需要解释一下设备类成员的Close和CleanUp:CreateFile使内核为设备创建一个新的文件对象。这使得多个句柄可以映射同一个文件对象。当这个文件对象的最后一个用户级句柄被撤销后,I/O管理器调用CleanUp。当没有任何用户级和核心级的对文件对象的访问的时候,I/O管理器调用Close。如果被打开的设备不支持指定的功能,则调用相应的Win32将引起错误(无效功能)。以前为Windows95编写的VxD的应用程序代码中可能会在打开设备的时候使用FILE_FLAG_DELETE_ON_CLOSE属性。在Windows NT/2000中,建议不要使用这个属性,因为它将导致没有特权的用户企图打开这个设备,这是不可能成功的。I/O管理器将ReadFile和WriteFile的buff参数转换成IRP域的方法依赖于设备对象的属性。当设备设置DO_DIRECT_IO标志,I/O管理器将buff锁住在存储器中,并且创建了一个存储在IRP中的MDL域。一个设备可以通过调用Kirp::Mdl来存取MDL。当设备设置DO_BUFFERED_IO标志,设备对象分别通过KIrp::BufferedReadDest或 KIrp::BufferedWriteSource为读或写操作获得buff地址。当设备不设置DO_BUFFERED_IO标志也不设置DO_DIRECT_IO,内核设置IRP 的UserBuffer域来对应ReadFile或WriteFile中的buff参数。然而,存储区并没有被锁住而且地址只对调用进程有效。驱动程序可以使用KIrp::UserBuffer来存取IRP域。对于DeviceIoControl调用,buffer参数的转换依赖于特殊的I/O控制代码,它不在设备对象的特性中。宏CTL_CODE(在winioctl.h中定义)用来构造控制代码。这个宏的其中一个参数指明缓冲方法是METHOD_BUFFERED, METHOD_IN_DIRECT, METHOD_OUT_DIRECT, 或METHOD_NEITHER。下面的表显示了这些方法和与之对应的能获得输入缓冲与输出缓冲的KIrp中的成员函数:Method  Input Buffer Parameter  Output Buffer Parameter METHOD_BUFFERED  KIrp::IoctlBuffer KIrp::IoctlBuffer METHOD_IN_DIRECT  KIrp::IoctlBuffer KIrp::Mdl METHOD_OUT_DIRECT  KIrp::IoctlBuffer KIrp::Mdl METHOD_NEITHER  KIrp::IoctlType3InputBuffer KIrp::UserBuffer 如果控制代码指明METHOD_BUFFERED,系统分配一个单一的缓冲来作为输入与输出。驱动程序必须在向输出缓冲放数据之前拷贝输入数据。驱动程序通过调用KIrp::IoctlBuffer获得缓冲地址。在完成时,I/O管理器从系统缓冲拷贝数据到提供给Ring 3级调用者使用的缓冲中。驱动程序必须在结束前存储拷贝到IRP的Information成员中的数据个数。如果控制代码不指明METHOD_IN_DIRECT或METHOD_OUT_DIRECT,则DeviceIoControl的参数呈现不同的含义。参数InputBuffer被拷贝到一个系统缓冲,这个缓冲驱动程序可以通过调用KIrp::IoctlBuffer。参数OutputBuffer被映射到KMemory对象,驱动程序对这个对象的访问通过调用KIrp::Mdl来实现。对于METHOD_OUT_DIRECT,调用者必须有对缓冲的写访问权限。注意,对METHOD_NEITHER,内核只提供虚拟地址;它不会做映射来配置缓冲。虚拟地址只对调用进程有效。这里是一个用METHOD_BUFFERED的例子:首先,使用宏CTL_CODE来定义一个IOCTL代码:#define IOCTL_MYDEV_GET_FIRMWARE_REV \CTL_CODE (FILE_DEVICE_UNKNOWN,0,METHOD_BUFFERED,FILE_ANY_ACCESS)现在使用一个DeviceIoControl调用:BOOLEAN b;CHAR FirmwareRev[60];ULONG FirmwareRevSize;b = DeviceIoControl(hDevice, IOCTL_MYDEV_GET_VERSION_STRING,  NULL, // no input  注意,这里放的是包含有执行操作命令的字符串指针  0, FirmwareRev,      //这里是output串指针,存放从驱动程序中返回的字符串。sizeof(FirmwareRev),& FirmwareRevSize,  NULL // not overlapped I/O );如果输出缓冲足够大,设备拷贝串到里面并将拷贝的资结束设置到FirmwareRevSize中。在驱动程序中,代码看起来如下所示:const char* FIRMWARE_REV = "FW 16.33 v5";NTSTATUS MyDevice::DeviceControl( KIrp I ){  ULONG fwLength=0;  switch ( I.IoctlCode() )  {    case IOCTL_MYDEV_GET_FIRMWARE_REV:      fwLength = strlen(FIRMWARE_REV)+1;      if (I.IoctlOutputBufferSize() >= fwLength)      {        strcpy((PCHAR)I.IoctlBuffer(),FIRMWARE_REV);        I.Information() = fwLength;         return I.Complete(STATUS_SUCCESS);      }      else      {              }    case . . .   } }

    标签: 驱动程序 应用程序 接口

    上传时间: 2013-10-17

    上传用户:gai928943

  • 子空间模式识别方法

    提出了一种改进的LSM-ALSM子空间模式识别方法,将LSM的旋转策略引入ALSM,使子空间之间互不关联的情况得到改善,提高了ALSM对相似样本的区分能力。讨论中以性能函数代替经验函数来确定拒识规则的参数,实现了识别率、误识率与拒识率之间的最佳平衡;通过对有限字符集的实验结果表明,LSM-ALSM算法有效地改善了分类器的识别率和可靠性。关 键 词 学习子空间; 性能函数; 散布矩阵; 最小描述长度在子空间模式识别方法中,一个线性子空间代表一个模式类别,该子空间由反映类别本质的一组特征矢量张成,分类器根据输入样本在各子空间上的投影长度将其归为相应的类别。典型的子空间算法有以下三种[1, 2]:CLAFIC(Class-feature Information Compression)算法以相关矩阵的部分特征向量来构造子空间,实现了特征信息的压缩,但对样本的利用为一次性,不能根据分类结果进行调整和学习,对样本信息的利用不充分;学习子空间方法(Leaning Subspace Method, LSM)通过旋转子空间来拉大样本所属类别与最近邻类别的距离,以此提高分类能力,但对样本的训练顺序敏感,同一样本训练的顺序不同对子空间构造的影响就不同;平均学习子空间算法(Averaged Learning Subspace Method, ALSM)是在迭代训练过程中,用错误分类的样本去调整散布矩阵,训练结果与样本输入顺序无关,所有样本平均参与训练,其不足之处是各模式的子空间之间相互独立。针对以上问题,本文提出一种改进的子空间模式识别方法。子空间模式识别的基本原理1.1 子空间的分类规则子空间模式识别方法的每一类别由一个子空间表示,子空间分类器的基本分类规则是按矢量在各子空间上的投影长度大小,将样本归类到最大长度所对应的类别,在类x()iω的子空间上投影长度的平方为()211,2,,()argmax()jMTkkjpg===Σx􀀢 (1)式中 函数称为分类函数;为子空间基矢量。两类的分类情况如图1所示。

    标签: 子空间 模式 识别方法

    上传时间: 2013-12-25

    上传用户:熊少锋