CN107566204B - Excitation message generation control method and device and logic detection equipment - Google Patents

Excitation message generation control method and device and logic detection equipment Download PDF

Info

Publication number
CN107566204B
CN107566204B CN201610516589.XA CN201610516589A CN107566204B CN 107566204 B CN107566204 B CN 107566204B CN 201610516589 A CN201610516589 A CN 201610516589A CN 107566204 B CN107566204 B CN 107566204B
Authority
CN
China
Prior art keywords
message
flow
module
excitation
traffic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610516589.XA
Other languages
Chinese (zh)
Other versions
CN107566204A (en
Inventor
朱仁霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201610516589.XA priority Critical patent/CN107566204B/en
Priority to PCT/CN2017/086367 priority patent/WO2018001025A1/en
Publication of CN107566204A publication Critical patent/CN107566204A/en
Application granted granted Critical
Publication of CN107566204B publication Critical patent/CN107566204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides an excitation message generation control method, an excitation message generation control device and logic detection equipment, wherein the method comprises the following steps: acquiring message parameters of all excitation messages to be generated according to the analyzed network flow structure to be simulated; and calling a flow module to generate an excitation message flow according to the message parameters of each excitation message. The embodiment of the invention obtains the message types of all the excitation messages to be generated by analyzing the structure of the network flow to be simulated, carries out the modeling of the excitation messages according to the message types of all the excitation messages to generate corresponding message models, generates corresponding excitation message flows according to the message models of all the excitation messages through the flow module, and can conveniently generate complex excitation messages.

Description

Excitation message generation control method and device and logic detection equipment
Technical Field
The present invention relates to the field of communication device design, and in particular, to a method and an apparatus for controlling generation of an excitation packet, and a logic detection device.
Background
Logic verification is a key step in the front-end design process of the digital chip, the verification platform simulates the actual operation environment of the chip, and the correctness of the functions of the chip is checked through a test case. The core problem of simulating the chip operation environment is to simulate the excitation input to the chip in actual operation, for a large number of network data chips, various types of network messages are the most important excitation, how to simulate a complex flow model on a network, and higher requirements are provided for the compiling of a verification platform.
At present, the verification methodology is adopted as one of the trends of chip verification, UVM (unified verification methodology) is a typical representative thereof, the architecture diagram of the UVM system is shown in fig. 1, the most important multiplexing unit in the UVM architecture is a bus Agent (Agent), a verifier generates a transaction-level packet (transaction) by writing a Sequence (Sequence) in a sequencer (Sequence), converts the transaction-level packet into an interface excitation signal through a Driver (Driver) and acts on a bus interface, and a Monitor (Monitor) collects the bus signal, converts the transaction-level packet back, and sends the transaction-level packet to a score board (scoreboard) for automatic alignment.
However, the generation of the excitation in the UVM is completed by a sequence mechanism, which is a general excitation generation method, and the generated excitation message has a single type and cannot simulate message types in more and more complex communication scenes, thereby causing inaccurate test results.
Disclosure of Invention
The embodiment of the invention provides an excitation message generation control method, an excitation message generation control device and logic detection equipment, and aims to solve the problem that excitation messages generated by the existing UVM method are single in type.
In one aspect, a method for controlling generation of an excitation packet is provided, including:
acquiring message parameters of all excitation messages to be generated according to the analyzed network flow structure to be simulated;
and calling a flow module to generate an excitation message flow according to the message parameters of each excitation message.
In one aspect, an excitation packet generation control apparatus is provided, including: an analysis module and a control module, wherein,
the analysis module is used for acquiring message parameters of all excitation messages to be generated according to the network flow structure to be simulated obtained through analysis;
the control module is used for calling the flow module to generate an excitation message flow according to the message parameters of each excitation message.
On the other hand, the logic detection equipment comprises at least one flow module for generating an excitation message flow, a result analysis device and the excitation message generation control device provided by the embodiment of the invention, wherein the excitation message generation control device is used for calling the flow module to generate the excitation message flow and testing, and the result analysis device is used for analyzing a test result.
In another aspect, a computer storage medium is provided, in which computer-executable instructions are stored, and the computer-executable instructions are used for executing the excitation message generation control method.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides an excitation message generation control method and logic detection equipment, the method obtains the message types of all excitation messages to be generated by analyzing the structure of network flow to be simulated, calls at least one flow module, carries out the modeling of the excitation messages according to the message types of all the excitation messages, generates corresponding message models, and generates corresponding excitation message flows according to the message models of all the excitation messages through the flow module, namely, provides a standardized message layer flow model modeling method, and can effectively and conveniently generate complex excitation messages from the models, and the method has the effects of but not limited to: 1. supporting any piece of flow model at any level; 2. supporting various dispatching modes of the flow in the port: such as polling, prioritized polling, customization, etc.; 3. supporting flow size control of each flow; 4. supporting a plurality of flow message packet sending modes: such as continuous packet sending, fixed number packet sending, timing packet sending, self-defining and the like: 5. network traffic models supporting mainstream, such as packet, time division multiplexing, fixed size packet, and the like; therefore, the defects of the existing excitation message generation method are overcome.
Drawings
Fig. 1 is a schematic diagram of a conventional UVM system;
fig. 2 is a flowchart of an excitation message generation control method according to a first embodiment of the present invention;
fig. 3 is a schematic structural diagram of an excitation message generation control apparatus according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of a message layer model disclosed in a fourth embodiment of the present invention;
FIG. 5 is a schematic diagram of a flow module connection according to a fourth embodiment of the present invention;
fig. 6 is a schematic flow chart of a message generation control method disclosed in a fourth embodiment of the present invention;
fig. 7 is a schematic flow chart of a message generation method disclosed in the fourth embodiment of the present invention;
fig. 8 is a schematic flow chart of a message flow detection method disclosed in the fourth embodiment of the present invention;
fig. 9 is a schematic flow chart of a message application method disclosed in the fourth embodiment of the present invention;
FIG. 10 is a first schematic diagram of a single-port traffic cascade as disclosed in a fourth embodiment of the present invention;
FIG. 11 is a second schematic diagram of a single-port traffic cascade as disclosed in a fourth embodiment of the present invention;
FIG. 12 is a third schematic diagram of a single-port traffic cascade as disclosed in a fourth embodiment of the present invention;
fig. 13 is a fourth schematic diagram of single-port traffic concatenation according to a fourth embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention will now be further explained by means of embodiments in conjunction with the accompanying drawings.
The first embodiment:
fig. 2 is a flowchart of an excitation packet generation control method according to a first embodiment of the present invention, and as can be seen from fig. 2, the excitation packet generation control method according to this embodiment includes:
s201: acquiring message parameters of all excitation messages to be generated according to the analyzed network flow structure to be simulated;
in practical application, the message parameter includes at least one of a message type, a message field, an error type, a message packet packing mode, a message unpacking mode, and the like.
S202: calling a flow module to generate an excitation message flow according to the message parameters of each excitation message;
the flow modules are called according to the complexity of the network flow structure to be simulated, when the network flow structure is simpler, only one flow module can be called, and if the network flow structure is more complex, a plurality of flow modules need to be scheduled to be connected in parallel and/or in series.
In practical applications, the message model is matched with the parameter types of the message parameters.
In some embodiments, the generating of the excitation message stream in step S202 in the embodiment shown in fig. 2 includes:
selecting an excitation message flow to be generated;
judging whether each message flow in the excitation message flow can be transmitted;
if the packet can be sent, generating corresponding message flows, and combining the generated message flows into an excitation message flow.
In some embodiments, the determining whether the packet flow can be packetized in the above embodiments includes:
detecting whether the message flow exceeds the flow; in practical application, if the message flow does not exceed the flow, the judgment result is that the packet sending cannot be performed;
if the message flow does not exceed the flow, detecting a packet sending mode of the message flow, wherein the packet sending mode comprises a packet sending mode and a packet sending mode; in practical application, if the packet sending mode is that the packet sending is not possible, the judgment result is that the packet sending is not possible;
if the packet sending mode is packet sending available, detecting whether the attributive flow module of the message flow module generating the message flow is a source flow module which is not connected with the upstream flow module. The home traffic module refers to a parent traffic module defined below; a source flow module refers to a flow module that is not connected to an upstream flow module when the flow module is operating, which is also clearly defined below; judging whether the father flow module is connected with an upstream flow module or not, namely judging whether the father flow module is a source flow module or not, wherein the source flow module is a flow module which is not connected with the upstream flow module; in practical application, if the home traffic module is not connected to the upstream traffic module, that is, the parent traffic module is the source traffic module, the determination result is that the packet can be sent.
Further, in some embodiments, the determining whether the packet flow can be packetized in the above embodiments further includes:
detecting the buffer size of the message flow module under the condition that the attribution flow module is not a source flow module which is not connected with an upstream flow module;
and judging whether the cache meets the packet sending requirement or not. In practical application, the packet sending has a certain requirement on the cache of the message flow module, so that the packet can be sent if the cache meets the packet sending requirement.
Further, in some embodiments, after determining whether the cache meets the packet sending requirement, the method in the above embodiments further includes:
under the condition that the cache does not meet the packet sending requirement, sending a message application;
and after the application is successful, the cache size is detected again, and whether the cache meets the packet sending requirement is judged.
By applying for sending the message, the flow module allocates a cache resource for the message, and at this time, whether the cache meets the packet sending requirement needs to be newly judged.
In some embodiments, step S202 in the embodiment shown in fig. 2 comprises:
controlling the called flow module to generate a message model of each excitation message according to the message parameter of each excitation message;
controlling the called flow module to register the message model to the message flow module in a parameter form to generate a message flow model;
configuring the priority, the packet sending mode and the flow size of each message flow module according to a network flow structure to be simulated;
when an excitation message flow needs to be generated, selecting an attribution flow module of each message flow module according to a configuration result and connecting the attribution flow modules;
and controlling the attribution flow module of each message flow module, generating a message flow model and a corresponding message flow, and combining the generated message flows into an excitation message flow and then outputting the excitation message flow.
Second embodiment:
fig. 3 is a schematic structural diagram of an excitation packet generation control device according to a second embodiment of the present invention, and as can be seen from fig. 3, the excitation packet generation control device according to this embodiment includes: an analysis module 31 and a control module 32, wherein,
the analysis module 31 is configured to obtain message parameters of each excitation message to be generated according to the network traffic structure to be simulated obtained through analysis;
the control module 32 is configured to invoke the traffic module to generate an excitation packet stream according to the packet parameter of each excitation packet.
In some embodiments, the control module 32 in the foregoing embodiments is configured to select excitation packet flows that need to be generated, determine whether each packet flow in the excitation packet flows can be packetized, generate a corresponding packet flow if the packet flow can be packetized, and combine the generated packet flows into the excitation packet flow.
In some embodiments, the control module 32 in the foregoing embodiments is configured to detect whether a packet flow exceeds a flow, detect a packet sending mode of the packet flow if the packet flow does not exceed the flow, and detect whether a home flow module of a packet flow module generating the packet flow is a source flow module unconnected with an upstream flow module if the packet sending mode is capable of sending a packet.
In some embodiments, the control module 32 in the foregoing embodiments is configured to, when the home traffic module is not a source traffic module unconnected to the upstream traffic module, detect a buffer size of the packet flow module, and determine whether the buffer meets a packet sending requirement.
In some embodiments, the control module 32 in the foregoing embodiments is configured to send a message application when the cache does not meet the packet sending requirement, and after the application is successful, re-detect the size of the cache, and determine whether the cache meets the packet sending requirement.
In some embodiments, the control module 32 in the above embodiments is configured to control the called traffic module to generate a message model of each excitation message according to a message parameter of each excitation message, control the called traffic module to register the message model in a parameter form to the message flow module to generate a message flow model, configure a priority, a packet sending mode, and a traffic size of each message flow module according to a network traffic structure to be simulated, select and connect an affiliation traffic module of each message flow module according to a configuration result when an excitation message flow needs to be generated, control the affiliation traffic module of each message flow module to generate a message flow model and a corresponding message flow, and combine the generated message flows into an excitation message flow to be output.
In practical applications, all the functional modules in the embodiment shown in fig. 3, such as the analysis module 31 and the control module 32, can be implemented by using a processor, an editing logic device, and the like.
The third embodiment:
the embodiment of the invention provides logic detection equipment, which comprises at least one flow module for generating an excitation message flow, an excitation message generation control device and a result analysis device, wherein the excitation message generation control device is used for calling the flow module to generate the excitation message flow and test the excitation message flow, and the result analysis device is used for analyzing a test result.
In some embodiments, the traffic module in the above embodiments includes an ingress scheduler for connection between traffic modules and ingress packet scheduling; the export dispatcher is used for the connection between the flow modules and the dispatch of the export message; the packet sending device is used for establishing a mapping relation with a packet sender of a bottom layer interface and providing a message port of a related packet sending interface; and at least one message flow module for generating a message flow according to the message model; and at least one message module for generating a message model.
In some embodiments, the traffic module in the above embodiments further includes a sub-traffic module and/or a sub-packet flow module.
In some embodiments, the message flow module in the above embodiments includes a flow controller, a flow generator, and an upstream message buffer queue.
In some embodiments, the excitation packet generation control device in the foregoing embodiments is configured to invoke a plurality of traffic modules in a parallel and/or cascade manner to generate an excitation packet flow.
The fourth embodiment:
the present invention will now be further explained with reference to specific application scenarios.
The embodiment provides a standardized message layer traffic model modeling method on the basis of a hierarchical verification architecture, and a complex excitation message can be effectively and conveniently generated from the model, wherein the characteristics of the excitation message include but are not limited to:
1. supporting any piece of flow model at any level;
2. supporting various dispatching modes of the flow in the port: such as polling, prioritized polling, customization, etc.;
3. supporting flow size control of each flow;
4. supporting a plurality of flow message packet sending modes: such as continuous sending, fixed number sending, timing sending, self-defining and the like;
5. network traffic models supporting mainstream, such as packet, time division multiplexing, fixed size packet, and the like;
therefore, the defects of the existing excitation message generation method are overcome.
It is foreseeable that the excitation message generation method based on the model of the present embodiment does not depend on the existing UVM or hierarchical verification architecture, and the method can be widely applied to various verification methodologies and verification architectures.
This embodiment provides a message traffic model component architecture, as shown in fig. 4, the basic components of the model include:
packet _ item: modeling network messages, encapsulating related attributes of the messages, such as message types, message fields, error types and the like, and a method for packaging and unpacking the messages;
packet _ flow): the minimum unit for forming the flow model is used for modeling one message flow forming the flow model and is responsible for generating the required excitation message. The message flow is independent of the specific message type, and the message (packet _ item) is registered into the message flow as a parameter. The method for generating the message by message flow encapsulation comprises two main functional modules of a flow controller and a flow generator and an upstream message buffer queue (non-source flow module).
Traffic module (packet _ module): the traffic module is a basic multiplexing unit of a message traffic model, models a certain traffic model, is an aggregation of a group of message traffic, and can also comprise a sub-traffic module, so that the traffic module is a combination of the message traffic and the sub-traffic module.
The present embodiment provides a structure of a flow module, as shown in fig. 5.
Ingress scheduler (import _ scheduler): the system comprises an entrance scheduler, an exit scheduler and a data processing module, wherein the entrance scheduler is used for the connection between modules and the entrance message scheduling and can be connected with the exit scheduler of an upstream module;
egress scheduler (egress _ scheduler): the system is used for connection among modules and dispatching the export messages, and the export dispatcher can be connected with the export dispatcher of a father flow module and can also be connected with the entry dispatcher of a downstream module;
packet _ port: the message port and the packet sender of the bottom layer interface establish a mapping relation and provide a related packet sending interface. And the bottom layer interface applies for the message to the flow model through a method provided by the message port and obtains the message returned by the flow model.
The method can also comprise the following steps:
sub-traffic block (sub _ packet _ block): the traffic module may contain a traffic module, in which case the contained traffic module is referred to as a child traffic module of the traffic module and the traffic module is referred to as a parent traffic module of the contained traffic module.
Sub _ packet _ flow): a traffic module may contain a message stream, in which case the contained message stream is referred to as a child message stream of the traffic module and the traffic module is referred to as a parent traffic module of the contained message stream. The message flow is the minimum unit of the flow combination and cannot continuously contain the sub-message flows.
Through various connections and combinations of traffic modules, a complex hierarchical network traffic model can be constructed, as shown in fig. 5:
and (3) combination of flow rates: refers to the manner in which sub-flow modules are included in a flow module. The flow modules and the message flows contained in the combination are in independent parallel relation. In the combination, the outlet schedule of the sub-traffic module is connected with the outlet schedule of the parent traffic module, and the inlet schedule of the sub-traffic module is connected with the inlet schedule of the parent traffic module.
Cascading of flows: refers to the manner in which the traffic modules are externally interconnected. The traffic module in the cascade relation is a kind of upstream and downstream hierarchical relation in the actual network, generally speaking, after the message of a certain network traffic is encapsulated into a new type of message in the form of combination or division, it runs in another type of network traffic. Two flow modules in a cascade relationship may be referred to as an upstream module and a downstream module according to a relative positional relationship. A flow module may be coupled to any number of upstream modules and may be coupled to any number of downstream modules. The ingress schedule of the downstream module is linked to the egress schedule of the upstream module to establish a link.
The combined cascade of the flow among different levels can be very complex, and a plurality of flow modules at multiple levels are combined and cascaded together to form a network topology structure similar to a tree. The embodiment provides a feature definition of part of special traffic modules in a traffic model topology, as shown in fig. 5:
top layer traffic module (top _ block): for the combination, the traffic module without the parent traffic module is called the top traffic module;
a source _ block, wherein a flow module without an upstream flow module is referred to as a source flow module for a cascade; the message of the source flow module has no upstream, and the message is generated by the source flow module, so that an instantiated entrance scheduler is not needed.
Root traffic module (root _ block): for a top-level traffic module without a downstream traffic module, called the root traffic module; the downstream of the root traffic module actually corresponds to a physical port of the bottom layer, so that a packet _ port needs to be instantiated in the root traffic module, and a non-root traffic module does not need to be instantiated.
After the topology structure of the flow model is designed, the generation of the flow model and the generation of the message can be completed by the mutual calling of the component interfaces, each component interface defined herein is a simplified abstract definition for the convenience of description, only describes part of main interfaces, does not represent actual program codes, and does not describe the actual program codes completely.
The present embodiment provides a flow module (packet _ module) interface definition, as shown in table 1 below:
TABLE 1
Figure DEST_PATH_IMAGE002
Wherein add _ sub _ block (): and adding a sub-flow module, wherein the sub-flow module contained in the module needs to be registered through the interface to complete the establishment of internal connection.
add _ sub _ flow (): and adding the sub-message flow, wherein the sub-message flow contained in the module needs to be registered through the interface, and the establishment of the internal connection is completed.
connect (): and connecting the upstream module, establishing a cascade relation with the upstream flow module, registering the module into an exit scheduler of the upstream module, and completing the establishment of a relevant link.
This embodiment provides a packet _ flow interface definition, as shown in table 2 below:
TABLE 2
Figure DEST_PATH_IMAGE004
Wherein, send _ request (): and submitting a message application to the entrance scheduler, and returning the state of success or failure of the application to the interface. The interface also provides for the selection of designated upstream modules and designated message flow parameters.
gen _ packet (): and generating a message, wherein the interface generates a message registered in the message stream by default, and simultaneously provides a fixed number of message generation modes such as timed packet sending and the like for configuration, and also provides a corresponding hook function for a user to define a packet sending method by self.
tm _ is _ ok (): checking the flow control state, wherein the user needs to configure the flow size of the flow, the flow controller can calculate the current message authorization surplus according to the configured flow size, return the required flow control when the message authorization surplus exceeds the configured flow size, and return the unnecessary flow control all the time by default when the message authorization surplus does not exceed the configured flow size.
check _ queue _ size (): and checking whether the buffer queue has enough messages for processing, and only when the buffer queue is insufficient, initiating a message application to upstream.
The present embodiment provides an egress _ scheduler interface definition, as shown in table 3 below:
TABLE 3
Figure DEST_PATH_IMAGE006
Wherein, choose _ next _ flow (): and selecting the next message flow to be processed, wherein the interface is used for defining a scheduling algorithm of the message flow in the module, defaulting scheduling algorithm configurations such as supporting polling and priority polling, and providing a hook function for a user to define the scheduling algorithm. The interface returns a message status, for example, when the user configures the scheduling algorithm as a polling algorithm and the message generation interfaces of all the sub-message streams return a failure status because of the flow control, the interface returns a failure status. The interface also provides parameters specifying the message flow for input, and the user can specify the message to generate the message flow, in which case the interface returns the message generation status of the specified message flow. For the case where the sub-modules are included in the combination, the interface recursively invokes the interface of the sub-module until the message stream is found.
try _ next _ packet (): and acquiring a message from the message flow, calling the interface of the message flow to acquire the message according to the message flow selected by the cache _ next _ flow (), and returning to the message generation state.
chop _ return _ block (): the method comprises the steps that a message is selected to be returned to a downstream module, the interface defines a flow module distribution algorithm of the returned message, under the default condition, the interface returns a module applying for the message, under some conditions, the generated message needs to be distributed to the downstream module according to a configured algorithm, then the returned message is the other downstream module, and the interface provides a hook function for a user to define the distribution algorithm.
send _ packet (): calling a chorose _ return _ flow () interface in the entry scheduling of the downstream module to obtain a message flow needing to be returned according to a downstream module returned by the chorose _ return _ block (), storing the message into a cache of a corresponding message flow, if the message flow applying the message is not directly returned, the message application cannot be completed, then continuing calling a chorose _ next _ flow () interface and get _ next _ packet () interface to obtain the message until the message application is met, and deleting the request after the message application is completed.
The present embodiment provides an entry scheduling (import _ scheduler) interface definition, as shown in table 4 below:
TABLE 4
Figure DEST_PATH_IMAGE008
Wherein, choose _ next _ block (): and selecting a next flow module to be processed, wherein the interface realizes a module selection algorithm of a message request, and when a message stream sends a message request send _ request (), the inlet scheduling selects which flow module to send the message request according to the configured selection algorithm, defaults to adopt a polling algorithm, and also provides a hook function for a user to define a distribution algorithm.
chopase _ return _ flow (): the interface realizes a message flow distribution algorithm of the returned message, determines the returned message flow according to the selection algorithm for the message returned by the upstream module, defaults to adopt a polling algorithm, and also provides a hook function for a user to define the distribution algorithm. For the case of containing sub-modules, the corresponding interfaces of the sub-modules are called recursively until a message stream is found.
This embodiment provides a packet port interface definition, as shown in table 5 below:
TABLE 5
Figure DEST_PATH_IMAGE010
Wherein, try _ next _ packet (): and obtaining a message, wherein the interface returns a message generation state, and failure is returned when the message is not generated.
set _ sequence (): and setting bottom port connection to obtain a handle of a bottom physical port packet sender.
Correspondingly, the embodiment provides a group of configuration interfaces and hook functions for modification by a user, and can flexibly generate various test excitation messages on the basis of the flow model.
Message flow enabled interface: opening or closing a certain message flow;
message flow priority configuration interface: configuring the priority of the message flow, wherein the default message flow has the same priority;
message flow configuration interface: configuring the message flow;
configuring an interface in a message flow packet sending mode: configuring packet sending mode selection, and selecting in a default provided packet sending mode;
message flow packet mode hook function: the user can define the mode of sending the package;
message flow message processing hook function: the user carries out pretreatment and post-treatment on the generated message;
flow module enable interface: opening or closing a certain flow module;
the priority configuration interface of the flow module: configuring the priority of the flow modules, wherein the default priority of the flow modules is the same;
an inlet scheduling module selects an algorithm configuration interface;
an algorithm hook function is selected by an inlet scheduling module;
an interface is configured by an entry-scheduled message flow distribution algorithm;
distributing an algorithm hook function for the message flow scheduled by the entrance;
configuring an interface by using an outgoing scheduling message flow scheduling algorithm;
an egress scheduling message flow scheduling algorithm hook function;
the flow module of the outlet dispatch allocates the algorithm configuration interface;
the flow module of the outlet scheduling distributes an algorithm hook function;
specifically, as shown in fig. 6, the method for generating a traffic model provided in this embodiment includes:
s601: analyzing a network flow structure: analyzing a network flow structure to be simulated, reasonably dividing the flow structure, and splitting the flow structure into flow modules with proper sizes;
s602: writing a message: analyzing all running message types in network flow, and modeling messages;
s603: writing a message flow: registering the message into a message flow in a parameter form;
s604: configuring a message flow: configuring the priority, a packet sending mode and the flow size of a message stream, and if a mode other than the packet sending mode supported by default is required, writing a hook function provided by a gen _ packet () interface of the message stream;
s605: a flow writing module: calling an add sub block () interface to add a sub flow module into a flow module; calling an add _ sub _ flow () interface to add the sub message flow into a flow module;
s606: and (3) configuring a flow algorithm: configuring the priority of a flow module, configuring flow algorithms of an inlet scheduler and an outlet scheduler, and writing hook functions related to four interfaces of cache _ next _ flow (), cache _ return _ block (), cache _ next _ block (), and cache _ return _ flow () according to needs if the scheduling algorithms except the default support are needed;
s607: combining message flow: calling an add sub block () interface to add a sub flow module into a flow module;
s608: connecting message flow: starting from the root flow module, calling a connect () interface to connect an upstream module, and sending a value to a source flow module;
s609: connecting the root traffic module with the bottom port: a set _ sequence () interface is called to connect the packet sender of the underlying port.
As shown in fig. 7, the method for generating a packet by a traffic module provided in this embodiment includes:
s701: the bottom port applies for a message to the flow module and jumps to S702;
s702: a message port of the root flow module dispatches an application message to an outlet; jumping to S703;
or, the downstream module applies for a message to the flow model, and the outlet dispatches the application message and jumps to S703;
s703: the outlet scheduling selects a sub-message flow in the flow module according to a scheduling algorithm, and jumps to S704;
s704: performing a message flow checking process, determining whether a packet can be sent, if so, jumping to S705, if the message flow can not send a packet, jumping to S704 to select a sub-message flow again, if the message flow can not generate a message all the time, jumping to S707 according to a scheduling algorithm after selecting to a certain degree;
s705: for the packet stream which can be sent, calling the packet sending interface thereof to generate a message, and jumping to S706;
s706: returning the generated message;
s707: returning to a failure state;
as shown in fig. 8, this embodiment provides a method for checking a packet flow, which checks whether it can send a packet, including
S801: the exit dispatch checks whether the message flow can be sent out, and jumps to S802;
s802: checking the flow controller of the message flow, and jumping to S803 if the flow is exceeded, and jumping to S808 if the flow is exceeded;
s803: checking a packet sending mode of the message flow, and jumping to S804 if the packet sending mode is available, or jumping to S808 if the packet sending mode is not available;
s804: judging whether the father flow module of the message flow is a source flow module, if so, jumping to S807, otherwise, jumping to S805;
s805: checking the cache size, jumping to S807 if the package sending requirement is met, and jumping to S806 if the package sending requirement is not met;
s806: sending a message application to the entrance scheduling, if the application is successful, returning to S805 to check the cache, and if the application is failed, jumping to S808;
s807: returning to a success state;
s808: returning to a failure state;
as shown in fig. 9, this embodiment provides a method for applying a message to an upstream traffic module by a message flow, which includes:
s901: the message flow schedules a message application to be sent to the inlet, and the step is S902;
s902: the entrance scheduling selects an upstream traffic module to which the message is applied, and the step is S903;
s903: the flow of generating the message is carried out at the selected upstream flow module, if the generation is successful, the step is switched to S904, otherwise, the step is switched to S909;
s904: the outlet of the upstream flow module schedules and selects a downstream module to which the generated message is returned, and the step is S905;
s905: selecting which message flow to return the message in the inlet scheduling of the returned flow selecting module, and jumping to S906;
s906: storing the returned message into the buffer memory of the message flow, and jumping to S907;
s907: checking whether the message application is completed, namely whether the message is stored in the cache of the applicant, if so, jumping to S908, otherwise, jumping to S902, and reapplying the process until the application is completed;
s908: returning to a success state;
s909: returning to a failure state;
the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein the detailed description of the preferred embodiments is provided for illustration and explanation, and not for limitation.
In the following description, numerous specific details are set forth, such as specific types of network names, communication protocols, verification devices, designs under test, UVM component names, comparison boards (scoreboard), reference models, etc., in order to provide a thorough understanding of the present invention, however, it will be apparent to those skilled in the art that these specific details need not be employed to practice the present invention. The following description is provided of a method and apparatus, where the process is mainly used to provide test stimulus messages for a network communication chip. In particular, the main focus is on simulating network traffic models, such as ethernet, synchronous digital network, etc. However, the methods, devices, and processes described herein should not be so limited. The flow model component and the construction method can simulate the excitation generation of any type of messages, including communication protocols used in equipment, bottom layer physical interface protocols and the like. But may also be implemented in other types of integrated circuit verification.
An embodiment of single port traffic combining.
With reference to fig. 10, the verification platform generates an ethernet excitation message from the ethernet traffic model, and then sends the ethernet excitation message to the design to be tested through the ethernet interface proxy component.
The flow model mainly completes the generation of the Ethernet excitation message, and is formed by combining four groups of same Ethernet flows. Each group of flow has four message flows, and four types of excitation messages are generated respectively.
Firstly, modeling is carried out on four types of messages respectively;
compiling an Ethernet flow module, instantiating four message flows in the flow module respectively, registering respective messages, and adding the message flows into the flow module; configuring the flow and packet sending mode of each message flow; configuring a scheduling algorithm used by the exit scheduling; because the flow module has no father flow module and is not a top module, an instantiated entrance scheduler and a message port do not exist;
then writing a top-level flow module, instantiating the Ethernet flow module four times in the top-level flow module, and adding the Ethernet flow module into the top-level flow module; configuring a scheduling algorithm used by the exit scheduling; instantiating a message port;
and finally, establishing connection between the message port and the bottom Ethernet interface agent.
The bottom Ethernet interface agent obtains the message by calling the message port of the top flow module; the message port calls an exit agent, recursively searches message flow in the sub-module, calls a message flow interface to generate a message and returns the message to the Ethernet interface agent. The interface agent converts the physical interface signal into a physical interface signal and sends the physical interface signal to the design to be tested, and if the returned physical interface signal is in a failure state, the interface agent sends an idle physical signal to the design to be tested and then applies for obtaining the message again.
The user can change the flow and the number of the packets sent by a certain flow, close or open the certain flow, change the scheduling algorithm by configuring the provided configuration interface and the hook function, can also replace the message in the original message flow with a new message, can also directly modify the flow model, and flexibly constructs various flow use cases.
An embodiment of single port traffic concatenation.
Referring to fig. 11, a channelized STM-1 message traffic model is simulated. 63E 1 flows are multiplexed in one STM-1 message flow in the model.
Firstly, establishing a flow module for STM-1 message flow, wherein the STM-1 flow module only comprises one STM-1 message flow.
Writing an E1 flow module, wherein 63E 1 message flows are included in one EI flow module in a combined mode, and configuring an outlet scheduling algorithm of the E1 flow module as polling;
and finally, connecting the STM-1 flow module with an E1 flow module to form a flow model.
Fig. 12 provides another embodiment of a tunneling STM-1 packet traffic model, where each E1 traffic module only contains one E1 packet stream, and the STM-1 traffic module is connected to 63E 1 traffic modules at the same time. The module selection algorithm that configures the ingress scheduling of STM-1 is polling.
In the two embodiments of the traffic model, the final generated excitation message effect is consistent.
Referring to fig. 13, a model is provided for ppp packet traffic carried in the above-mentioned E1 packet traffic. E1 provides a channel binding function, i.e. one PPP packet traffic can share the load among multiple E1 packet traffic.
Firstly, compiling flow modules of PPP messages, wherein each module comprises a message flow;
thirdly, writing a PPP2E1 flow module, connecting the module with the PPP flow module, and packaging the PPP message into E1;
finally, the STM-1 flow model is connected with a PPP2E1 flow module according to a binding strategy set by a user;
by adopting the model architecture, the components and the message generation method provided by the embodiment, compared with the prior art, the dependence between message components is reduced to the maximum extent, the better abstraction of the flow model is realized, and any type of message flow can be realized through the combination between the flow module and the message flow. . Meanwhile, a model generation method and a message generation flow are provided based on the framework, and the required excitation message can be generated conveniently and flexibly; meanwhile, the model structure is unified, and a better basis is provided for multiplexing of the flow model.
In summary, the implementation of the embodiment of the present invention has at least the following advantages:
the embodiment of the invention provides an excitation message generation control method and logic detection equipment, the method obtains the message types of all excitation messages to be generated by analyzing the structure of network flow to be simulated, calls at least one flow module, carries out the modeling of the excitation messages according to the message types of all the excitation messages, generates corresponding message models, and generates corresponding excitation message flows according to the message models of all the excitation messages through the flow module, namely, provides a standardized message layer flow model modeling method, and can effectively and conveniently generate complex excitation messages from the models, and the method has the effects of but not limited to: 1. supporting any piece of flow model at any level; 2. supporting various dispatching modes of the flow in the port: such as polling, prioritized polling, customization, etc.; 3. supporting flow size control of each flow; 4. supporting a plurality of flow message packet sending modes: such as continuous packet sending, fixed number packet sending, timing packet sending, self-defining and the like: 5. network traffic models supporting mainstream, such as packet, time division multiplexing, fixed size packet, and the like; therefore, the defects of the existing excitation message generation method are overcome.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above embodiments are only examples of the present invention, and are not intended to limit the present invention in any way, and any simple modification, equivalent change, combination or modification made by the technical essence of the present invention to the above embodiments still fall within the protection scope of the technical solution of the present invention.

