A MHAL interface testing method and system
By using GPP equipment as a bridge in MHAL interface testing to directly connect and test the MHAL interface of FPGA and DSP equipment, the problem of MHAL interface performance evaluation is solved, the accuracy and reliability of the test are improved, and the risk of the communication system is reduced.
Patent Information
- Application Number
- CN202410817833.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-24
AI Technical Summary
During the development, production and maintenance processes, it is difficult to accurately evaluate the performance of the MHAL interface, which increases the risk of the communication system.
By communicating the operating end of the test software with the GPP device, and using the GPP device as a bridge to perform interface testing on the MHAL interface of the FPGA device and the DSP device, the test process is simplified, and the MHAL interface is directly connected for compatibility testing, which expands the scope of test application. .
It improves the accuracy and reliability of the test, ensures the compatibility and reliability of the MHAL interface, reduces maintenance costs, expands the scope of test application, and can effectively test the MHAL interface on various computing platforms.
Smart Images

Figure CN118394662B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of software radio communication, and more specifically, relates to a MHAL interface testing method and system. Background Art
[0002] With the rapid development of communication technology, the MHAL interface, as an important bridge connecting the modem and the upper-layer application, its stability and reliability are crucial to the performance of the entire communication system; MHAL interface testing mainly verifies whether the MHAL interface implements the required functions in accordance with the specifications; MHAL interface usually needs to interact with other hardware or software components, so the test includes compatibility testing between the interface and other components to ensure that it can work properly and communicate correctly with other components. Under abnormal circumstances, the interface may not work properly, including error handling, system response, etc.; The ultimate goal of MHAL interface testing is to ensure that the reliability, security and compatibility of the interface in actual deployment and use meet the expected standards, which can improve user confidence in the system and reduce maintenance costs; but at present, there is no dedicated MHAL interface testing method on the market, which makes it difficult to accurately evaluate the performance of the MHAL interface during development, production and maintenance, thereby increasing the risk of the communication system. Summary of the invention
[0003] The present invention provides a MHAL interface testing method and system, which are intended to solve the technical problem that it is difficult to accurately evaluate the MHAL interface performance in the current development, production and maintenance processes.
[0004] A MHAL interface testing method comprises the following steps:
[0005] The operating end of the test software communicates with the GPP device through CORBA via the MHAL interface on the GPP device;
[0006] The GPP device communicates with multiple FPGA devices and multiple DSP devices through line connections respectively;
[0007] The operation end preferentially tests whether the communication link between the operation end and the MHAL interface of the GPP device is normal. If the test result shows that the communication link between the operation end and the MHAL interface of the GPP device is normal, the operation end uses the GPP device as a bridge to perform an interface test on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device; if the test result is abnormal, the corresponding device is debugged based on the abnormal result.
[0008] The present invention enables an operating terminal equipped with test software to communicate with a GPP device, and then uses the GPP device as a bridge to perform interface testing on the MHAL interface of an FPGA device or / and the MHAL interface of a DSP device, so that the test software can be directly connected to the MHAL interface on the GPP device to perform interface compatibility testing. This direct communication capability simplifies the test process, reduces the indirectness and uncertainty in the test process, and thus improves the accuracy and reliability of the test. Secondly, for the MHAL components of the FPGA device and the DSP device that cannot directly communicate with the test software, the test is completed by using the GPP device as an agent, thereby expanding the scope of application of the test, so that the MHAL interfaces on various computing platforms can be effectively tested.
[0009] Preferably, the test steps of the MHAL interface of the GPP device are as follows:
[0010] The test software obtains the object reference of the MHAL interface of the GPP device, and the test software on the operation end connects to the corresponding MHAL interface according to the object reference;
[0011] After the connection is successful, start calling the test case to perform interface testing;
[0012] After the test is completed, a corresponding test case report is generated based on the results of the test case.
[0013] Preferably, the test cases include pushPacket function functionality test, addTxRoute function functionality test, and getRxRoutes function functionality test.
[0014] Preferably, the pushPacket function functional test comprises the following steps: calling the MHAL interface through the test software, inputting the correct logical address and data packet, checking whether the data packet is correctly received at the corresponding logical address, and comparing whether the received data packet is consistent with the sent data packet; and repeatedly executing the pushPacket function functional test steps by simulating an incorrect logical address or device failure;
[0015] The addTxRoute function functional test includes the following steps:
[0016] Address binding: Call the MHAL interface through the test software, select a logical address, specify a valid physical address for the logical address, and call the addTxRoute function to perform the binding operation; confirm that the binding is successfully implemented by checking the system configuration or status;
[0017] Data transmission verification: Send a test data packet through the bound logical address, verify whether the data packet is successfully received at the corresponding physical address, and check whether the content of the received data packet is complete and correct;
[0018] Invalid parameter test: Call the addTxRoute function with an invalid logical address or incorrect geographic format, and verify that the function correctly returns an error or refuses to perform the binding;
[0019] Repeated binding test: Perform repeated binding operations on the same logical address and physical address to verify whether the system rejects the repeated binding or updates the existing binding without generating errors;
[0020] The getRxRoutes function functional test is used to verify that the getRxRoutes function can accurately obtain and return all configured logical addresses, including the following steps:
[0021] Empty configuration test: Call the getRxRoutes function without configuring any receiving routes and verify whether the returned list is empty.
[0022] Preferably, the steps of performing interface testing on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device are as follows:
[0023] The test software obtains the object reference of the MHAL interface of the GPP device and connects the corresponding interface according to the obtained object reference;
[0024] After the connection is successful, the test case of the MHAL interface of the FPGA device or / and the MHAL interface of the DSP device is called to perform interface testing, and the test case and the corresponding logical address are passed to the test framework of the GPP device; the GPP device determines whether it is the MHAL interface of the FPGA device or / and the MHAL interface of the DSP device according to the logical address, and if so, the test case is sent to the corresponding MHAL interface of the FPGA device or / and the MHAL interface of the DSP device;
[0025] After the test is completed, a test report is generated based on the test results.
[0026] Preferably, the test cases for interface testing the MHAL interface of the FPGA device include: Multi-Depth FIFO sending node functional test, Multi-Depth FIFO receiving node functional test, Single-Depth FIFO receiving node test, RAM receiving node test, N-Word register receiving node test and Strobe receiving node test.
[0027] Preferably, the Multi-Depth FIFO sending node functional test includes basic function test, multi-message queuing test, queue depth test, queue empty test, boundary condition test and abnormal condition test performed in sequence;
[0028] The Multi-Depth FIFO receiving node functional test includes basic function test, multi-message queuing test, queue depth test, queue empty test, boundary condition test and abnormal condition test performed in sequence;
[0029] The Single-Depth FIFO receiving node test, RAM receiving node test, N-Word register receiving node test and Strobe receiving node test are performed in the same test steps as the Multi-Depth FIFO receiving node functional test.
[0030] Preferably, the test cases for interface testing the MHAL interface of the DSP device include: MhalComm function functionality test, reroute_LD_sink function functionality test and LD_of function functionality test.
[0031] Preferably, the MhalComm function functional test includes a basic transmission test, a parameter verification test, a message integrity test, a stress test, an exception handling test, and an end-to-end communication test performed in sequence;
[0032] The functional test of the reroute_LD_sink function includes basic function test, parameter validity test, data integrity test during conversion, multiple conversion test, exception and boundary condition test performed in sequence;
[0033] The functionality test of the LD_of function includes a test for illegal format messages.
[0034] An MHAL interface test system comprises an operation terminal equipped with test software, a GPP device communicating with the operation terminal via CORBA, and an FPGA device and a DSP device communicating with the GPP device via line connection respectively;
[0035] The test software of the operation end is used to test the compatibility of the MHAL interface of the GPP device;
[0036] The MHAL interface of the GPP device provides an interface and driver for interacting with the FPGA device and the DSP device;
[0037] The FPGA device and the DSP device also include an MHAL interface, wherein the MHAL interface of the FPGA device provides an interface and a driver for interacting with the GPP device; the MHAL interface of the DSP device provides an interface and a driver for interacting with the GPP device;
[0038] When executing the MHAL interface test, the operation end preferentially tests whether the communication link between the operation end and the MHAL interface of the GPP device is normal. If the test result shows that the communication link between the operation end and the MHAL interface of the GPP device is normal, the operation end uses the GPP device as a bridge to perform an interface test on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device; if the test result is abnormal, the corresponding device is debugged based on the abnormal result.
[0039] The beneficial effects of the present invention include at least:
[0040] The present invention enables an operating terminal equipped with test software to communicate with a GPP device, and then uses the GPP device as a bridge to perform interface testing on the MHAL interface of an FPGA device or / and the MHAL interface of a DSP device, so that the test software can be directly connected to the MHAL interface on the GPP device to perform interface compatibility testing. This direct communication capability simplifies the test process, reduces the indirectness and uncertainty in the test process, and thus improves the accuracy and reliability of the test. Secondly, for the MHAL components of the FPGA device and the DSP device that cannot directly communicate with the test software, the test is completed by using the GPP device as an agent, thereby expanding the scope of application of the test, so that the MHAL interfaces on various computing platforms can be effectively tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 The present invention provides an MHAL interface test system framework.
[0043] Figure 2 This is a flow chart of the MHAL interface test of the GPP device provided in an embodiment of the present invention.
[0044] Figure 3 This is a flow chart of the MHAL interface test of the FPGA device provided in the embodiment of the present invention.
[0045] Figure 4This is a flow chart of the MHAL interface test of the DSP device provided in the embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0048] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0049] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0050] Example 1
[0051] See also Figure 1 As shown, a MHAL interface testing method comprises the following steps:
[0052] The operating end of the test software communicates with the GPP device through CORBA via the MHAL interface on the GPP device;
[0053] The GPP device communicates with multiple FPGA devices and multiple DSP devices through line connections respectively;
[0054] The operation end preferentially tests whether the communication link between the operation end and the MHAL interface of the GPP device is normal. If the test result shows that the communication link between the operation end and the MHAL interface of the GPP device is normal, the operation end uses the GPP device as a bridge to perform an interface test on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device; if the test result is abnormal, the corresponding device is debugged based on the abnormal result.
[0055] See also Figure 2 As shown, the test steps of the MHAL interface of the GPP device are as follows:
[0056] The test software obtains the object references of the mhal_consumer_in_port and mhal_producer_out_port ports of the MHAL interface of the GPP device;
[0057] The test software connects to the corresponding ports according to the object references of the mhal_consumer_in_port and mhal_producer_out_port ports;
[0058] After the connection is successful, the test cases are called to perform interface testing; the test cases include: pushPacket function functional testing, addTxRoute function functional testing, and getRxRoutes function functional testing;
[0059] After the test is completed, a test report is generated based on the test results, and analysis is performed based on the test report. That is, the test report is used to determine whether the test meets the expected requirements. If not, the equipment or test cases are adjusted. The specific adjustments are based on the output results of the actual situation.
[0060] Functionality test of the pushPacket function:
[0061] Test purpose: Verify that the pushPacket function can correctly push the data packet to the specified logical address and ensure the normal operation of the data path;
[0062] Test process: Use the test software to call the pushPacket function of the mhal_consumer_in_port port and pass in the correct logical address and data packet; check whether the data packet is correctly received at the corresponding logical address, and compare the received data packet with the sent data packet to ensure data integrity and consistency;
[0063] Simulate abnormal situations such as incorrect logical address or device failure, and repeat the functional flow of the pushPacket function.
[0064] Expected results: The pushPacket function should be able to push the data packet to the specified logical address without error; and the corresponding logical address should correctly receive the data packet and make an expected response; in abnormal situations, the pushPacket function should show good fault tolerance and recovery capabilities.
[0065] Functionality test of the addTxRoute function:
[0066] Test purpose: Verify that the addTxRoute function can successfully bind the specified logical address to the physical address; ensure that after the binding operation, the data can be transmitted through the corresponding path as expected;
[0067] Testing process:
[0068] Address binding: Select a logical address and specify a corresponding valid physical address for the logical address, call the addTxRoute function to perform the binding operation, and determine whether the binding is successful by checking the system configuration or status.
[0069] Data transmission verification: Send a test data packet through the bound logical address and verify whether the data packet is successfully received at the physical address; check whether the content of the received data packet is complete and correct.
[0070] Invalid parameter test: try to call the addTxRoute function with an invalid logical device identifier or an incorrect geographic address format, and verify that the function correctly returns an error or refuses to perform the binding;
[0071] Duplicate Binding Test: Performs a bind operation to the same logical device and physical address; verifies that the system rejects duplicate bindings, or updates existing bindings without generating errors;
[0072] The expected results of the addTxRoute function functional test are as follows:
[0073] The addTxRoute function should successfully bind the specified logical address to the given physical address. After the binding operation, it should be able to successfully send and receive data through the specified path without data loss or error. When invalid parameters are provided, the addTxRoute function should return an error and prevent incorrect configuration. The system should be able to correctly handle repeated binding situations to avoid configuration conflicts. The above test cases can fully verify the functionality of the addTxRoute function to ensure its reliability and effectiveness in the actual environment.
[0074] Functionality test of the getRxRoutes function:
[0075] Test purpose: Verify that the getRxRoutes function can accurately obtain and return all configured logical addresses; including the following steps:
[0076] Call the getRxRoutes function and verify that the returned list contains all expected logical addresses and is consistent with the current configuration of the system;
[0077] In the case where no receiving routes are configured, the getRxRoutes function verifies whether the returned list is empty;
[0078] The expected results of the functional test of the getRxRoutes function are as follows:
[0079] Under normal circumstances, the getRxRoutes function should be able to accurately return the logical addresses of all configured receiving routes; when no receiving routes are configured, the function should return an empty list; by implementing the above test cases, the reliability and accuracy of the getRxRoutes function in actual use can be ensured, helping to improve the overall performance and stability of the system.
[0080] See also Figure 3 As shown, the test method of the MHAL interface of the FPGA device is as follows:
[0081] Since the test software cannot directly communicate with the MHAL interface of the FPGA device, the test software sends the test case to the GPP device, which then completes the test. The specific test steps are as follows:
[0082] The test software obtains the object references of the mhal_consumer_in_port and mhal_producer_out_port ports of the MHAL interface of the GPP device;
[0083] The test software connects to the corresponding ports according to the object references of the mhal_consumer_in_port and mhal_producer_out_port ports;
[0084] After the connection is successful, the MHAL interface test case of the FPGA device is called to perform interface testing, and the test case and the corresponding logical address are passed to the test framework of the GPP device; the GPP device determines whether it is an FPGA device based on the logical address, and if so, sends the test case to the corresponding FPGA device; the test cases include: Multi-Depth FIFO sending node test, Multi-Depth FIFO receiving node test, Single-Depth FIFO receiving node test, RAM receiving node test, N-Word register receiving node test and Strobe receiving node.
[0085] After the test is completed, a test report is generated and analyzed based on the test results; that is, it is determined based on the test report whether the test results meet expectations, and debugging is performed based on the actual results.
[0086] The Multi-Depth FIFO send node test:
[0087] Test purpose: Verify that the Multi-Depth FIFO send node can correctly handle the queuing and transmission of multiple messages; ensure that the behavior of the queue at different depths is as expected, including queue full and queue empty situations; the specific test steps are as follows:
[0088] Basic functional test: Send a message to the Multi-Depth FIFO send node. Verify that the message is successfully queued and sent out in the first-in-first-out order;
[0089] Multiple message queuing test: Send multiple messages to the Multi-Depth FIFO send node continuously to verify whether all messages are successfully queued and sent out in the order in which they are sent;
[0090] Queue depth test: Send enough messages to fill the queue according to the configuration of the Multi-Depth FIFO send node; verify that when the queue is full, new messages can be processed correctly (for example, new messages are discarded or old messages are overwritten, depending on the queue's policy);
[0091] When the queue is full, send one or more messages and then remove messages from the queue to simulate a change in queue depth; verify that the queue can correctly adjust its depth and continue to send messages in first-in, first-out order;
[0092] Queue empty test: Send a series of messages, then stop sending and wait until all messages in the queue are sent. Verify that the sending node can handle it correctly when the queue is empty (for example, remain idle or send an empty message, depending on the node's configuration);
[0093] Concurrency and stress testing: Send a large number of messages to the Multi-Depth FIFO send node simultaneously under high system load; verify that the send node can operate stably under high load conditions and correctly handle the queuing and transmission of messages.
[0094] Expected Results: Single messages should be successfully queued and sent in order. Multiple messages should be queued and sent in the order they are sent. Queues should correctly handle messages at varying depths, including full and empty queues. Sending nodes should maintain functionality and stability under high load conditions.
[0095] Multi-Depth FIFO Receive Node Functionality Test:
[0096] Test purpose: Verify that the Multi-Depth FIFO receive node can correctly handle the queuing and transmission of multiple messages. Ensure that the queue behaves as expected at different depths, including queue full and queue empty conditions.
[0097] Test steps:
[0098] Basic functional test:
[0099] Send a message to the Multi-Depth FIFO Receive node. Verify that the message is received successfully and is transmitted and processed correctly.
[0100] Multiple message queue test:
[0101] Send multiple messages to a Multi-Depth FIFO receive node in succession. Verify that all messages are received successfully and processed in a first-in, first-out order.
[0102] Queue depth test:
[0103] Send enough messages to fill the queue according to the Multi-Depth FIFO configuration. Verify that the receiving node behaves as expected when the queue is full (for example, blocks new messages, drops new messages, or provides back pressure).
[0104] Queue empty test:
[0105] Put some messages in the queue, then remove all messages from the queue until the queue is empty. Verify that when the queue is empty, the receiving node keeps running and waiting for new messages to arrive.
[0106] Boundary condition testing:
[0107] Send a message to a Multi-Depth FIFO receiver node that exceeds the maximum size limit for a single message. Verify that the receiver node correctly rejects or processes messages that do not meet the size requirement.
[0108] Abnormal situation test:
[0109] Simulate outages and message loss scenarios to verify that the Multi-Depth FIFO Receiver node can correctly maintain message order and integrity under these abnormal conditions.
[0110] Expected results:
[0111] A single message should be successfully received and processed according to the predetermined process. Multiple messages should be correctly queued and processed in sequence. When the queue is full, the receiving node should correctly process the newly arrived message according to the preset strategy. When the queue is empty, the node should operate normally and wait for the arrival of new messages. In abnormal situations, the node should be able to maintain the order and integrity of the message, or perform error handling as expected.
[0112] These test steps should verify that the Multi-Depth FIFO receiver node meets the functional requirements of the design and ensure that the node can operate stably and reliably in actual deployment.
[0113] Multi-Depth FIFO Receive Node Functionality Test:
[0114] Test purpose: Verify that the Multi-Depth FIFO receive node can correctly handle the queuing and transmission of multiple messages. Ensure that the queue behaves as expected at different depths, including queue full and queue empty conditions.
[0115] Test steps:
[0116] Basic functional test: Send a message to the Multi-Depth FIFO receiving node. Verify that the message is successfully received and is transmitted and processed correctly.
[0117] Multi-message queuing test: Send multiple messages to the Multi-Depth FIFO receiving node continuously to verify that all messages are successfully received and processed in the order of first-in, first-out.
[0118] Queue depth test: Send enough messages to fill the queue according to the Multi-Depth FIFO configuration. Verify that when the queue is full, the receiving node behaves as expected (for example, blocks receiving new messages, discards new messages, or provides back pressure signals).
[0119] Queue empty test: put some messages in the queue, then remove all messages from the queue until the queue is empty. Verify that when the queue is empty, the receiving node keeps running normally and waits for new messages to arrive.
[0120] Boundary condition test: Send a message whose size exceeds the maximum limit of a single message to a Multi-Depth FIFO receiving node. Verify that the receiving node can correctly reject or process messages that do not meet the size requirements.
[0121] Abnormal situation test: simulates interruption and message loss situations to verify whether the Multi-Depth FIFO receiving node can correctly maintain the order and integrity of messages under these abnormal situations.
[0122] Expected results: A single message should be successfully received and processed according to the predetermined process. Multiple messages should be correctly queued and processed in sequence. When the queue is full, the receiving node should correctly process the newly arrived message according to the preset strategy. When the queue is empty, the node should operate normally and wait for the arrival of new messages. In abnormal situations, the node should be able to maintain the order and integrity of the message, or perform error handling as expected.
[0123] These test steps should verify that the Multi-Depth FIFO receiver node meets the functional requirements of the design and ensure that the node can operate stably and reliably in actual deployment.
[0124] For Single-Depth FIFO receive node test, RAM receive node test, N-Word register receive node test, and Strobe receive node test, refer to the Multi-Depth FIFO receive node test steps.
[0125] See also Figure 4 As shown, the MHAL interface test method of the DSP device is as follows:
[0126] Since the test software cannot directly communicate with the MHAL interface of the DSP device, the test software sends the test case to the GPP device, which then completes the test. The specific steps are as follows:
[0127] The test software obtains the object references of the mhal_consumer_in_port and mhal_producer_out_port ports of the MHAL interface of the GPP device;
[0128] The test software connects to the corresponding ports according to the object references of mhal_consumer_in_port and mhal_producer_out_port;
[0129] After the connection is successful, the test case of the DSP device is called to perform interface testing, and the test case and the corresponding logical address are passed to the test framework of the GPP device; the GPP device determines whether it is a DSP device based on the logical address, and if so, sends the test case to the corresponding DSP device; the test case includes the functional test of the MhalComm function, the functional test of the reroute_LD_sink function, and the functional test of the LD_of function;
[0130] After the test is completed, a test report is generated and analyzed based on the results of the test items.
[0131] The MhalComm function functionality test:
[0132] Test purpose: Confirm that the MhalComm function enables the DSP device to send messages through the specified message logical address; verify that the function is equivalent to the pushPacket function called in the MHAL GPP; ensure that the DSP device can send messages through the function call. The specific test steps are as follows:
[0133] Basic transmission test: create a simple test message and obtain its logical address; use the MhalComm function to send the message; verify whether the message is successfully sent and received;
[0134] Parameter validation test: Call MhalComm with an illegal bufferPtr value (such as NULL or an invalid address); verify that the function handles invalid parameters correctly (for example, returns an error code);
[0135] Message integrity testing: Send a large number of messages containing various data patterns; verify the integrity and data accuracy of each message at the receiving end;
[0136] Stress test: Continuously call the MhalComm function on the DSP device to send a large number of messages at high speed; verify whether MhalComm can still send messages reliably under high load;
[0137] Exception handling test: simulates abnormal situations that may occur in the DSP device environment (such as buffer overflow, etc.); verifies how MhalComm handles these exceptions and ensures that it can give correct error prompts or take appropriate error recovery measures;
[0138] End-to-end communication test: Set up a complete communication scenario, in which the DSP uses MhalComm to send messages and the receiving end is MHAL GPP; verify whether the message can be correctly transmitted from the DSP device to the GPP device;
[0139] Expected results:
[0140] The MhalComm function correctly handles valid bufferPtr parameters and successfully sends messages. When incorrect parameters are provided, the function should return an error code instead of causing a system crash. Even under high load, the content of the message sent should remain intact, and the communication process should be stable and reliable. In abnormal situations, the function can correctly provide error feedback and recovery.
[0141] Functionality test of reroute_LD_sink function:
[0142] Test purpose: Verify whether the reroute_LD_sink function can correctly convert the sink function of the specified logical address to another function during runtime.
[0143] Test steps:
[0144] Basic function test: select a logical address and a current sink function; call reroute_LD_sink function to convert the selected logical address's sink function to another function. Verify whether the conversion is successful and whether the new sink function has started to receive data from the logical address;
[0145] Parameter validity test: provide an invalid logical address identifier to the reroute_LD_sink function; try to convert the sink function of the logical address to an invalid or non-existent function; verify whether the function returns an error message and confirm that the system stability is not affected;
[0146] Data integrity test during conversion: During the conversion process, data is continuously sent to the logical address; confirm that the data is still complete before and after the conversion, without loss or damage.
[0147] Multiple conversion test: perform multiple sink function conversions on the same logical address; verify whether the data of the logical address can be correctly processed by the new sink function after each conversion.
[0148] Exception and boundary condition testing: Test function conversion under high load; simulate various abnormal situations (such as network delays, interruptions, etc.) and verify the robustness of the function.
[0149] Expected results: The reroute_LD_sink function should be able to complete the conversion of the sink function without interrupting the operation of the logical address; incorrect parameters should be handled correctly without affecting system stability; data should remain intact during the conversion; in the event of an abnormal or error condition, the system should be able to recover robustly.
[0150] LD_of function functionality test:
[0151] Test purpose: Confirm that the LD_of function can accurately extract logical addresses from various input messages; ensure that the extracted logical addresses meet the expected format and length requirements;
[0152] Test steps:
[0153] Valid message test: Provide an input message with a correct format and a predefined logical address; call the LD_of function to process the message; verify whether the returned value is the same as the logical address in the input message.
[0154] Illegal format message test: Provide an input message that is not in the correct format or does not contain a logical address; call the LD_of function to try to extract the logical address. Confirm whether the function can return an error or an indication of an invalid address.
[0155] Expected result: For a message with a correct format and containing a valid logical address, the LD_of function should be able to correctly return the corresponding logical address;
[0156] For messages that are malformed or do not contain a logical address, the function should return an error message or an invalid address indicator.
[0157] In summary, the embodiment of the present invention can cover multiple aspects of the MHAL interface, including functionality, compatibility, error handling capability and system recovery capability, through detailed test case design. This comprehensive test can ensure the reliability and stability of the MHAL interface in the software radio communication system, thereby ensuring the performance of the entire communication system.
[0158] The test software of this embodiment can automatically control the test process, including the sending of command parameters, the execution of test cases, the recording of test data and the generation of test reports. This highly automated test method not only greatly saves human resources, but also improves the accuracy and efficiency of the test.
[0159] The test software can directly connect to the MHAL interface on the GPP device to perform interface compatibility testing. This direct communication capability simplifies the test process, reduces indirection and uncertainty during the test, and thus improves the accuracy and reliability of the test.
[0160] For the MHAL interface of FPGA and DSP devices that cannot directly communicate with the test software, the present invention uses the GPP device as a proxy to complete the test. This proxy testing method expands the scope of application of the test, so that the MHAL interface on various computing platforms can be effectively tested.
[0161] By testing the MHAL interface early, comprehensively and accurately, the present invention can identify and fix potential interface problems, thereby reducing the risks of the communication system during actual deployment and use. This helps to increase user confidence in the communication system and reduce maintenance costs.
[0162] By providing detailed test reports and analysis, the present invention enables developers to locate problems quickly and accurately, thereby improving the development efficiency and quality of software radio communication systems.
[0163] Example 2
[0164] See also Figure 1As shown, a MHAL interface test system includes an operation terminal equipped with test software, a GPP device communicating with the operation terminal via CORBA, and an FPGA device and a DSP device communicating with the GPP device via line connection respectively;
[0165] The test software of the operation end is used to test the compatibility of the MHAL interface of the GPP device;
[0166] The MHAL interface of the GPP device provides an interface and driver for interacting with the FPGA device and the DSP device;
[0167] The FPGA device and the DSP device also include an MHAL interface, wherein the MHAL interface of the FPGA device provides an interface and a driver for interacting with the GPP device; the MHAL interface of the DSP device provides an interface and a driver for interacting with the GPP device;
[0168] When executing the MHAL interface test, the operation end preferentially tests whether the communication link between the operation end and the MHAL interface of the GPP device is normal. If the test result shows that the communication link between the operation end and the MHAL interface of the GPP device is normal, the operation end uses the GPP device as a bridge to perform an interface test on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device; if the test result is abnormal, the corresponding device is debugged based on the abnormal result.
[0169] The MHAL interface of the GPP device consists of two ports: mhal_consumer_in_port and mhal_producer_out_port; the mhal_consumer_in_port port is used to consume packet data through operations such as pushPacket, obtain packet size information and addTxRoute; the mhal_producer_out_port port is used to push packet data through operations such as pushPacket, obtain packet size information and getRxRoutes.
[0170] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A MHAL interface testing method, characterized in that: The following steps are involved: The operation terminal with the test software communicates with the GPP device through CORBA via the MHAL interface on the GPP device; The GPP device communicates with multiple FPGA devices and multiple DSP devices through line connections respectively; The operation end preferentially tests whether the communication link between the operation end and the MHAL interface of the GPP device is normal. If the test result shows that the communication link between the operation end and the MHAL interface of the GPP device is normal, the operation end uses the GPP device as a bridge to perform an interface test on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device; if the test result is abnormal, the corresponding device is debugged based on the abnormal result; The test steps of the MHAL interface of the GPP device are as follows: The test software obtains the object reference of the MHAL interface of the GPP device, and the test software on the operation end connects to the corresponding MHAL interface according to the object reference; After the connection is successful, start calling the test case to perform interface testing; After the test is completed, generate the corresponding test case report according to the test case results; The test cases include pushPacket function functional test, addTxRoute function functional test and getRxRoutes function functional test; The pushPacket function functional test includes the following steps: calling the MHAL interface through the test software, inputting the correct logical address and data packet, checking whether the data packet is correctly received at the corresponding logical address, and comparing whether the received data packet is consistent with the sent data packet; and repeating the pushPacket function functional test steps by simulating an incorrect logical address or device failure; The addTxRoute function functional test includes the following steps: Address binding: Call the MHAL interface through the test software, select a logical address, specify a valid physical address for the logical address, and call the addTxRoute function to perform the binding operation; confirm that the binding is successfully implemented by checking the system configuration or status; Data transmission verification: Send a test data packet through the bound logical address, verify whether the data packet is successfully received at the corresponding physical address, and check whether the content of the received data packet is complete and correct; Invalid parameter test: Call the addTxRoute function with an invalid logical address or incorrect geographic format, and verify that the function correctly returns an error or refuses to perform the binding; Repeated binding test: Perform repeated binding operations on the same logical address and physical address to verify whether the system rejects the repeated binding or updates the existing binding without generating errors; The getRxRoutes function functional test is used to verify that the getRxRoutes function can accurately obtain and return all configured logical addresses, including the following steps: Empty configuration test: Call the getRxRoutes function without configuring any receiving routes, and verify whether the returned list is empty; The steps of performing interface testing on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device are as follows: The test software obtains the object reference of the MHAL interface of the GPP device and connects the corresponding interface according to the obtained object reference; After the connection is successful, the test case of the MHAL interface of the FPGA device or / and the MHAL interface of the DSP device is called to perform interface testing, and the test case and the corresponding logical address are passed to the test framework of the GPP device; the GPP device determines whether it is the MHAL interface of the FPGA device or / and the MHAL interface of the DSP device according to the logical address, and if so, the test case is sent to the corresponding MHAL interface of the FPGA device or / and the MHAL interface of the DSP device; After the test is completed, a test report is generated based on the test results.
2. A MHAL interface testing method according to claim 1, characterized in that: The test cases for interface testing the MHAL interface of the FPGA device include: Multi-Depth FIFO send node functional test, Multi-Depth FIFO receive node functional test, Single-Depth FIFO receive node test, RAM receive node test, N-Word register receive node test and Strobe receive node test.
3. A MHAL interface testing method according to claim 2, characterized in that: The Multi-Depth FIFO sending node functional test includes basic function test, multi-message queuing test, queue depth test, queue empty test, boundary condition test and abnormal condition test performed in sequence; The Multi-Depth FIFO receiving node functional test includes basic function test, multi-message queuing test, queue depth test, queue empty test, boundary condition test and abnormal condition test performed in sequence; The Single-Depth FIFO receiving node test, RAM receiving node test, N-Word register receiving node test and Strobe receiving node test are performed in the same test steps as the Multi-Depth FIFO receiving node functional test.
4. The MHAL interface testing method according to claim 1, characterized in that: The test cases for interface testing the MHAL interface of the DSP device include: MhalComm function functionality test, reroute_LD_sink function functionality test and LD_of function functionality test.
5. A MHAL interface testing method according to claim 4, characterized in that: The MhalComm function functional test includes basic transmission test, parameter verification test, message integrity test, stress test, exception handling test and end-to-end communication test performed in sequence; The functional test of the reroute_LD_sink function includes basic function test, parameter validity test, data integrity test during conversion, multiple conversion test, exception and boundary condition test performed in sequence; The functionality test of the LD_of function includes a test for illegal format messages.
6. An MHAL interface testing system, used to implement an MHAL interface testing method according to any one of claims 1 to 5, characterized in that: It includes an operation terminal with test software, a GPP device communicating with the operation terminal through CORBA, and an FPGA device and a DSP device communicating with the GPP device through line connection respectively; The test software of the operation end is used to test the compatibility of the MHAL interface of the GPP device; The MHAL interface of the GPP device provides an interface and driver for interacting with the FPGA device and the DSP device; The FPGA device and the DSP device also include an MHAL interface, wherein the MHAL interface of the FPGA device provides an interface and a driver for interacting with the GPP device; the MHAL interface of the DSP device provides an interface and a driver for interacting with the GPP device; When performing the MHAL interface test, the operation end preferentially tests whether the communication link between the operation end and the MHAL interface of the GPP device is normal. If the test result shows that the communication link between the operation end and the MHAL interface of the GPP device is normal, the operation end uses the GPP device as a bridge to perform an interface test on the MHAL interface of the FPGA device and / or the MHAL interface of the DSP device. If the test result is abnormal, debug the corresponding device based on the abnormal result.
