cetk使用方法--nand flash测试

测试环境:

OS:

    wince5.0

cpu:

    J9

image:

    ramimage(开始是一个binfs分区存放ramimage,后面是一个fat分区存放user data,它们公用一个块驱动)

note:

    具体测试command的书写要参照注册表的配置。

    本文中频繁用到的smflash,是设备名,即传递给CreateFile和OpenStore的实参,如果不确定你块驱动的设备名,可以在AP中通过FindFirstStore以及FindNextStore的方式将其遍历出来。

    因为之前发了一篇存在诸多问题,所以重新排版和修改了其中的大部分错误,并附上我的注册表配置。

 

CETK使用方法—NAND Flash(一个块驱动并且将Image放到该块驱动上)

1. 对测试有用的TUX关键词

TUX语法中的关键词有很多,其中用来制定传递给TUX DLL(即测试DLL,如flashwear.dll)的关键词是-c,详细解释如下:

-c parameters

This parameter allows you to pass a parameter string to the Tux test DLL itself. The parameter string that you pass is associated with the DLL most recently specified with the -d parameter. This behavior allows you to specify different parameters for each Tux test DLL. If the string that you specify contains spaces or other special characters, then you should surround the string with quotation marks.

       在上面的文字中说的很清楚,-c用来传递参数给-d指定的tux dll,如果传递的参数中包含了空格,则应用引号将参数包起来。

       如下:

       详细的TUX语法参照如下地址:

ms-help://MS.WindowsCE.500/wcedebug5/html/wce50conTuxCommandLineParameters.htm

2. FSD测试

命令

默认命令+-c “-zorch -p msflash”

细节

详细解释如下。

-zorch: If you run the unmodified test, it will fail. In the results file you will see a message warning you to back up data on all cards and disks that are attached to the testing device before running the test. It then instructs you to modify the command line by right clicking on the test in the CETK tree control, choosing Edit Command Line, and adding the following switch to the command line: -zorch

可见参数-zorch告诉测试DLL在不备份磁盘数据的情况下进行测试。因为测试会毁坏测试磁盘上的文件,所以有此命令参数。

-pSpecify the storage profile to which to restrict testing, found in the registry under the HKEY_LOCAL_MACHINE/System/StorageManager/Profiles key. The default storage profile is PCMCIA.

可见参数-p告诉了测试项到HKEY_LOCAL_MACHINE/System/StorageManager下的哪个测试项下搜索相关信息。

如果磁盘上有多个分区的话,还要使用-r传递分区名,相关解释如下:Specify the root directory in which to run the test. If you provide this option, the test only runs in the specified directory and ignores the –s and –p options. This flag is useful for a file system driver that does not use storage profiles such as a network file system driver. If the name of the root directory includes spaces, surround the name of the directory with single quotation marks; for example, -r '/Storage Card'.

更加详细的参数介绍参照:

ms-help://MS.WindowsCE.500/wcedebug5/html/wce50tskModifyingtheFileSystemDriverTest.htm

3. disktest测试项

命令:

tux -o -d disktest -c "/disk msflash /oldioctls /maxsectors 128 /store /zorch /profile msflash"

细节:

从理论上来说,TUX调用disktest.dll对块驱动进行测试的时候,只需要调用打开块驱动获取操作Handle,然后调用DSK_IoControl进行读写就可以了。但是,实际操作过程中发现由于smflash.dllStorage Manager进行加载,所以无法使用CreateFile获取块驱动的操作句柄,而必须调用OpenStore

PB帮助文档中在介绍通过传递给TUX DLL参数决定使用CreateFile还是OpenStore打开块驱动的时候,提到如下内容:

/store

Specify that the test opens a handle to the disk by using the OpenStore function instead of the CreateFile function.

Opening a handle by using the OpenStore function is not required to test block driver functionality. However, it is useful for testing a storage device that Filesys.exe loads automatically if you cannot open the storage device as a stream device. For example, you can open a handle to a flash driver for ROM by using the OpenStore function.

代码中可以找到如下的