Claims (13)

1. An excitation message generation control method includes:
analyzing the network traffic structure to divide the traffic modules according to the network traffic structure;
acquiring message parameters of all excitation messages to be generated according to the analyzed network flow structure to be simulated;
calling at least one flow module to generate an excitation message flow according to the message parameters of the excitation messages;
the message parameters comprise at least one of a message type, a message field and an error type, and further comprise a message packet packing mode and a message unpacking mode;
the generating of the excitation message stream comprises:
selecting an excitation message flow to be generated;
judging whether each message flow in the excitation message flow can be transmitted;
if the packet can be sent, generating corresponding message flows, and combining the generated message flows into an excitation message flow;
the determining whether each message flow in the excitation message flow can be packetized includes:
detecting whether the message flow exceeds the flow;
if the message flow does not exceed the flow, detecting a packet sending mode of the message flow, wherein the packet sending mode comprises a packet sending mode and a packet sending mode;
if the packet sending mode is packet sending available, detecting whether the attributive flow module of the message flow module generating the message flow is a source flow module which is not connected with the upstream flow module.
2. The excitation message generation control method according to claim 1, wherein the determining whether each message flow in the excitation message flow can be packetized further comprises:
detecting the buffer size of the message flow module under the condition that the home flow module is not a source flow module which is not connected with an upstream flow module;
and judging whether the cache meets the packet sending requirement or not.
3. The excitation message generation control method according to claim 2, wherein after the determining whether the cache satisfies the packet sending requirement, the excitation message generation control method further comprises:
sending a message application under the condition that the cache does not meet the packet sending requirement;
and after the application is successful, the cache size is detected again, and whether the cache meets the packet sending requirement is judged.
4. The excitation message generation control method according to any one of claims 1 to 3, wherein the invoking at least one traffic module to generate an excitation message stream according to the message parameter of each excitation message includes:
controlling the called flow module to generate a message model of each excitation message according to the message parameters of each excitation message;
controlling the called flow module to register the message model to the message flow module in a parameter form to generate a message flow model;
configuring the priority, the packet sending mode and the flow size of each message flow module according to the network flow structure to be simulated;
when an excitation message flow needs to be generated, selecting an attribution flow module of each message flow module according to a configuration result and connecting the attribution flow modules;
and controlling the attribution flow module of each message flow module, generating a message flow model and a corresponding message flow, and combining the generated message flows into the excitation message flow and then outputting the excitation message flow.
5. An excitation message generation control apparatus comprising: an analysis module and a control module, wherein,
the analysis module is used for analyzing the network flow structure so as to divide the flow module according to the network flow structure;
acquiring message parameters of all excitation messages to be generated according to the analyzed network flow structure to be simulated;
the control module is used for calling at least one flow module to generate an excitation message flow according to the message parameters of each excitation message;
the message parameters comprise at least one of a message type, a message field and an error type, and further comprise a message packet packing mode and a message unpacking mode;
the control module is used for selecting the excitation message flow to be generated, judging whether each message flow in the excitation message flow can be transmitted, if so, generating the corresponding message flow, and combining the generated message flows into the excitation message flow;
the control module is used for detecting whether the message flow exceeds the flow, detecting a packet sending mode of the message flow if the message flow does not exceed the flow, and detecting whether a home flow module of the message flow module generating the message flow is a source flow module which is not connected with an upstream flow module if the packet sending mode is capable of sending packets.
6. The excitation message generation control device according to claim 5, wherein the control module is configured to, in a case that the home traffic module is not a source traffic module to which an upstream traffic module is not connected, detect a buffer size of the message flow module, and determine whether the buffer meets a packet sending requirement.
7. The excitation message generation control device according to claim 6, wherein the control module is configured to send a message application when the cache does not meet the packet sending requirement, and after the application is successful, re-detect the size of the cache to determine whether the cache meets the packet sending requirement.
8. The excitation message generation control device according to any one of claims 5 to 7, wherein the control module is configured to control the called traffic module to generate a message model of each excitation message according to the message parameter of each excitation message, control the called traffic module to register the message model in a parameter form to the message flow module to generate the message flow model, configure the priority, the packet sending mode, and the traffic size of each message flow module according to the network traffic structure to be simulated, select the home traffic module of each message flow module according to the configuration result and connect when an excitation message flow needs to be generated, control the home traffic module of each message flow module to generate a message flow model and a corresponding message flow, and combine the generated message flows into the excitation message flow and output the excitation message flow.
9. The logic detection equipment is characterized by comprising at least one flow module for generating an excitation message flow, a result analysis device and the excitation message generation control device according to any one of claims 5 to 8, wherein the excitation message generation control device is used for calling the flow module to generate the excitation message flow and testing the excitation message flow, and the result analysis device is used for analyzing a test result.
10. The logic detection device of claim 9, wherein the traffic module includes an ingress scheduler for inter-traffic module connections and ingress packet scheduling; an exit scheduler for the connection between the flow modules and the exit message scheduling; the packet sending device is used for establishing a mapping relation with a packet sender of a bottom layer interface and providing a message port of a related packet sending interface; and at least one message flow module for generating a message flow according to the message model; and at least one message module for generating a message model.
11. The logic detection device of claim 10, wherein the traffic module further comprises a sub-traffic module and/or a sub-message flow module.
12. The logic detection device of claim 10, wherein the message flow module comprises a flow controller, a flow generator, and an upstream message buffer queue.
13. The logic detection device according to any one of claims 9 to 12, wherein the excitation packet generation control means is configured to invoke a plurality of the traffic modules in parallel and/or in cascade to generate the excitation packet stream.
CN201610516589.XA 2016-06-30 2016-06-30 Excitation message generation control method and device and logic detection equipment Active CN107566204B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610516589.XA CN107566204B (en) 2016-06-30 2016-06-30 Excitation message generation control method and device and logic detection equipment
PCT/CN2017/086367 WO2018001025A1 (en) 2016-06-30 2017-05-27 Excitation-message generation and control method, apparatus, and logic detection device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610516589.XA CN107566204B (en) 2016-06-30 2016-06-30 Excitation message generation control method and device and logic detection equipment

