Component communication method, device, equipment and storage medium in verification environment
By declaring the broadcast area of the sending component in the verification environment and binding the receiving component, automatic registration and one-to-many communication between components are realized, which solves the problem of cumbersome component connection, reduces development costs and improves efficiency.
Patent Information
- Application Number
- CN202411055033.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-08-02
AI Technical Summary
In a verification environment, the one-to-many communication requirement between components results in cumbersome connection operations, high development costs and prone to incorrect connections.
By declaring the broadcast section of the sending component in the preset mapping area and recording its identification relationship, the receiving component binds the target broadcast section according to the access identification, thereby realizing automated registration and one-to-many communication between components.
It simplifies the component communication process, reduces development costs, and improves development efficiency. Especially when there are a large number of receiving components, there is no need to write connection code.
Smart Images

Figure CN118585357B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a component communication method, device, electronic device and computer-readable storage medium in a verification environment. Background Art
[0002] The operational stability of the network-on-chip (NOC) is crucial. In order to ensure the operational stability of the NOC, the design of the NOC needs to be verified.
[0003] At present, the verification environment includes a large number of verification components, which need to cooperate in stimulating and testing the design under test, and there is a one-to-many communication requirement between the verification components. Specifically, when a verification component communicates with multiple other verification components, the sending interface (analysis_port, used for broadcasting) can be first declared at the entrance of the verification environment, and then the receiving port (imp, used to receive broadcast content) can be declared at the exit. Then, the sending component and multiple receiving components can be connected at the top level (env_top) of the verification platform, so as to achieve the purpose of sending data from the sending component to multiple receiving components.
[0004] However, the current solution requires connecting the sending component and each receiving component one by one. When the number of receiving components is large, the connection operation is labor-intensive and prone to incorrect connections, resulting in high development costs. Summary of the invention
[0005] Embodiments of the present application provide a component communication method, device, electronic device, and computer-readable storage medium in a verification environment to solve problems in related technologies.
[0006] In a first aspect, an embodiment of the present application provides a component communication method in a verification environment, the method comprising:
[0007] In response to a registration request for a transmitter component in an on-chip network verification environment, a broadcast area occupied by the transmitter component is declared in a preset mapping area, and a corresponding relationship between the broadcast area and an identifier of the transmitter component is recorded; the transmitter component is used to write a broadcast message into the broadcast area;
[0008] In response to a registration request for a receiving-end component in an on-chip network verification environment, an access identifier passed in by the receiving-end component is acquired, and a target broadcast area corresponding to the access identifier is determined according to the corresponding relationship, and the receiving-end component is bound to the target broadcast area;
[0009] In response to the message acquisition request of the receiving-end component, the broadcast message is acquired from the target broadcast area and sent to the receiving-end component.
[0010] In a second aspect, an embodiment of the present application provides a component communication device in a verification environment, the device comprising:
[0011] A first registration module, configured to respond to a registration request for a sender component in a network-on-chip verification environment, declare a broadcast area occupied by the sender component in a preset mapping area, and record a corresponding relationship between the broadcast area and an identifier of the sender component; the sender component is configured to write a broadcast message into the broadcast area;
[0012] A second registration module is used to respond to a registration request for a receiving-end component in the on-chip network verification environment, obtain an access identifier passed in by the receiving-end component, and determine a target broadcast area corresponding to the access identifier according to the corresponding relationship, and bind the receiving-end component to the target broadcast area;
[0013] The acquisition module is used to respond to the message acquisition request of the receiving end component, acquire the broadcast message from the target broadcast area and send it to the receiving end component.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor;
[0015] a memory for storing instructions executable by the processor;
[0016] The processor is configured to execute the instructions to implement the method of the first aspect.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.
[0018] In an embodiment of the present application, corresponding broadcast areas can be allocated to the sending-end components participating in the registration based on a mapping area for global use, and the correspondence between the broadcast areas and the identifiers of the sending-end components can be recorded. When the receiving-end component is subsequently registered, the target broadcast area corresponding to the access identifier can be determined based on the access identifier and the correspondence passed in by the receiving-end component, and the receiving-end component can be bound to the target broadcast area, so that the target broadcast area can respond to the message acquisition request of the receiving-end component, obtain the broadcast message from the target broadcast area and send it to the receiving-end component. Since the target broadcast area can be bound to multiple receiving-end components, one-to-many communication between components in the verification environment is realized. In an embodiment of the present application, the communication process only requires the sending-end component and the receiving-end component to perform automated registration operations. The parameters automatically passed in by the registration operation include relatively simple parameters such as the identifier. The entire process is simple to operate. When the number of receiving-end components is large, there is no need to write the connection code of the receiving-end components one by one, thereby reducing development costs and improving development efficiency.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a flowchart of the steps of a component communication method in a verification environment provided by an embodiment of the present application;
[0022] Figure 2 It is an architectural diagram of a verification environment provided by an embodiment of the present application;
[0023] Figure 3 It is an architecture diagram of a mapping component provided in an embodiment of the present application;
[0024] Figure 4 It is a flowchart of the specific steps of a component communication method in a verification environment provided by an embodiment of the present application;
[0025] Figure 5 It is a block diagram of a component communication device in a verification environment provided by an embodiment of the present application;
[0026] Figure 6is a block diagram of an electronic device provided by an embodiment of the present invention;
[0027] Figure 7 is a block diagram of another electronic device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and / or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the front and back associated objects are a kind of "or" relationship. In the embodiment of the present application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0030] Figure 1 , is a flowchart of a component communication method in a verification environment provided by an embodiment of the present application, such as Figure 1 As shown, the method may include:
[0031] Step 101: In response to a registration request for a transmitter component in a network-on-chip authentication environment, a broadcast area occupied by the transmitter component is declared in a preset mapping area, and a corresponding relationship between the broadcast area and an identifier of the transmitter component is recorded.
[0032] The sending end component is used to write broadcast messages into the broadcast area.
[0033] In practical applications, although multiple processor cores in a multi-core processor chip execute their own codes, data sharing and synchronization are required between processor cores. Therefore, the hardware structure of the multi-core processor must support efficient inter-core communication, and the performance of the on-chip communication structure will directly affect the performance of the processor. Therefore, the on-chip network aims to solve the communication problem within the multi-core processor. The on-chip network is an integrated circuit on a network-based communication subsystem. The on-chip network is a packet switching network based on routers between on-chip systems. The on-chip network technology draws on the interconnection network structure of parallel computers, integrating a large number of computing resources and an on-chip communication network connecting these resources on a single chip. Each processor core has an independent router and its private cache, and is connected together through an on-chip communication network. The processor cores use a message communication mechanism, and use routers and packet switching technology to replace the on-chip bus of related technologies to complete the communication task, thereby solving various bottleneck problems caused by bus interconnection in related technologies.
[0034] Specifically, in the design and development process of the network on chip, in order to meet the operational stability of the network on chip, it is also necessary to build a verification platform corresponding to the network on chip design to verify the stability of the network on chip design. The built verification platform can have a large number of components for verification stimulation. These components are related to the verification of the network on chip and are used to implement the interface configuration, model, comparison function and definition of corresponding signal timing required for starting the verification function. For example, the external interface stimulation component is used to realize the interactive interface between the verification platform and the external device, and the processor core interface stimulation component is used to realize the interactive interface between the verification platform and the processor core. Of course, there can be more types of verification stimulation components, which are not shown here one by one.
[0035] During the verification platform operation, there is a one-to-many communication requirement between these components, such as component A needs to send data to component B, component C, and component D at the same time. The relevant technology uses the top level (env_top) of the verification environment to connect the sending component and multiple receiving components respectively, so as to achieve the purpose of sending data from the sending component to multiple receiving components. However, this method is relatively cumbersome, resulting in low development efficiency.
[0036] In order to solve this problem, the embodiment of the present application can construct an independent mapping component, which is associated with a mapping area for global use, and uses a static LUT table to establish a mapping connection between the sending component and the receiving component to achieve the one-to-many communication requirements of the sending component.
[0037] In this step, refer to Figure 2, the embodiment of the present application can build a mapping component independent of other components in the verification environment, and the mapping component is associated with a mapping area, which is equivalent to a lookup table (LUT, Look-Up Table). The lookup table is a data structure or hardware resource used to quickly find and output data. The lookup table can essentially be regarded as a random access memory, in which data is written in advance, and the corresponding content is found and output through input signals (usually as addresses). Part of the area in the mapping area can be allocated to the sending component for use, and is used to store the data to be sent by the sending component through the sending port (analysis_port). In addition, the receiving component can also obtain the desired data from the part of the area through a get request through the receiving port (imp).
[0038] Furthermore, before the sending component communicates, it needs to register in the mapping component. The mapping component of the verification environment can respond to the registration request of the sending component and declare the broadcast area occupied by the sending component in the mapping area, that is, allocate a free area from the mapping area as the broadcast area occupied by the sending component. The size of the broadcast area is determined by the sending demand of the sending component, that is, the more the number of receiving components corresponding to the sending component, the larger the broadcast area. In addition, the registration request also includes the identifier of the sending component. After completing the allocation of the broadcast area, the mapping component can record the correspondence between the broadcast area allocated to the sending component and the identifier of the sending component.
[0039] Optionally, the broadcast area includes multiple regional ports; the sending end component is used to write broadcast messages to all the regional ports respectively.
[0040] Among them, refer to Figure 3 , a broadcast area can include multiple regional ports, each of which can occupy part of the broadcast area. Different regional ports occupy different areas. The sender component can write broadcast messages to each regional port. A regional port can be bound to a corresponding receiver component later. After multiple receiver components are bound to corresponding regional ports, broadcast messages can be obtained from the regional port through a get request, thereby realizing the need for one-to-many communication between the sender component and multiple receiver components.
[0041] Step 102: In response to a registration request for a receiving-end component in an on-chip network verification environment, obtain an access identifier passed by the receiving-end component, and determine a target broadcast area corresponding to the access identifier based on the corresponding relationship, and bind the receiving-end component to the target broadcast area.
[0042] In an embodiment of the present application, the receiving-end component can achieve communication by registering in the mapping component. The mapping component of the verification environment can respond to the registration request of the receiving-end component and extract the access identifier passed in by the receiving-end component from the registration request of the receiving-end component. The access identifier passed in by the receiving-end component is used to characterize the source object of the data received by the receiving-end component. For example, assuming that component B wants to receive data sent by component A, the access identifier carried in the registration request of component B is the identifier of component A.
[0043] Specifically, since the mapping component in step 101 records the correspondence between the broadcast area allocated to the sending end component and the identifier of the sending end component, after the mapping component obtains the access identifier passed in by the receiving end component, the mapping component can match the access identifier with the above-mentioned correspondence to determine the target broadcast area corresponding to the access identifier, that is, the receiving port of the receiving end component can access the target broadcast area through a binding operation to obtain the message data written by the sending end component and stored in the target broadcast area.
[0044] Optionally, the broadcast area includes a plurality of regional ports; the sending end component is used to write broadcast messages to all the regional ports respectively, and step 102 may specifically include:
[0045] Sub-step 1021: Allocate an idle target area port in the target broadcast area to the receiving-end component, and complete the binding of the receiving-end component and the target broadcast area.
[0046] In the embodiment of the present application, after determining the target broadcast area corresponding to the access identifier, an idle target area port in the target broadcast area can be allocated to the receiving end component to complete the binding of the receiving end component with the target broadcast area. Different receiving end components are bound to different target area ports.
[0047] For example, refer to Figure 2 , assuming that the sending port (port) of the sending end component is divided into broadcast areas in the mapping area including: regional port port_region_1 to regional port port_region_N; and N receiving end components are bound to these N regional ports in turn, and the N receiving end components correspond to the N regional ports one by one.
[0048] Step 103: In response to the message acquisition request of the receiving-end component, the broadcast message is acquired from the target broadcast area and sent to the receiving-end component.
[0049] In an embodiment of the present application, multiple receiving-end components can be bound to a target broadcast area. After the multiple receiving-end components are respectively bound to their respective corresponding regional ports in the target broadcast area, the receiving-end component can obtain the broadcast message from the regional port through a get request, thereby realizing the need for one-to-many communication between the sending-end component and multiple receiving-end components.
[0050] For example, refer to Figure 2 , assuming that N receiving-end components are bound to N regional ports in sequence, and the N receiving-end components correspond to the N regional ports one by one, then when the sending-end component wants to broadcast message A, the sending-end component can write message A to each of the N regional ports respectively, and the subsequent receiving-end component can obtain message A from the corresponding regional port through a get request.
[0051] In summary, in an embodiment of the present application, a corresponding broadcast area can be allocated to the sending-end component participating in the registration based on a mapping area for global use, and the correspondence between the broadcast area and the identifier of the sending-end component can be recorded. When the receiving-end component is subsequently registered, the target broadcast area corresponding to the access identifier can be determined based on the access identifier and the correspondence passed in by the receiving-end component, and the receiving-end component can be bound to the target broadcast area, so that the target broadcast area can respond to the message acquisition request of the receiving-end component, obtain the broadcast message from the target broadcast area and send it to the receiving-end component. Since the target broadcast area can be bound to multiple receiving-end components, one-to-many communication between components in the verification environment is realized. In an embodiment of the present application, the communication process only requires the sending-end component and the receiving-end component to perform automated registration operations. The parameters automatically passed in by the registration operation include relatively simple parameters such as the identifier. The entire process is simple to operate. When the number of receiving-end components is large, there is no need to write the connection code of the receiving-end components one by one, thereby reducing development costs and improving development efficiency.
[0052] Figure 4 , is a flowchart of the specific steps of a component communication method in a verification environment provided by an embodiment of the present application, such as Figure 4 As shown, the method may include:
[0053] Step 201: Respond to the registration request of the sending end component through the first function of the external component, and obtain the identifier and area size parameters passed in by the sending end component; the external component is associated with a mapping area and a memory area.
[0054] Step 202: In the mapping area, select a free area of a size represented by the area size parameter as the broadcast area.
[0055] Step 203: Record the correspondence between the broadcast area and the identifier of the sending end component in the memory area.
[0056] Optionally, the identifier includes: a custom identifier or address information of the sending end component.
[0057] In the embodiment of the present application, for steps 201-203, refer to Figure 2 The external component is a mapping component. The mapping component is associated with a mapping area and a memory area. The mapping area is used for global calls. Specifically, the free area in the mapping area can be allocated to the sending end component participating in the registration. The registration request of the sending end component can be responded to by the first function of the mapping component (not drawn in the figure).
[0058] Specifically, the registration request of the sending component may carry the identifier of the sending component and the area size parameter. The area size parameter can be used to define the size of the broadcast area, that is, the value of the total number N of area ports included in the broadcast area. For example, assuming that a sending component A wants to broadcast data to 20 receiving components, the area size parameter in the registration request corresponding to the sending component can be 20. The specific value of the area size parameter can be determined according to actual needs, and the embodiment of the present application does not make specific limitations on this.
[0059] Furthermore, the embodiment of the present application can set each area port to occupy the same size of space. After receiving the identifier and area size parameter passed in by the sending end component, the mapping component can select an idle area including area ports of the area size parameter in the mapping area as the broadcast area. In addition, the memory area can be used to record relevant information of the mapping area. Therefore, the mapping component can also record the correspondence between the broadcast area and the identifier of the sending end component in an independent memory area.
[0060] Step 204: Respond to the registration request of the receiving-end component through the second function of the external component, and obtain the access identifier passed in by the receiving-end component.
[0061] The external component is associated with a mapping area and a memory area; the memory area records the corresponding relationship between the broadcast area and the identifier.
[0062] Step 205: Match the access identifier in the memory area to determine the target broadcast area corresponding to the access identifier.
[0063] Step 206: Allocate an idle target area port in the target broadcast area to the receiving end component, and complete the binding of the receiving end component and the target broadcast area.
[0064] The broadcast area includes a plurality of regional ports; the sending end component is used to write broadcast messages to all the regional ports respectively.
[0065] In the embodiment of the present application, for steps 204-206, refer to Figure 2 and Figure 3 The receiving component can achieve communication by registering in the mapping component. The access module in the mapping component has a built-in second function. The second function can respond to the registration request of the receiving component and obtain the access identifier passed in by the receiving component. The access identifier passed in by the receiving component is used to represent the source object of the data received by the receiving component. For example, assuming that component B wants to receive data sent by component A, the access identifier carried in the registration request of component B is the identifier of component A.
[0066] Since the mapping component's memory area records the correspondence between the broadcast area allocated to the sending component and the identifier of the sending component, after the mapping component obtains the access identifier passed in by the receiving component, the mapping component can match the access identifier with the above correspondence to determine the target broadcast area corresponding to the access identifier. The mapping component can then allocate an idle target area port in the target broadcast area to the receiving component, thereby completing the binding of the receiving component and the target broadcast area.
[0067] For example, refer to Figure 2 Assuming that receiving port 1 of receiving-end component 1 is first bound to regional port 1 in the broadcast area, then for the next registered receiving-end component 2, receiving port 2 of receiving-end component 2 can be further bound to the idle regional port 2 in the broadcast area, and so on, the binding of N receiving-end components is completed sequentially.
[0068] In the embodiment of the present application, a broadcast area may include multiple regional ports, each regional port may occupy part of the area in the broadcast area, different regional ports may occupy different areas, and the sending end component may write broadcast messages to each regional port. Multiple receiving end components may be bound to a target broadcast area, and after multiple receiving end components are respectively bound to their respective corresponding regional ports in the target broadcast area, the receiving end component may obtain the broadcast message from the regional port through a get request, thereby realizing the need for the sending end component to perform one-to-many communication with multiple receiving end components.
[0069] Step 207: In response to the message acquisition request of the receiving-end component, acquire the message identifier transmitted by the receiving-end component.
[0070] Step 208: Determine a target broadcast message that matches the message identifier among all broadcast messages stored in the target broadcast area corresponding to the receiving-end component, and send the target broadcast message to the receiving-end component.
[0071] In the embodiment of the present application, for steps 207-208, refer to Figure 2The receiving-end component can initiate a message acquisition request (get request) to the mapping component through the corresponding receiving port, so that the mapping component can respond to the message acquisition request, extract the broadcast message requested by the message acquisition request from the regional port bound to the receiving-end component, and send the target broadcast message to the receiving-end component.
[0072] For example, assuming that the sending component writes message 1, message 2 and message 3 to each regional port through the sending port, if the message acquisition request issued by the receiving component 1 is to request to obtain message 2, the mapping component can respond to the message acquisition request, extract message 2 from regional port 1 and transmit it to the receiving component 1; if the message acquisition request issued by the receiving component 3 is to request to obtain message 1, the mapping component can respond to the message acquisition request, extract message 1 from regional port 3 and transmit it to the receiving component 3.
[0073] Optionally, it may also include:
[0074] Step 209: When there is no idle target area port in the target broadcast area, an error message is returned to the receiving end component.
[0075] In the embodiment of the present application, when the mapping component allocates a regional port in the target broadcast area to the receiving end component, if there is no idle target regional port currently, the mapping component returns an error message to the receiving end component to inform the receiving end component that it is currently unable to communicate with the receiving end component, so that the receiving end component waits for an idle target regional port to appear in the target broadcast area later, and then allocates the port.
[0076] In summary, in an embodiment of the present application, a corresponding broadcast area can be allocated to the sending-end component participating in the registration based on a mapping area for global use, and the correspondence between the broadcast area and the identifier of the sending-end component can be recorded. When the receiving-end component is subsequently registered, the target broadcast area corresponding to the access identifier can be determined based on the access identifier and the correspondence passed in by the receiving-end component, and the receiving-end component can be bound to the target broadcast area, so that the target broadcast area can respond to the message acquisition request of the receiving-end component, obtain the broadcast message from the target broadcast area and send it to the receiving-end component. Since the target broadcast area can be bound to multiple receiving-end components, one-to-many communication between components in the verification environment is realized. In an embodiment of the present application, the communication process only requires the sending-end component and the receiving-end component to perform automated registration operations. The parameters automatically passed in by the registration operation include relatively simple parameters such as the identifier. The entire process is simple to operate. When the number of receiving-end components is large, there is no need to write the connection code of the receiving-end components one by one, thereby reducing development costs and improving development efficiency.
[0077] Figure 5: is a block diagram of a component communication device in a verification environment provided by an embodiment of the present application, the device comprising:
[0078] The first registration module 301 is used to respond to a registration request for a sender component in a network-on-chip verification environment, declare a broadcast area occupied by the sender component in a preset mapping area, and record a corresponding relationship between the broadcast area and an identifier of the sender component; the sender component is used to write a broadcast message into the broadcast area;
[0079] The second registration module 302 is used to respond to a registration request for a receiving-end component in the on-chip network verification environment, obtain an access identifier passed by the receiving-end component, and determine a target broadcast area corresponding to the access identifier according to the corresponding relationship, and bind the receiving-end component to the target broadcast area;
[0080] The acquisition module 303 is used to respond to the message acquisition request of the receiving end component, acquire the broadcast message from the target broadcast area and send it to the receiving end component.
[0081] Optionally, the broadcast area includes a plurality of regional ports; the sending end component is used to write broadcast messages to all the regional ports respectively;
[0082] The second registration module 302 includes:
[0083] The binding submodule is used to allocate an idle target area port in the target broadcast area to the receiving end component, so as to complete the binding between the receiving end component and the target broadcast area.
[0084] Optionally, the first registration module 301 includes:
[0085] An acquisition submodule, used to respond to the registration request of the sending end component through a first function of the external component, and acquire the identifier and area size parameters passed in by the sending end component; the external component is associated with a mapping area and a memory area;
[0086] A selection submodule, configured to select, in the mapping area, a free area of a size represented by the area size parameter as the broadcast area;
[0087] The recording submodule is used to record the corresponding relationship between the broadcast area and the identifier of the sending end component in the memory area.
[0088] Optionally, the second registration module 302 includes:
[0089] The access identification submodule is used to respond to the registration request of the receiving end component through the second function of the external component, and obtain the access identification passed by the receiving end component; the external component is associated with a mapping area and a memory area; the memory area records the corresponding relationship between the broadcast area and the identification;
[0090] The matching submodule is used to match the access identifier in the memory area to determine the target broadcast area corresponding to the access identifier.
[0091] Optionally, the device further comprises:
[0092] The error reporting module is used to return error information to the receiving end component when there is no idle target area port in the target broadcast area.
[0093] Optionally, the acquisition module 303 includes:
[0094] A message identification submodule, used to obtain the message identification transmitted by the receiving end component in response to the message acquisition request of the receiving end component;
[0095] The sending submodule is used to determine a target broadcast message matching the message identifier among all broadcast messages stored in the target broadcast area corresponding to the receiving end component, and send the target broadcast message to the receiving end component.
[0096] Optionally, the identifier includes: a custom identifier or address information of the sending end component.
[0097] In summary, in an embodiment of the present application, a corresponding broadcast area can be allocated to the sending-end component participating in the registration based on a mapping area for global use, and the correspondence between the broadcast area and the identifier of the sending-end component can be recorded. When the receiving-end component is subsequently registered, the target broadcast area corresponding to the access identifier can be determined based on the access identifier and the correspondence passed in by the receiving-end component, and the receiving-end component can be bound to the target broadcast area, so that the target broadcast area can respond to the message acquisition request of the receiving-end component, obtain the broadcast message from the target broadcast area and send it to the receiving-end component. Since the target broadcast area can be bound to multiple receiving-end components, one-to-many communication between components in the verification environment is realized. In an embodiment of the present application, the communication process only requires the sending-end component and the receiving-end component to perform automated registration operations. The parameters automatically passed in by the registration operation include relatively simple parameters such as the identifier. The entire process is simple to operate. When the number of receiving-end components is large, there is no need to write the connection code of the receiving-end components one by one, thereby reducing development costs and improving development efficiency.
[0098] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0099] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0100] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0101] An embodiment of the present application provides a component communication device in a verification environment, including a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to include methods for performing one or more of the above embodiments.
[0102] Figure 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0103] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0104] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0105] The memory 604 is used to store various types of data to support the operation of the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, multimedia, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0106] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0107] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0108] The audio component 610 is used to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0109] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0110] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0111] The communication component 616 is used to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0112] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement the methods provided in the embodiments of the present application.
[0113] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0114] Figure 7is a block diagram of an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. Figure 7 The electronic device 700 includes a processing component 722, which further includes one or more processors, and a memory resource represented by a memory 732 for storing instructions that can be executed by the processing component 722, such as an application. The application stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform the method provided in the embodiment of the present application.
[0115] The electronic device 700 may also include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the memory 732, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, FreeBSD TM or the like.
[0116] An embodiment of the present application further provides a computer program product, including a computer program, which implements the method described in the above embodiment when executed by a processor.
[0117] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0118] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A component communication method in a verification environment, characterized in that: The method comprises: Responding to the registration request of the sending end component through the first function of the external component, obtaining the identifier and area size parameters passed in by the sending end component; the external component is associated with a mapping area and a memory area; In the mapping area, a free area of a size represented by the area size parameter is selected as a broadcast area, and a corresponding relationship between the broadcast area and the identifier of the sending end component is recorded in the memory area; the sending end component is used to write a broadcast message into the broadcast area; In response to a registration request for a receiving-end component in an on-chip network verification environment, obtaining an access identifier passed in by the receiving-end component, and determining a target broadcast area corresponding to the access identifier according to the corresponding relationship in the memory area, and binding the receiving-end component to the target broadcast area; In response to the message acquisition request of the receiving-end component, the broadcast message is acquired from the target broadcast area and sent to the receiving-end component.
2. The component communication method in a verification environment according to claim 1, characterized in that: The broadcast area includes a plurality of regional ports; the sending end component is used to write broadcast messages to all the regional ports respectively; The step of binding the receiving end component to the target broadcast area includes: An idle target area port in the target broadcast area is allocated to the receiving end component, thereby completing the binding of the receiving end component with the target broadcast area.
3. The component communication method in a verification environment according to claim 1, characterized in that: The step of obtaining, in response to a registration request for a receiving-end component in an on-chip network verification environment, an access identifier passed in by the receiving-end component, and determining, according to the corresponding relationship, a target broadcast area corresponding to the access identifier, comprises: Responding to the registration request of the receiving end component through the second function of the external component to obtain the access identifier passed by the receiving end component; the external component is associated with a mapping area and a memory area; the memory area records the corresponding relationship between the broadcast area and the identifier; The access identifier is matched in the memory area to determine a target broadcast area corresponding to the access identifier.
4. The component communication method in a verification environment according to claim 2, characterized in that: The method further comprises: When there is no idle target area port in the target broadcast area, an error message is returned to the receiving end component.
5. The component communication method in a verification environment according to claim 2, characterized in that: The step of obtaining a broadcast message from the target broadcast area and sending the broadcast message to the receiving end component in response to the message acquisition request of the receiving end component includes: In response to the message acquisition request of the receiving-end component, acquiring the message identifier transmitted by the receiving-end component; Among all broadcast messages stored in the target broadcast area corresponding to the receiving-end component, a target broadcast message matching the message identifier is determined, and the target broadcast message is sent to the receiving-end component.
6. The component communication method in a verification environment according to any one of claims 1 to 5, characterized in that: The identifier includes: a custom identifier or address information of the sending end component.
7. A component communication device in a verification environment, characterized in that: The device comprises: A first registration module is used to respond to the registration request of the sending end component through the first function of the external component, and obtain the identifier and area size parameter passed in by the sending end component; the external component is associated with a mapping area and a memory area; in the mapping area, a free area of the size represented by the area size parameter is selected as a broadcast area, and the corresponding relationship between the broadcast area and the identifier of the sending end component is recorded in the memory area; the sending end component is used to write a broadcast message into the broadcast area; A second registration module is used to respond to a registration request for a receiving-end component in the on-chip network verification environment, obtain an access identifier passed in by the receiving-end component, and determine a target broadcast area corresponding to the access identifier according to the corresponding relationship in the memory area, and bind the receiving-end component to the target broadcast area; The acquisition module is used to respond to the message acquisition request of the receiving end component, acquire the broadcast message from the target broadcast area and send it to the receiving end component.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 6.