HANDLE

OpenDevice(

    LPCTSTR pszDiskName)

// --------------------------------------------------------------------

{

    // open the device as either a store or a stream device

    if(g_fOpenAsStore[Passion1] )

    {

        return OpenStore(pszDiskName);

    }

    else

    {

        return CreateFile(pszDiskName, GENERIC_READ, FILE_SHARE_READ,

                NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

    }

}

       关于/disk dsk*,帮助文档中提到:

Specify the device name of the disk to be tested.

If you do not specify this parameter, the test probes for a mass storage disk on devices DSK1-9. Specifying this parameter overrides the automatic detection process and forces the test to use the disk that you specify.

可以看到,如果不配置/disk的参数的话,系统就会去搜索所有的dsk1~9。其实不是这么回事,这个地方有两个错误:

>> /disk的参数描述不正确

正确的描述应该如下:

参数

获取块驱动的操作句柄

/disk

CreateFile(DSK1~9)

/disk ***

CreateFile(***)

/disk *** /store

OpenStore(***)

/disk /store

通过设备管理器发送STORE_MOUNT_GUIDStore,具体参照DEV_DetectFirstDevice(&STORE_MOUNT_GUID, szDisk, MAX_PATH)

/store

通过设备管理器发送BLOCK_DRIVER_GUID的块驱动,DEV_DetectFirstDevice(&BLOCK_DRIVER_GUID, szDisk, MAX_PATH)

>> /disk***描述不正确

       ***是任意可以传递给OpenStore或者CreateFile的参数。

       详细的参数如下:

tux -o -d disktest -c "/disk msflash /oldioctls /maxsectors 128 /store /zorch /profile msflash"

 

>> 传递Command但是TUX DLL的解析有问题

TUX DLL最开始的Log信息中看到如下的信息:

TUXMAIN.CPP: DLL_PROCESS_ATTACH

ShellProc(SPM_LOAD_DLL, ...) calledDISKTEST: Usage: tux -o -d disktest -c"/disk <disk> /profile <profile> /maxsectors <count> /oldioctls"       /disk <disk>        : name of the disk to test (e.g. DSK1:); default = first detected disk       /profile <profile>  : limit to devices of the specified storage profile; default = all profiles       /maxsectors <count> : maximum number of sectors per operation; default = 128       /oldioctls          : use legacy DISK_IOCTL_* codes       /store              : open the disk using the OpenStore() APIShellProc(SPM_SHELL_INFO, ...) calledCommand Line: "/disk msflash /oldioctls /maxsectors 128 /store /zorch /profile msflash".

DISKTEST: Disk Device Name = msflash[Passion2] 

DISKTEST: Forcing use of legacy DISK_IOCTL* style control codes

DISKTEST: Will open disk as a store (using OpenStore())

DISKTEST: Max Sectors per operation = 128

ShellProc(SPM_REGISTER, ...) called<TESTGROUP>

       但是有的时候你给/disk传递的参数TUX DLL解析不出来,经过反复实践,下面的一条命令是万能命令:

tux -o -d disktest -c "/disk msflash /oldioctls /maxsectors 128 /store /zorch /profile msflash"

       保证可以解析出来device name

       仔细的看了看源代码,但是还是没有找到原因。从源代码上来看,这些解析工作由函数ProcessCmdLine调用类CClParse的成员函数来实现,不存在任何问题。

4. Flashwear测试

 

命令

默认命令+-c”/zorch /profile msflash /store /disk msflash”或者/disk msflash /repeat 1 /sectors 64 /store都行

同时需要修改注册表。修改Flash注册表的ProfileFlashDisk,这是Microsoft Flashwear 测试DLLBug引起的。Flashwear的参数意义和DiskTest一致,同样它也存在Bug

细节

详细如下:

 

SHELLPROCAPI ShellProc(UINT uMsg, SPPARAM spParam)

{

    LPSPS_BEGIN_TEST    pBT;

    LPSPS_END_TEST      pET;

      

    switch (uMsg)

    {

       case SPM_SHELL_INFO:

              // Sent once to the DLL immediately after SPM_LOAD_DLL to give the DLL

              // some useful information about its parent shell and environment. The

              // spParam parameter will contain a pointer to a SPS_SHELL_INFO

              // structure. The pointer to the structure may be stored for later use

              // as it will remain valid for the life of this Tux Dll. The DLL may

              // return SPR_FAIL to prevent the DLL from continuing to load.

              Debug(TEXT("ShellProc(SPM_SHELL_INFO, ...) called"));

             

              // Store a pointer to our shell info for later use.

              g_pShellInfo = (LPSPS_SHELL_INFO)spParam;

              Initialize();   

              break;

       //...

       }

       //...

}}

 

 

//check its profile

if(!DeviceIoControl(hDisk, IOCTL_DISK_DEVICE_INFO[Passion3] , &sdi, sizeof(STORAGEDEVICEINFO), NULL, 0, &cbReturned, NULL))

{

    g_pKato->Log(LOG_DETAIL, _T("device /"%s/" does not support IOCTL_DISK_DEVICE_INFO (required for /profile option); error %u"), szDisk, GetLastError());

    VERIFY(CloseHandle(hDisk));

    hDisk = INVALID_HANDLE_VALUE;

    continue;

}

else

{

    // check for a profile match

    if(0 != wcsicmp(_T("FlashDisk"), sdi.szProfile))[Passion4] 

    {

        g_pKato->Log(LOG_DETAIL, _T("device /"%s/" profile /"%s/" does not match specified profile /"FlashDisk/""), szDisk, sdi.szProfile);

        VERIFY(CloseHandle(hDisk));

        hDisk = INVALID_HANDLE_VALUE;

        continue;

    }

}

       如果Profile不是FlashDisk,则操作的时候会出现如下的错误Log信息:

opening a handle to storage device "msflash" OpenStore("msflash") device "msflash" profile "MSFlash" does not match specified profile "FlashDisk!" !!!msflash is not a MSFlash device, we have to re-enumerate the system to find one!!! ERROR: found no mass storage devices!

!!!ERROR: There's no MSFlash device in the system!!! FLSHWEAR: using "" disk device

       另外,在测试Sector>=2048的块设备驱动的时候,该测试Item1~124项会全部Failed。原因是Tux Dll的设计Bug造成,这部分代码如下:

       从下面的代码中可以看到,首先根据测试sector的个数,申请两段buffer,一段用来存放待写入的数据,一段用来存放读出的数据。

然后将写Buffer pWriteBuffer初始化,并调用Dsk_WriteSectors将数据写入到块驱动上;

最后调用Dsk_ReadSectors将数据从块驱动上读取,并比较是否一致。

BOOL ReadWritePerf(HANDLE hDisk, DWORD startSector, DWORD cSectors, DWORD cBytes)

{

    BOOL fRet = FALSE;

    BYTE *pWriteBuffer = NULL;

    BYTE *pReadBuffer = NULL;

 

    pWriteBuffer = new BYTE[cBytes];

    if(NULL == pWriteBuffer) {

        ERRFAIL("new BYTE[]");

        goto done;

    }

 

    pReadBuffer = new BYTE[cBytes];

    if(NULL == pReadBuffer) {

        ERRFAIL("new BYTE[]");

        goto done;

    }

   

    memset(pWriteBuffer, (BYTE)Random(), cBytes);

 

    if(g_pWritePerfLog) g_pWritePerfLog->StartTick();

    if(!Dsk_WriteSectors(hDisk, startSector, cSectors, pWriteBuffer)) {

        if(g_pWritePerfLog) g_pWritePerfLog->EndTick();

        ERRFAIL("Dsk_WriteSectors()");

        goto done;

    }

    if(g_pWritePerfLog) g_pWritePerfLog->EndTick();

 

    if(g_pReadPerfLog) g_pReadPerfLog->StartTick();

    if(!Dsk_ReadSectors(hDisk, startSector, cSectors, pReadBuffer)) {

        if(g_pReadPerfLog) g_pReadPerfLog->EndTick();   

        ERRFAIL("Dsk_ReadSectors()");

        goto done;

    }

    if(g_pReadPerfLog) g_pReadPerfLog->EndTick();

 

    if(0 != memcmp(pWriteBuffer, pReadBuffer, cBytes)) {

        LOG(L"bad data while reading %u sectors at sector %u", cSectors, startSector);

        ERRFAIL("data read is different from data written");

        goto done;

    }

 

    if(g_fDelete) {

        if(!Dsk_DeleteSectors(hDisk, startSector, cSectors)) {

            ERRFAIL("Dsk_DeleteSectors()");

            goto done;

        }

    }

 

    fRet = TRUE;

done:

    if(NULL != pReadBuffer) {

        delete[] pReadBuffer;

    }

    if(NULL != pWriteBuffer) {

        delete[] pWriteBuffer;

    }

    return fRet;

}

       上面描述的流程是没有问题的,但是下面的读函数Dsk_ReadSectors和写函数Dsk_WriteSectors却有问题,即读写数据的长度都是cSectors * DEF_SECTOR_SIZE[Passion5] ,而不是cBytescSectors*Sector_size。这将直接影响到上面函数ReadWritePerf中对读写数据的比较,导致测试结果出错。

       简单说,就是对于Sector>=512字节的情况,会导致测试Failed

BOOL Dsk_WriteSectors(HANDLE hDisk, DWORD startSector, DWORD cSectors, PBYTE pData)

{

    BOOL fRet;

    SG_REQ sgReq;

    DWORD cBytes;

 

    // build sg request buffer -- single sg buffer

    sgReq.sr_start = startSector;

    sgReq.sr_num_sec = cSectors;

    sgReq.sr_num_sg = 1;

    sgReq.sr_callback = NULL; // no callback under CE

    sgReq.sr_sglist[0].sb_len = cSectors * DEF_SECTOR_SIZE[Passion6] ;

    sgReq.sr_sglist[0].sb_buf = pData;

 

    fRet = DeviceIoControl(hDisk, DISK_IOCTL_WRITE, &sgReq, sizeof(sgReq), NULL, 0, &cBytes, NULL);

 

    if(FALSE == fRet) {

        g_pKato->Log(LOG_COMMENT, L"FAILED: DeviceIoControl(0x%08x, DISK_IOCTL_WRITE) failed error %u", hDisk, GetLastError());

        fRet = DeviceIoControl(hDisk, IOCTL_DISK_WRITE, &sgReq, sizeof(sgReq), NULL, 0, &cBytes, NULL);

    }

 

    if(FALSE == fRet) {

        g_pKato->Log(LOG_DETAIL, L"FAILED: DeviceIoControl(0x%08x, IOCTL_DISK_WRITE) failed error %u", hDisk, GetLastError());

    }

 

    return fRet;

}

 

BOOL Dsk_ReadSectors(HANDLE hDisk, DWORD startSector, DWORD cSectors, PBYTE pData)

{

    BOOL fRet;

    SG_REQ sgReq;

    DWORD cBytes;

 

    // build sg request buffer -- single sg buffer

    sgReq.sr_start = startSector;

    sgReq.sr_num_sec = cSectors;

    sgReq.sr_num_sg = 1;

    sgReq.sr_callback = NULL; // no callback under CE

    sgReq.sr_sglist[0].sb_len = cSectors * DEF_SECTOR_SIZE[Passion7] ;

    sgReq.sr_sglist[0].sb_buf = pData;

 

    fRet = DeviceIoControl(hDisk, DISK_IOCTL_READ, &sgReq, sizeof(sgReq), NULL, 0, &cBytes, NULL);

 

    if(FALSE == fRet) {

        g_pKato->Log(LOG_COMMENT, L"FAILED: DeviceIoControl(0x%08x, DISK_IOCTL_READ) failed error %u", hDisk, GetLastError());

        fRet = DeviceIoControl(hDisk, IOCTL_DISK_READ, &sgReq, sizeof(sgReq), NULL, 0, &cBytes, NULL);

    }

 

    if(FALSE == fRet) {

        g_pKato->Log(LOG_DETAIL, L"FAILED: DeviceIoControl(0x%08x, IOCTL_DISK_READ) failed error %u", hDisk, GetLastError());

    }

   

    return fRet;

}

 

       解决方法就是重新Build Flashwear测试的源码,修改上述的Bug

5. rw_allrwtest

这两种测试的TUX DLL,同样存在Bug,它只会去以CreateFile的方式打开流驱动,并获取其操作句柄,实际上对于Mulitple-bin的情况,需要调用OpenStore,这是因为smflash.dll是由storage manager加载。

具体修改的方法在此不再赘述。

 

附注册表配置:

; HIVE BOOT SECTION

 

[HKEY_LOCAL_MACHINE/System/StorageManager/AutoLoad/MSFlash]

       "DriverPath"="Drivers//BuiltIn//MSFlash"

       "Order"=dword:0

       "MountFlags"=dword:11

       "LoadFlags"=dword:1 ;load synchronously

       "BootPhase"=dword:0

       "Flags"=dword:1000

      

[HKEY_LOCAL_MACHINE/Drivers/BuiltIn/MSFlash]

       "Prefix"="DSK"

       "Order"=dword:0

       "Dll"="smflash.dll"       

       "Profile"="FlashDisk"

       "FriendlyName"="MSFLASH Driver"

       "BootPhase"=dword:0

IF BSP_USE_HIVE_REGISTRY

       "Flags"=dword:1000

ENDIF

      

[HKEY_LOCAL_MACHINE/System/StorageManager/BinFS]

       "FriendlyName"="BIN Filesystem"

       "Dll"="binfs.dll"

       "Paging"=dword:1

       "Order"=dword:0 

       "MountFlags"=dword:10 ;specifies to mount as an external rom file system

                                          ;if set to 11, it will be an hidden file system like mitac solution

       "BootPhase"=dword:0

      

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDisk]

       "DefaultFileSystem"="BINFS"

       "PartitionDriver"="mspart.dll"

       "AutoMount"=dword:1

       "AutoPart"=dword:1

       "Folder"="NandFlash"

       "Name"="Microsoft Flash Disk"

       "BootPhase"=dword:0

IF BSP_USE_HIVE_REGISTRY

       "Flags"=dword:1000

ENDIF

       "MountAsHidden"=dword:1

       "MountAsRom"=dword:1

      

[HKEY_LOCAL_MACHINE/System/StorageManager/FATFS]

       "Flags"=dword:00000014                     ; FATFS_ENABLE_BACKUP_FAT | FATFS_DISABLE_AUTOSCAN

       "CheckForFormat"=dword:1

       "EnableWriteBack"=dword:1

       "MountAsRoot"=dword:1             ; for ROM-only file system   

       "DisableAutoScan"=dword:1

      

[HKEY_LOCAL_MACHINE/System/StorageManager/Profiles/FlashDisk/FATFS]

       "FriendlyName"="FAT FileSystem"

       "Dll"="fatfsd.dll"

       "Flags"=dword:00280014

       "Paging"=dword:1

       "CacheSize"=dword:0

       "EnableCacheWarm"=dword:0

       "EnableCache"=dword:1

IF BSP_USE_HIVE_REGISTRY

       "MountAsBootable"=dword:1 ;Specifies that the file system may contain the system registry

ENDIF

       "MountAsRom"=dword:1  ;Specifies to mount as an external ROM file system

       "MountAsRoot"=dword:1 ;Specifies to mount as the root of the file system

      

 

任何问题欢迎给我留言或者发邮件到guopeixin@126.com进行讨论。


 [Passion1]这个值其实就是通过/store来进行控制

 [Passion2]这里就设Device Name

 [Passion3]这里透过DeviceIoControl调用IOCTL_DISK_DEVICE_INFO [Passion3]来获取测试块驱动的Profile

 [Passion4]这里是flash wear tux dll的一个Bug,应该将该行代码注释掉

 [Passion5]这里的值错误,应该根据实际的块驱动赋值

 [Passion6]这里的值错误,应该根据实际的块驱动赋值

 [Passion7]这里的值同样错误,应该根据实际的块驱动赋值

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/243346.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

如是•吴震寰个展

如是 • 吴震寰个展。我把他的创作称为&#xff02;元艺术&#xff0f;元创作&#xff02;。他用看似简单幼稚平凡的笔墨和行为&#xff0c;将前人积累的艺术经验&#xff0c;当然也包括他自己的经验全部抹杀和归零。让绘画和艺术回到原始的岩画时代&#xff0c;回到自己幼时产…

VGA显示器驱动设计与验证

VGA显示器驱动设计与验证 1、VGA显示原理 VGA显示器显示图像,并不是直接让图像在显示器上显示出来,而是采用扫描的方式,将构成图像的像素点,在行同步信号和场同步信号的同步下,按照从上到下、由左到到右的顺序扫描到显示屏上。 VGA显示器的扫描规律 (1)在行、场同步信…

张洁的新书「流浪的老狗」

张洁的最新书「流浪的老狗」终于出版。这是她第一部文学和摄影的游记&#xff0c;纪录了她一个人背着行囊游历世界的感悟。她驻足的地方大多是不为外人所知的小角落&#xff0c;她深入到世界最有特色和活力的肌理当中&#xff0c;记下她的独特感受和这个世界让我们忽略的以及我…

KITL--概念篇

KITL(Kernel Independent Transport Layer)是基于Windows CE平台的一种软件技术&#xff0c;开发商基于它可以很容易地支持各种调试功能。因为Windows CE的调试是一种远程调试&#xff0c;所以开发工作站&#xff08;运行PB的机器&#xff09;和设备端必须要有相应的通信通道&a…

2006年统计的国内外的一些机器视觉公司汇总

转摘自网上上海&#xff1a;上海恒意得信息科技有限公司法视特&#xff08;上海&#xff09;公司上海锡明科技上海东冠科技上海真锐科技上海元中光学仪器海澳光学仪器日本CCS代表处日本欧姆龙代表处日本松下代表处美国DVT代表处美国COGNEX代表处美国邦纳工程有限公司I2S&#x…

平遥摄影展:卡农•布斯克茨和他的「一天的结束」

平遥国际摄影展&#xff0c;一年一度&#xff0c;端相机人的节日。满街是镜头和摄影背心的攒动。我朋友说&#xff1a;没看到好照片&#xff0c;倒是看到不少好相机。这或许就是中国摄影界的写照&#xff0c;也是平遥摄影展的困境。如果没遇到布斯科茨&#xff0c;或许我真的白…

SystemVerilog声明的位置

SystemVerilog声明的位置 1、包&#xff08;package&#xff09; (1)包的定义 SystemVerilog的包在package和endpackage之间定义 包中可以包含的可综合的结构有 &#xff08;1&#xff09;parameter和localparam常量定义 &#xff08;2&#xff09;const变量定义 &#xff08;…

[学习] FPGA之ip核

>> ip核之概念和分类IP&#xff08;Intellectual Property&#xff09;内核模块是一种预先设计好的甚至已经过验证的具有某种确定功能的集成电路、器件或部件。它有几种不同形式。IP内核模块有行为&#xff08;behavior&#xff09;、结构&#xff08;structure&#xff…

常见的机器视觉软件

一、开源的OpenCV 机器视觉我们最常用的软件是OpenCV&#xff08;Intel OpenSource Computer Vision Library&#xff09;&#xff0c;它的中文论坛http://www.opencv.org.cn/index.php里面有非常清楚的介绍。 二、VisionPro7.0系统&#xff0c;快速开发强大的应用系统 康耐视…

$unit编译单元声明

$unit编译单元声明 SystemVerilog含有编译单元。 相比Verilog&#xff0c;SystemVerilog增加了编译单元的概念。编译单元是同时编译的所有源文件。编译单元为软件工具提供了一种对整个设计子块单独编译的方法。一个子块可能包含第一个或多个模块&#xff08;module&#xff09…

[学习] FPGA之基本原理(可能理解不对)

>> 什么是fpga FPGA是英文Field Programmable Gate Array的缩写&#xff0c;即现场可编程门阵列&#xff0c;它是在PAL、GAL、EPLD等可编程器件的基础上进一步发展的产物。它是作为专用集成电路(ASIC)领域中 的一种半定制电路而出现的&#xff0c;既解决了定制电路的不足…

忧云:喻红艺术展观后

长征空间。喻红的个展《忧云 wondering clouds》&#xff0c;中文标题似过诗意&#xff0c;而英文可能更准确表达其意图。这幅连体大画至少有15米长&#xff0c;非常壮观&#xff0c;色彩变化&#xff0c;人物的形态&#xff0c;复杂而有序。既有写实也有表现&#xff0c;既有真…

阶乘和

#include <stdio.h>// __int64的范围是 [0, 2^64),即0~18446744073709551615(约1800亿亿) static unsigned __int64 sum_fac(int n);int main(void) {printf("test sum_fac function.\n\n");for(unsigned int k0; k<20; k){printf("k%dth e sum is: %l…

未命名语句块中的声明

未命名语句块中的声明 命名块中的局部变量 Verilog允许在命名的begin…end或fork…join块中声明局部变量。局部变量声明的通常用法是声明一个临时变量进行循环控制。局部变量避免了对同名但用途不同的模块模块级变量的无意访问。下面的代码段声明了两个都叫i的变量&#xff0c…

故乡的路:十位少数民族摄影师联展

故乡的路&#xff1a;10位少数民族摄影师联展。映艺术中心。参展的有蒙古族、维吾尔族、回族、纳西族、傣族、白族、彝族、拉祜族、藏族等。民族是一个视点&#xff0c;故乡也是一个视点&#xff0c;两者的交叉&#xff0c;透过现代化的相机和镜头&#xff0c;获得了一种独特的…

kitl协议包简述

英文版参照网址http://blogs.msdn.com/ce_base/archive/2006/06/27/648747.aspx 下面是翻译过来的&#xff0c;可能有错哦&#xff0c;呵呵 KITL概述 KITL——Kernel Independent Transport Layer&#xff0c;CE驱动调试的基本调试协议。KITL提供 1、 传输初始化 2、 数…

敏捷转型中的看板

Scrumban最初是一种从Scrum向精益看板转换的机制&#xff0c;现在它已经支持双方向的转换&#xff0c;并可以应用到项目和精简BAU(常规商业运营)工作流。能够实施Scrum和精益方法的相互转换自然是很好的。但当你的客户不具备实践这些方法的条件时&#xff0c;你如何去帮助他们实…

GDIPlus灰度化图像

将RGB彩色图像转为8位的索引颜色 先定义一个宏 // Greyscale conversion #define GREY(r, g, b) (BYTE)(((WORD)r * 77 (WORD)g * 150 (WORD)b * 29) >> 8 //#define GREY(r, g, b) (BYTE)(((WORD)r * 169 (WORD)g * 256 (WORD)b * 87) >> 9)// Grayscale, 将…

SystemVerilog文本值和数据类型

SystemVerilog文本值和数据类型 1、增强的文本值赋值 给一个向量赋予文本值 在Veirlog语言中&#xff0c;一个向量可以很容易地赋值为全00、全x&#xff08;不确定&#xff09;或全z&#xff08;高阻态&#xff09;。 parameter SIZE 64; reg [SIZE-1 :0] data; data 0;//…

从IC设计来看Trace32的用途

通常的芯片设计&#xff0c;在开发阶段都会先在一个包含硬IP核的FPGA上进行&#xff0c;通过使用硬件描述语言HDL来对FPGA进行编程&#xff0c;这样既能加快设计速度又能够节省成本&#xff0c;最重要的是可以在芯片开发阶段发现可能存在的HW问题。一般的设计思路是首先将各个外…