Publications (2)

Publication Number Publication Date
CN107566204A CN107566204A (en) 2018-01-09
CN107566204B true CN107566204B (en) 2020-11-10

Family

ID=60785874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610516589.XA Active CN107566204B (en) 2016-06-30 2016-06-30 Excitation message generation control method and device and logic detection equipment

Country Status (2)

Country Link
CN (1) CN107566204B (en)
WO (1) WO2018001025A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111478825B (en) * 2020-04-10 2023-04-18 深圳市风云实业有限公司 Extensible network traffic generation and analysis method and system
CN114338434A (en) * 2020-09-25 2022-04-12 深圳市中兴微电子技术有限公司 Excitation message sending method and device, electronic equipment and storage medium
CN112839057A (en) * 2021-02-09 2021-05-25 芯河半导体科技(无锡)有限公司 Flexible and extensible Ethernet message excitation generator
CN114679411A (en) * 2022-03-24 2022-06-28 芯河半导体科技(无锡)有限公司 Method for implementing rate-controllable Ethernet message packet sender

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1691611A (en) * 2004-04-23 2005-11-02 华为技术有限公司 Apparatus and method for implementing excitation message and method for testing digital circuit logical simulation
CN1708016A (en) * 2004-06-08 2005-12-14 华为技术有限公司 Method and apparatus for generating excitation message and logic detecting equipment
CN102523159A (en) * 2011-12-15 2012-06-27 盛科网络(苏州)有限公司 Certification message generation method and system for network chip
CN105610641A (en) * 2015-12-21 2016-05-25 武汉微创光电股份有限公司 Switch testing system and testing method based on semi-physical simulation
CN105704083A (en) * 2014-11-24 2016-06-22 中兴通讯股份有限公司 Generation method, generation device and simulation system of Ethernet excitation message

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100511149C (en) * 2003-05-07 2009-07-08 华为技术有限公司 Logic emulation testing system and method
US7912940B2 (en) * 2004-07-30 2011-03-22 Microsoft Corporation Network system role determination
CN100349416C (en) * 2004-12-01 2007-11-14 华为技术有限公司 Method and device for controlling excited data flow, and excited message producer
CN101414935B (en) * 2008-07-09 2011-06-22 北京星网锐捷网络技术有限公司 Method and system for generating test case

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1691611A (en) * 2004-04-23 2005-11-02 华为技术有限公司 Apparatus and method for implementing excitation message and method for testing digital circuit logical simulation
CN1708016A (en) * 2004-06-08 2005-12-14 华为技术有限公司 Method and apparatus for generating excitation message and logic detecting equipment
CN102523159A (en) * 2011-12-15 2012-06-27 盛科网络(苏州)有限公司 Certification message generation method and system for network chip
CN105704083A (en) * 2014-11-24 2016-06-22 中兴通讯股份有限公司 Generation method, generation device and simulation system of Ethernet excitation message
CN105610641A (en) * 2015-12-21 2016-05-25 武汉微创光电股份有限公司 Switch testing system and testing method based on semi-physical simulation

