CN1113296C - Hardware testing device and method for increasing hardware testing speed - Google Patents
Hardware testing device and method for increasing hardware testing speedInfo
- Publication number
- CN1113296C CN1113296C CN99103620A CN99103620A CN1113296C CN 1113296 C CN1113296 C CN 1113296C CN 99103620 A CN99103620 A CN 99103620A CN 99103620 A CN99103620 A CN 99103620A CN 1113296 C CN1113296 C CN 1113296C
- Authority
- CN
- China
- Prior art keywords
- data
- ring
- hardware
- working storage
- type working
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
本发明涉及一种硬件测试模块,它以并行操作的方式,于一环状暂存器上进行测试数据的存取,本发明以中断服务程序来存入测试数据,而以主应用程序来处理测试数据,并利用主应用程序在处理数据的期间,同时开启中断服务程序来接收数据,而且由于此并行操作的方式,减少了所需的测试时间,并且能减少所需的暂存器容量。
The present invention relates to a hardware test module, which accesses test data on a ring register in a parallel operation mode. The present invention uses an interrupt service program to store test data, and uses a main application program to process the test data. The main application program is used to start the interrupt service program to receive data during the data processing period. In addition, due to the parallel operation mode, the required test time is reduced and the required register capacity can be reduced.
Description
技术领域technical field
本发明涉及一种硬件测试装置,特别是关于一种以并行操作进行的测试方法。The invention relates to a hardware testing device, in particular to a testing method performed in parallel operation.
背景技术Background technique
就现行的测试软件而言,对调制解调器(Modem)、串/并行口、软硬件驱动器等硬件设备的测试过程中,其执行过程往往先直接由电脑向被测硬件写入测试信息,然后等待来自被测硬件的响应,并将之接收再作对比及查验的作业。换言之,现有技术的测试方法首先将“测试信息”由“电脑”传向“被测硬件”,而后再由“被测硬件”将“测试信息”转交给“主应用程序”处理以产生一“结果”。此“结果”再经由“被测硬件”传回“电脑”,以记录、显示测试结果。上述过程如“图1”所示,开始测试(步骤10)之后,首先向被测硬件传送数据以交由主应用程序处理(步骤11),而后再处理测试信息时,须等待硬件响应数据(步骤12)。第四步骤则是显示所得的响应数据(步骤13)。在第五步骤使用者可输入指令以作更进一步的处理(步骤14),继而由电脑执行所输入的指令(步骤15)。最后检查是否已完成整个测试(步骤16)。若否,则再继续作整个测试流程;若已完成,则结束或进行下一个被测硬件的测试(步骤17)。As far as the existing test software is concerned, in the test process of hardware devices such as modems (Modem), serial/parallel ports, software and hardware drivers, the execution process is often first directly written by the computer to the tested hardware. The response of the hardware under test, and receive it for comparison and inspection. In other words, the testing method in the prior art first transmits the "test information" from the "computer" to the "hardware under test", and then the "hardware under test" transfers the "test information" to the "main application program" for processing to generate a "result". The "result" is then sent back to the "computer" via the "tested hardware" to record and display the test results. The above process is shown in "Figure 1". After starting the test (step 10), the data is first sent to the hardware under test for processing by the main application program (step 11), and then when processing the test information, it is necessary to wait for the hardware to respond to the data ( Step 12). The fourth step is to display the obtained response data (step 13). In the fifth step, the user can input an instruction for further processing (step 14), and then the computer executes the input instruction (step 15). Finally it is checked whether the entire test has been completed (step 16). If not, then continue to do the entire testing process; if completed, then end or proceed to the next test of the hardware under test (step 17).
由上所述,可知现有技术是以一“串行操作”的方法来进行测试流程。简单的说,各步骤执行的程序是“依次进行”的,所以每一个步骤必需等待上一个步骤完成之后,才能进行。而这也就是现有技术的主要缺点。由于各步骤的执行需等待上一个步骤完成之后才能进行,因此在整个速度上不免较慢。以调制解调器(Modem)为例,假设调制解调器以每毫秒一个字符(character,一个英文字符或符号需要一个字节″Byte″的长度储存)的速度向应用程序发送字串“This is a test.”,共15个字符,四个单字。应用程序根据英文字母间的空格或标点符号来区分每个单字。应用程序的处理模式是以“单字”作为基本单位,其每处理一个单字需时3毫秒。由于内存操作(包括程序执行及数据存取)的速度相当快(以纳秒为单位),故可忽略而不计其所占用的时间。From the above, it can be known that the prior art uses a "serial operation" method to carry out the testing process. To put it simply, the procedures executed by each step are "progressed in sequence", so each step must wait for the completion of the previous step before proceeding. And this is the main shortcoming of the prior art. Since the execution of each step needs to wait for the completion of the previous step, the overall speed is unavoidably slow. Take the modem (Modem) as an example, assuming that the modem sends the string "This is a test." A total of 15 characters, four words. The application distinguishes each word based on spaces or punctuation marks between English letters. The processing mode of the application is based on "word" as the basic unit, and it takes 3 milliseconds to process a word. Since memory operations (including program execution and data access) are so fast (in nanoseconds), the time it takes is negligible.
在现有技术的串行测试方法中,如“图1”流程所示,需要先将整串测试字符完全接收后,才能进行其处理。故此,其调制解调器所需要的时间为接收15个字符的时间(15毫秒),再加上处理四个单字的时间(4′3=12毫秒),一共27毫秒。In the serial testing method of the prior art, as shown in the flow chart of “ FIG. 1 ”, it is necessary to receive the entire string of test characters before processing them. Therefore, the time required by its modem is the time for receiving 15 characters (15 milliseconds), plus the time for processing four words (4′3=12 milliseconds), a total of 27 milliseconds.
此外,由于需先将测试字符完全接收,因此其所需的存储器空间至少需有15个字符的内存空间。此外,由于这是串行操作,因此在应用程序处理完成之前,使用者无从得知其现况。因此当错误或当故障的情况发生时,往往无法得知而浪费时间。此现象在测试调制解调器时,由于其工作速率变化范围很大(由110波特-11520波特),因此响应的时间便会有很大的差别。特别是当调制解调器运行于不同的CPU及显示卡上时,极易造成时序配合上的混合。另外,数据的传送总是有一定的误码率,这种差错会造成接收数据内容及长度的变化为了接收这种未知长度的数据,采用现有技术方法“接收----处理----再接收----再处理----直至结束”的模式,只能通过加大暂存空间的方法来解决,造成存储空间的浪费。In addition, since the test characters need to be completely received first, the required memory space must have at least 15 characters of memory space. Also, because this is a serial operation, the consumer has no way of knowing what is happening with the application until it is done processing. Therefore, when errors or failures occur, it is often impossible to know and waste time. For this phenomenon, when testing the modem, since its operating rate varies greatly (from 110 baud to 11520 baud), the response time will vary greatly. Especially when the modems run on different CPUs and graphics cards, it is very easy to cause a mix of timing coordination. In addition, data transmission always has a certain bit error rate, and this error will cause changes in the content and length of the received data. - Re-receiving--reprocessing--until the end" mode can only be solved by increasing the temporary storage space, resulting in a waste of storage space.
发明内容Contents of the invention
本发明的主要目的,在于提出一种能提高硬件测试速率的测试装置,并且可以提供清楚的数据流向,以及减少测试所需的存储器空间。The main purpose of the present invention is to provide a testing device that can increase the hardware testing rate, provide clear data flow direction, and reduce the memory space required for testing.
本发明的精神,在于以“并行操作”取代现有技术“串行操作”的方式来执行硬件测试。在现有技术中,应用程序需等待全部的测试信息接收完毕之后,才能开始对这些测试信息进行处理。然而,对应用程序而言,其处理测试信息的方式,是将字母一个一个的来处理,而非一次就处理整个测试信息。换言之,对应用程序而言,其信息处理的过程只需要有部份测试信息就可开始进行。所以在本发明中,在接收测试信息的同时,就开始令应用程序去由存储器中取出字符来进行处理。换言之,利用应用程序处理信息上的特性,使得信息的接收及信息的处理能同时进行,而减少整个测试所需的时间。The spirit of the present invention is to perform hardware testing in a manner of "parallel operation" instead of "serial operation" in the prior art. In the prior art, the application program needs to wait for all the test information to be received before starting to process the test information. However, for the application program, the way to process the test information is to process the letters one by one, instead of processing the entire test information at one time. In other words, as far as the application program is concerned, the process of information processing only needs some test information to start. Therefore, in the present invention, when the test information is received, the application program is started to fetch characters from the memory for processing. In other words, using the characteristics of the application program to process information, the reception of information and the processing of information can be performed simultaneously, thereby reducing the time required for the entire test.
本发明提供了一种硬件测试装置,用以测试硬件传送数据的功能,该硬件测试装置至少包含:The present invention provides a kind of hardware test device, in order to test the function of hardware transmission data, this hardware test device comprises at least:
-被测硬件;- the hardware under test;
-环状暂存器,其可以被储存及被读取该被测硬件的状态信息及该被测硬件所传送的数据;- ring register, which can be stored and read the status information of the tested hardware and the data transmitted by the tested hardware;
-运行主应用程序的装置,用于监测并读取该环状暂存器所存的状态信息及该数据,并加以处理;-The device running the main application program is used to monitor and read the state information and the data stored in the ring register, and process them;
-运行中断服务程序的装置,用于接受该主应用程序的控制,而将该被测硬件所传送的该数据写入该环状暂存器;- a device for running an interrupt service program, for accepting the control of the main application program, and writing the data transmitted by the tested hardware into the ring register;
其中,当该运行主应用程序的装置在读取该环状暂存器时,将会先关闭该运行中断服务程序的装置,在读取完毕后才再开启该运行中断服务程序的装置;Wherein, when the device running the main application program reads the ring register, it will first close the device for running the interrupt service program, and then open the device for running the interrupt service program after reading;
当该运行主应用程序的装置在处理该数据的同时,该运行中断服务程序的装置仍会继续将所接收到的新数据写入该环状暂存器中。While the device running the main application program is processing the data, the device running the interrupt service program will continue to write the received new data into the ring register.
本发明还提供了一种增加硬件测试速度的方法,其包含有下列步骤:The present invention also provides a method for increasing hardware testing speed, which includes the following steps:
1)设置一环状暂存器,所述暂存器可以被储存以及被读取被测硬件的状态信息及该被测硬件所传送的数据;1) A ring temporary register is set, and the temporary register can be stored and read the status information of the tested hardware and the data transmitted by the tested hardware;
2)设一主应用程序,其可以读取该环状暂存器所存的状态信息及该数据,并加以处理;2) Set a main application program, which can read the state information and the data stored in the ring register, and process them;
3)设一中断服务程序,其接受该主应用程序的控制,而将该被测硬件所传送的该数据写入该环状暂存器;3) An interrupt service program is set, which accepts the control of the main application program, and writes the data transmitted by the tested hardware into the ring register;
其中,利用并行操作的方式,使得在该主应用程序处理该数据的同时,该中断服务程序仍会继续将所接收到的新数据写入该环状暂存器中。Wherein, the method of parallel operation is used, so that while the main application program is processing the data, the interrupt service program will continue to write the received new data into the ring register.
为此,本发明运用直接截取硬件中断的方法,先规划出一个环形暂存器,利用“Put指针(放指针)”及“Take指针(取指针)”来操作信息的存取,并提供一“中断服务”,使得应用程序在处理测试信息时,接收程序仍能逐个继续地接收测试信息。For this reason, the present invention utilizes the method of directly intercepting hardware interruption, first plans out a ring register, utilizes " Put pointer (put pointer) " and " Take pointer (get pointer) " to operate the access of information, and provides a "Interrupt service" enables the receiving program to continue receiving test information one by one while the application program is processing the test information.
此外,对于应用程序而言,由于测试信息不需要一次就全部读写进存储器中,因此所需存储器的空间也可较现有技术来得少。同时,由于利用环形暂存器及“Put指针”、“Take指针”两个指针,因此应用程序将以一定频率去监测环形暂存器的现况。所以透过应用程序,使用者也能够随时了解目前测试进行的情况,因此能避免万一发生故障时的无谓等待。In addition, for the application program, since the test information does not need to be read and written into the memory all at once, the required memory space can also be less than that of the prior art. At the same time, due to the use of the ring register and the two pointers "Put pointer" and "Take pointer", the application program will monitor the status of the ring register at a certain frequency. Therefore, through the application program, the user can also keep abreast of the current testing situation at any time, so it can avoid unnecessary waiting in case of failure.
为让本发明的上述和其他目的、特征、和优点能更明显易懂,下文特举一较佳实施例,并配合附图,作详细说明如下。In order to make the above and other objects, features, and advantages of the present invention more comprehensible, a preferred embodiment will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
图1为现有技术测试方法的方块图;Fig. 1 is the block diagram of prior art test method;
图2为实施例的功能方块图;Fig. 2 is the functional block diagram of embodiment;
图3为整体流程图;Fig. 3 is overall flowchart;
图4为中断服务流程图;Fig. 4 is a flow chart of interrupt service;
图5为主应用程序取数据流程图;Figure 5 is a flow chart of fetching data for the main application program;
图6为等待并动态处理数据的流程图。Fig. 6 is a flow chart of waiting and dynamically processing data.
具体实施方式Detailed ways
参见“图2”为第一实施例的功能方块图。环形暂存器21上规划有数个存储单元,其每一个皆是硬件每次发送的最小单位,其字节(Byte)数依不同硬件类型而定。此外有一Put指针22,其用以标定每次进行信息存入时的位置,它会随着信息的存入向前移,移至底部时,则会再返回起始点。另外有Take指针23用以标定读取信息时的位置。类似于Put指针22,Take指针23亦会随着信息的读取向前移,移至底部时,则会再返回起始点。See "Fig. 2" for the functional block diagram of the first embodiment. Several storage units are planned on the
在执行时,相关数据将由被测硬件内的存储器,传向中断服务程序24,通过Put指针22的指示由起始位置依次将数据存入环形暂存器21中。而主应用程序25则是通过Take指针23,将信息依次取出并加以处理。一旦Put指针22或Take指针23超过环形暂存器21的底部,则自动返回环形暂存器21的起始位置。在读取的判断上,设定若Take指针23的位置不同于Put指针22,则代表有未读取的信息;在存入的判断上,设定若Put指针22追上Take指针23,则表示环形暂存器21的空间已满。利用上述的两个判断原则,可以避免读过头或是写过头的问题。During execution, relevant data will be transmitted from the memory in the hardware under test to the interrupt
“图3”为实施例的总流程图。其中主应用程序31负责处理使用者输入信息,并且监测通信缓冲区33的状态,并依此进行数据的读取,以及通过控制中断服务程序32而相对应地控制硬件当前的状态。通信缓冲区33会接受被测硬件暂存器的变化以及测试数据的写入。主应用程序31及中断服务程序32则是两个并行的程序,但若二者同时存取(access)通信缓冲区33,则将造成信息的混乱。因此,为了使中断服务程序32及主应用程序31两者在通信缓冲区33上互斥,因此设定主应用程序在使用环状暂存器时,先关闭中断服务程序32,以阻止其对于通信缓冲区33的写入;完成之后再打开中断服务程序32以继续接收数据。"Fig. 3" is the overall flow chart of the embodiment. The main application program 31 is responsible for processing user input information, monitoring the status of the communication buffer 33 , reading data accordingly, and correspondingly controlling the current status of the hardware by controlling the interrupt service program 32 . The communication buffer 33 accepts the change of the temporary register of the hardware under test and the writing of test data. The main application program 31 and the interrupt service program 32 are two parallel programs, but if both access the communication buffer 33 at the same time, it will cause information confusion. Therefore, in order to make both the interrupt service program 32 and the main application program 31 mutually exclusive on the communication buffer 33, when the main application program is set to use the ring register, the interrupt service program 32 is first closed to prevent it from The writing of communication buffer zone 33; Open interrupt service program 32 again to continue to receive data after finishing.
“图4”为中断服务流程图,首先针对被测硬件,逐个读入被测硬件内的暂存器值,以视其是否有数据将传送(步骤41)。判断暂存器值是否有变化(步骤42),如有变化则记录其变化情况并作一标记(步骤43)以便主应用程序识别。判断是否读完所有的值(步骤44),如果没有,则返回步骤41继续读取;如果已读完所有的值,则继续判断中断服务程序是否收到新的数据(步骤45)。如果有,则将所接收到的数据依Put指针的指示存入环状暂存器中,并更新Put指针的位置(步骤46)。然后,判断暂存器是否将溢出(步骤47)。若是,则命令硬件暂停发送数据,并设定硬件为暂停状态(步骤48)后中断返回。若中断服务程序未收到新数据(步骤45),则直接返回。" Fig. 4 " is interrupt service flowchart, at first for tested hardware, read in the register value in the tested hardware one by one, to see whether it has data to transmit (step 41). Judging whether there is a change in the register value (step 42), if there is a change, record the change and make a mark (step 43) so that the main application program can identify it. Judging whether all values have been read (step 44), if not, then return to step 41 to continue reading; if all values have been read, then continue to judge whether the interrupt service routine receives new data (step 45). If so, the received data is stored in the ring register according to the indication of the Put pointer, and the position of the Put pointer is updated (step 46). Then, it is judged whether the register will overflow (step 47). If so, then order the hardware to suspend sending data, and set the hardware to be in a suspended state (step 48) and then interrupt and return. If the interrupt service routine does not receive new data (step 45), it returns directly.
“图5”为主应用程序读取数已存入环状暂存器内的数据的流程。程序开始之后,通过监测Put指针及Take指针的位置判断暂存器中是否有新数据(步骤51)。如果有,则关闭中断服务程序(步骤52),以避免在主应用程序取数据时,又有新数据写入。然后,由环状暂存器中逐单元取出数据,完成后改变环状暂存器的Take指针(步取53),并开启中断服务程序(步骤54)以继续接收新的数据。然后设定取数据成功标记(步骤55),然后返回(步骤56)。如果环状暂存器中没有新的数据,则先设一取数据失败标记(步骤57)以判断硬件是否处于暂停状态(步骤58)。若是,则向硬件发出继续传送数据的指令,并将硬件设定为发送状态(步骤59),然后返回(步骤56);如果硬件处于正常状态则直接返回(步骤56)。"Figure 5" is the process of reading the data stored in the ring register by the main application program. After the program starts, judge whether there is new data in the scratchpad by monitoring the positions of the Put pointer and the Take pointer (step 51). If so, then close the interrupt service routine (step 52), to avoid writing new data again when the main application program fetches data. Then, take out the data unit by unit from the ring register, change the Take pointer of the ring register after completion (step 53), and open the interrupt service routine (step 54) to continue to receive new data. Then set the data success flag (step 55), and then return to (step 56). If there is no new data in the ring register, a data fetch failure flag is first set (step 57) to determine whether the hardware is in a suspended state (step 58). If so, then send the instruction that continues to transmit data to hardware, and hardware is set to sending state (step 59), then returns (step 56); If hardware is in normal state, then directly returns (step 56).
“图6”为数据存取流程。首先判断是否有待处理的数据(步骤61)若有则处理更新标记所指定的数据,同时清除更新标记(步骤62)直到完成所有数据的处理。接着判断硬件是否得到了预期的回应,回应的数据应与所传送的数据相同(步骤63),如果没有则延时等待硬件做出回应(步骤64)。判断等待的时间(步骤65),如果未到等待时间的上限就已再次收到硬件回应,则返回程序起始点,重新再做一次“是否有新数据需处理”的判断。相反,如果等候超过了等待时间上限,则将状态设定为超时(步骤66),然后返回处理结果(步骤68)。如果硬件已做出预期的回应,其设置硬件回应值(步骤67),直接返回处理结果(步骤68)。"Figure 6" is the data access process. First judge whether there is data to be processed (step 61), and if so, process the data specified by the update flag, and clear the update flag (step 62) until the processing of all data is completed. Then judge whether the hardware has obtained the expected response, the data of the response should be the same as the transmitted data (step 63), if not, wait for the delay to respond to the hardware (step 64). Judging the waiting time (step 65), if the upper limit of the waiting time has not been received hardware response again, then return to the program starting point, and do the judgment of "whether there is new data to be processed" again. On the contrary, if the waiting exceeds the upper limit of the waiting time, then the status is set to overtime (step 66), and then the processing result is returned (step 68). If the hardware has made the expected response, it sets the hardware response value (step 67), and directly returns the processing result (step 68).
若同样的以调制解调器(Modem)为例,假设调制解调器以每毫秒一个字符(Character,需要长度为一个字节Byte的储存空间)的速度向应用程序发送字串“This is a test.”,共15个字符,四个单字。应用程序根据英文字母间的空格或标点符号来区分每个单字。应用程序的处理模式是以“单字”作为基本单位,其每处理一个单字需时3毫秒。由于内存操作(包括程序执行及数据存取)的速度相当快(以纳秒为单位),故可忽略而不计其所占用的时间。环状暂存器的容量为8个Byte。则本实施例以“This is test”为例的操作步骤如下:If the same modem (Modem) is used as an example, it is assumed that the modem sends the string "This is a test." characters, four words. The application distinguishes each word based on spaces or punctuation marks between English letters. The processing mode of the application is based on "word" as the basic unit, and it takes 3 milliseconds to process a word. Since memory operations (including program execution and data access) are so fast (in nanoseconds), the time it takes is negligible. The capacity of the ring register is 8 Bytes. Then the present embodiment takes "This is test" as an example and the operation steps are as follows:
1.如“图6”所示,在初始状态下,Take指针及Put指针指在环状暂存器的顶部,即第1个Byte处;1. As shown in "Figure 6", in the initial state, the Take pointer and the Put pointer point to the top of the ring register, that is, the first Byte;
2.中断服务程序将接收到的数据“This”,共五个字符置入暂存器的第1至第5个Byte,并将Put指针移至下一次存放字符处(此例即为第6个Byte处),此过程需时5毫秒;2. The interrupt service program puts the received data "This", a total of five characters, into the 1st to 5th Byte of the temporary register, and moves the Put pointer to the next stored character (in this case, it is the 6th Byte Byte), this process takes 5 milliseconds;
3.主应用程序判断取数据指针(Take指针)的位置不同于Put指针,因此判字为有数据待处理。主应用程序读出(This),并因其内含有空格“ ”,因此自动判定已读出一完整的单字,同时将Take指针移至下一个取单字处(此例即为第6个Byte处);3. The main application program judges that the position of the data fetch pointer (Take pointer) is different from that of the Put pointer, so it is judged that there is data to be processed. The main application program reads (This), and because it contains a space " ", it automatically judges that a complete word has been read, and at the same time moves the Take pointer to the next word (in this case, the 6th Byte );
4.主应用程序开始处理所读取的单字“This”,此过程将耗时3毫秒,在主应用程序处理单字时,由于中断服务程序仍并行地接收数据,因此在主应用程序完成单字的处理时(3毫秒),又将“is”存入环状暂存器中第6-8个Byte中。为了避免暂存器溢出,故将Put指针再移至第1个Byte处;4. The main application program starts to process the read single word "This", and this process will take 3 milliseconds. When the main application program processes the single word, because the interrupt service program is still receiving data in parallel, the main application program completes the single word When processing (3 milliseconds), "is" is stored in the 6th-8th Byte in the ring temporary register. In order to avoid overflow of the scratchpad, the Put pointer is moved to the first Byte;
5.主应用程序取出“is”,根据“ ”来判断其收到一完整的单字,并将Take指针移向第1个Byte处;5. The main application takes out "is", judges that it has received a complete word according to " ", and moves the Take pointer to the first Byte;
6.主应用程序处理单字“is”,同时中断服务程序将接收到的“at”存入第1至第3个Byte,并将Put指针移至第4个Byte,此过程耗时3毫秒;6. The main application program processes the single word "is", and at the same time, the interrupt service program stores the received "at" into the 1st to 3rd Byte, and moves the Put pointer to the 4th Byte. This process takes 3 milliseconds;
7.取出单字“a”,将Take指针移向第3个Byte。7. Take out the word "a", and move the Take pointer to the third Byte.
8.处理单字“a”,同时中断服务程序将接收到的“est”存入于第4至第6个Byte,并将Put指针移至第7个Byte处,过程耗时3毫秒;8. Process the word "a", and at the same time, the interrupt service program stores the received "est" in the 4th to 6th Byte, and moves the Put pointer to the 7th Byte, and the process takes 3 milliseconds;
9.依Take指针,自第3个Byte处取出“test”,但由于未收到间隔符号,表明所取出的数据可能不完整,故先开启中断服务程序,等待其接收下一个字符,并保持于监测状态;9. According to the Take pointer, take out "test" from the third Byte, but because the interval symbol is not received, it indicates that the taken out data may be incomplete, so start the interrupt service program first, wait for it to receive the next character, and keep in monitoring state;
10.中断程序将下一个收到的字符“.”存入第7个Byte,此过程耗时1毫秒,并将Put指针移至第8个Byte;10. The interrupt program stores the next received character "." into the 7th Byte, which takes 1 millisecond, and moves the Put pointer to the 8th Byte;
11.主应用程序收到字符“.”,经判断为间隔符号后,表示“test”为一完整的单字,故将Take指针移至第8个Byte;11. The main application program receives the character ".", and after it is judged as an interval symbol, it means that "test" is a complete word, so the Take pointer is moved to the 8th Byte;
12.处理单字“test”,耗时3毫秒。12. It takes 3 milliseconds to process the word "test".
因此,总计时间为5+3+3+3+1+3=18(毫秒)。较现有技术方法27毫秒为快。同时所需的暂存器空间也由15个Byte减为8个Byte。可见得本发明确能达到加快速度及减低所需暂存器空间的目的。Therefore, the total time is 5+3+3+3+1+3=18 (milliseconds). 27 milliseconds faster than the prior art method. At the same time, the required scratchpad space is also reduced from 15 Bytes to 8 Bytes. It can be seen that the present invention can clearly achieve the purpose of speeding up and reducing the required register space.
附图符号说明10 开始11 向被测硬件发送数据12 等待硬件响应数据13 显示响应数据14 有无用户输入15 显示、处理用户输入16 是否测试完毕17 返回21 环形暂存器22 Put指针23 Take指针24 中断服务程序25 主应用程序31 主应用程序32 中断服务程序33 通信缓冲区41 逐个读入暂存器值42 判断暂存器值是否发生变化43 更新并做标记44 判断是否读完全部的数据45 判断是否收到新数据46 将数据放入环形暂存器并更新Put指针的位置47 判断暂存器是否将溢出48 命令硬件暂停发送数据,并将之设定为暂停状态51 判断是否有新数据52 关闭中断服务程序53 取出数据并更新Take指针的位置54 开启中断服务程序55 设置取数据成功标记56 返回57 设置取数据失败标记58 判断硬件是否处于暂停状态59 向硬件发出继续传送指令,并设定硬件为发送状态61 判断是否有待处理的数据62 处理更新标记指定的数据,并清除数据的更新标记63 判断是否接收到预期的回应。64 延时等待65 判断是否已到了等待时间上限66 设定超时状态67 设定回应值68 返回Explanation of reference symbols 10 Start 11 Send data to the tested hardware 12 Wait for hardware response data 13 Display response data 14 Whether there is user input 15 Display and process user input 16 Whether the test is completed 17 Return 21 Ring register 22 Put pointer 23 Take pointer 24 Interrupt service program 25 Main application program 31 Main application program 32 Interrupt service program 33 Communication buffer 41 Read the scratchpad value one by one 42 Determine whether the scratchpad value has changed 43 Update and mark 44 Determine whether all the data has been read 45 Determine whether new data is received 46 Put the data into the ring temporary register and update the position of the Put pointer 47 Determine whether the temporary register will overflow 48 Command the hardware to suspend sending data and set it to the pause state 51 Determine whether there is new data Data 52 Close the interrupt service program 53 Take out the data and update the position of the Take pointer 54 Open the interrupt service program 55 Set the data fetching success flag 56 Return 57 Set the data fetching failure flag 58 Determine whether the hardware is in a pause state 59 Send the continue transmission instruction to the hardware, and Set the hardware to the sending state 61 Determine whether there is data to be processed 62 Process the data specified by the update mark, and clear the update mark of the data 63 Determine whether the expected response is received. 64 Delayed waiting 65 Judging whether the upper limit of the waiting time has been reached 66 Setting the
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN99103620A CN1113296C (en) | 1999-03-05 | 1999-03-05 | Hardware testing device and method for increasing hardware testing speed |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN99103620A CN1113296C (en) | 1999-03-05 | 1999-03-05 | Hardware testing device and method for increasing hardware testing speed |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1266227A CN1266227A (en) | 2000-09-13 |
CN1113296C true CN1113296C (en) | 2003-07-02 |
Family
ID=5271364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN99103620A Expired - Fee Related CN1113296C (en) | 1999-03-05 | 1999-03-05 | Hardware testing device and method for increasing hardware testing speed |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1113296C (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100517251C (en) * | 2006-08-01 | 2009-07-22 | 英业达股份有限公司 | Test system and method |
CN101159775B (en) * | 2007-10-16 | 2010-06-23 | 中兴通讯股份有限公司 | Hardware module testing system and method |
CN101150456B (en) * | 2007-10-17 | 2010-06-23 | 中兴通讯股份有限公司 | Hardware module testing method and system |
CN101699417B (en) * | 2009-10-16 | 2012-08-29 | 华亚微电子(上海)有限公司 | Interrupt method |
CN104678982A (en) * | 2013-11-28 | 2015-06-03 | 英业达科技有限公司 | Test device using independent control module to test, and method of test device |
CN109144844B (en) | 2017-06-27 | 2023-01-31 | 阿里巴巴集团控股有限公司 | Tracking method, device, equipment and machine readable medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01133150A (en) * | 1987-11-18 | 1989-05-25 | Nec Corp | Hardware test system |
WO1992003785A1 (en) * | 1990-08-14 | 1992-03-05 | Siemens Aktiengesellschaft | Device for monitoring the functions of external synchronisation units in a multi-computer system |
DE4222774C2 (en) * | 1992-07-10 | 1994-07-07 | Siemens Ag | Method for carrying out at least one test on program modules which can run in parallel on a processor and which exchange time-dependent messages with one another via routines provided in the operating system of the processor |
JPH10207728A (en) * | 1997-01-13 | 1998-08-07 | Hewlett Packard Co <Hp> | Processor-memory bus interface in computer system having repetition test event generating hardware |
-
1999
- 1999-03-05 CN CN99103620A patent/CN1113296C/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01133150A (en) * | 1987-11-18 | 1989-05-25 | Nec Corp | Hardware test system |
WO1992003785A1 (en) * | 1990-08-14 | 1992-03-05 | Siemens Aktiengesellschaft | Device for monitoring the functions of external synchronisation units in a multi-computer system |
DE4222774C2 (en) * | 1992-07-10 | 1994-07-07 | Siemens Ag | Method for carrying out at least one test on program modules which can run in parallel on a processor and which exchange time-dependent messages with one another via routines provided in the operating system of the processor |
JPH10207728A (en) * | 1997-01-13 | 1998-08-07 | Hewlett Packard Co <Hp> | Processor-memory bus interface in computer system having repetition test event generating hardware |
Also Published As
Publication number | Publication date |
---|---|
CN1266227A (en) | 2000-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100533416C (en) | Method and system for controlling and processing data transmission of environment | |
CN111045964A (en) | PCIE interface-based high-speed transmission method, storage medium and terminal | |
CN1113296C (en) | Hardware testing device and method for increasing hardware testing speed | |
US4040037A (en) | Buffer chaining | |
CN1204495C (en) | Processor system | |
CN112612728B (en) | Cache management method, device and equipment | |
CN109992556A (en) | A kind of I2C driving method and device | |
US20080114971A1 (en) | Branch history table for debug | |
US5964853A (en) | Interface controller including hardware mechanism to handle PS/2 interface | |
CN101025822A (en) | Switching switch system with independent outputs and method thereof | |
US20030120866A1 (en) | Method for reducing cache conflict Misses | |
CN100365606C (en) | Direct memory access method for data of secure digital memory card and interface circuit therefor | |
US5774745A (en) | Method and apparatus for writing and reading entries in an event status queue of a host memory | |
CN1284064C (en) | Universal FIFO interface testing equipment and system | |
US6922833B2 (en) | Adaptive fast write cache for storage devices | |
JPH0981533A (en) | Inter-processor data transfer system and ring buffer memory for the same | |
CN101038542A (en) | Management method of stack buffer area | |
TW405070B (en) | Hardware testing module | |
KR102695967B1 (en) | Slim frame grabber system and control method for high-speed interface system performance evaluation | |
US11714608B2 (en) | Device and method for handling programming language function | |
CN109218523A (en) | Mobile terminal shows data exception detection method, mobile terminal and storage medium | |
CN110955507B (en) | Method for multitask access to same IIC bus based on vxWorks system | |
KR100273280B1 (en) | Debugging logic control circuit | |
CN1127021C (en) | Method for detecting open circuit, grounding and short circuit of pins on parallel port of computer | |
CN2520528Y (en) | Bridge system for accessing shared system resources |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CB03 | Change of inventor or designer information |
Inventor after: Chen Xing Inventor before: Lin Guangxin Inventor before: Chen Xuantong Inventor before: Yan Shu |
|
CB03 | Change of inventor or designer information | ||
TR01 | Transfer of patent right |
Effective date of registration: 20170918 Address after: 17-2-401, Fengman residential building, Fengman District, Jilin, Jilin Patentee after: Chen Xing Address before: Taipei City, Taiwan, China Patentee before: Inventec Corporation |
|
TR01 | Transfer of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20030702 Termination date: 20180305 |
|
CF01 | Termination of patent right due to non-payment of annual fee |