Also Published As

Publication number Publication date
WO2018001025A1 (en) 2018-01-04
CN107566204A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107566204B (en) Excitation message generation control method and device and logic detection equipment
Miranda et al. Appia, a flexible protocol kernel supporting multiple coordinated channels
Kukkala et al. UML 2.0 profile for embedded system design
Kuhr et al. FERAL—Framework for simulator coupling on requirements and architecture level
CN102395954A (en) Apparatus & associated methodology of generating a multi-core communications topology
CN102768692B (en) Navigation locating and wiring method applied to FPGA (field programmable gate array) test
CN106202685B (en) A kind of software and hardware cooperating simulation accelerator operation environmental structure method and apparatus
CN104573287B (en) The Digital Simulation frame design method of unified model is bound based on interface
CN109495306A (en) A kind of expansion method and equipment of business network
Mubeen et al. Holistic modeling of time sensitive networking in component-based vehicular embedded systems
CN113392607A (en) Method for determining configuration parameters and related equipment
CN108965375A (en) Service call proxy control system, method, server and readable storage medium storing program for executing
Kim et al. Formal verification of SDN-based firewalls by using TLA+
CN108985459A (en) The method and apparatus of training pattern
CN108228965B (en) Simulation verification method, device and equipment for memory cell
CN109858257A (en) Access control method and device
Dranidis et al. Formal verification of web service behavioural conformance through testing
CN116933702A (en) Verification method, verification device, electronic equipment and readable storage medium
CN111597058A (en) Data stream processing method and system
Bause et al. A simulation environment for hierarchical process chains based on OMNeT++
Mariño et al. Elastic gateway SoC proof of concept: Experiments design and performance evaluation
Bodenstein et al. Executable specifications for model-based development of automotive software
Aldini et al. An algebraic model for evaluating the performance of an ATM switch with explicit rate marking
KR101125365B1 (en) Integrated design method of communication protocols with sdl-opnet co-simmulation technique
Houtan Configuring and Analysing TSN Networks Considering Low-priority Traffic

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant