A chip configuration method and apparatus

By generating interface configuration information and forwarding tables, the chip configuration is automated and simplified, solving the problem of high chip configuration complexity and improving chip development efficiency and user experience.

CN113722267BActive Publication Date: 2025-12-02NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110850941.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2025-12-02
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

Existing technologies have high chip configuration complexity, with numerous configuration items and interdependencies, resulting in excessively high learning costs and configuration difficulties for chip application developers, making it difficult to achieve the desired use cases.

Method used

By generating interface configuration information, forwarding tables, and chip configuration files, the chip configuration process is automated and simplified. The required configuration files are generated according to the user's selection, reducing the complexity and difficulty of chip configuration.

Benefits of technology

It enables simplified configuration based on user application scenarios, reduces the complexity and learning difficulty of chip configuration, improves chip development efficiency, and reduces repetitive configuration work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722267B_ABST
    Figure CN113722267B_ABST
Patent Text Reader

Abstract

This application provides a chip configuration method and apparatus. The method includes: generating interface configuration information for the interface corresponding to the selected serial channel based on the user's selection of the serial channel in the chip; generating a corresponding forwarding table based on the user's configuration of the forwarding table and the interface configuration information; generating a data program and a chip configuration file for processing messages in the chip based on the interface configuration information and the forwarding table, wherein the chip configuration file includes interface configuration, memory configuration used by the forwarding table, external memory configuration used by the forwarding table, and table structure configuration of the forwarding table; and configuring the chip according to the chip configuration file. This reduces the complexity and difficulty of chip configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chip technology, and in particular to a chip configuration method and apparatus. Background Technology

[0002] In the initial stages of chip application, developers often need to learn from chip documentation, such as the chip's working principles, startup and configuration processes, and the detailed principles, initialization, and configuration of each module. With the assistance of chip specifications, programming manuals, and technical support, they write the chip initialization driver software to implement the chip application. Furthermore, many chip configurations are interdependent. For example, configuring the forwarding table entries for the Search_entries interface requires first configuring the chip's memory usage parameters (including internal and external memory), specifying the memory used when defining the lookup table structure, and finally configuring the entries in each lookup table. Therefore, if a driver developer only wants to add a single forwarding table entry, they need to manually configure all of these, significantly increasing the learning curve for chip application developers. Therefore, automating the generation of simplified chip configurations and then automatically generating related configuration code from these simplified configurations to free chip application developers from tedious configuration work is crucial for improving their development efficiency.

[0003] Current technologies present all chip configuration options to chip application personnel, including over a dozen modules such as channels, interfaces, input classification, and flow control. These are very low-level configurations, and each module may contain dozens of configuration items, with each item containing over a dozen parameters. Manually configuring these options is time-consuming and requires extensive study of chip principles and workflows. Furthermore, application personnel typically rely on demo code provided by the chip manufacturer, which is often very basic, only including simple interface enablement and omitting features like table entries and flow control. In addition, chip application scenarios are generally complex, leading to complex configurations. Furthermore, dependencies often exist between configurations, preventing application personnel from simply modifying demo code to achieve the desired usage scenario.

[0004] Therefore, how to configure chips to reduce the complexity and difficulty of chip configuration is one of the technical issues worth considering. Summary of the Invention

[0005] In view of this, this application provides a chip configuration method and apparatus to reduce the complexity and difficulty of chip configuration.

[0006] Specifically, this application is implemented through the following technical solution:

[0007] According to a first aspect of this application, a chip configuration method is provided, comprising:

[0008] Based on the user's selection of the serial channel in the chip, the interface configuration information of the interface corresponding to the selected serial channel is generated.

[0009] Based on the user's configuration of the forwarding table and the interface configuration information, a corresponding forwarding table is generated;

[0010] Based on the interface configuration information and the forwarding table, a data program and a chip configuration file for processing messages are generated in the chip. The chip configuration file includes interface configuration, memory configuration used by the forwarding table, external storage configuration used by the forwarding table, and table structure configuration of the forwarding table.

[0011] Configure the chip according to the chip configuration file.

[0012] According to a second aspect of this application, a chip configuration apparatus is provided, comprising:

[0013] The information generation module is used to generate interface configuration information for the interface corresponding to the selected serial channel based on the user's selection of the serial channel in the chip.

[0014] The table generation module is used to generate the corresponding forwarding table based on the user's configuration of the forwarding table and the interface configuration information;

[0015] The file generation module is used to generate a data program and a chip configuration file for processing messages in the chip according to the interface configuration information and the forwarding table. The chip configuration file includes interface configuration, memory configuration used by the forwarding table, external storage configuration used by the forwarding table, and table structure configuration of the forwarding table.

[0016] The configuration module is used to configure the chip according to the chip configuration file.

[0017] The beneficial effects of the embodiments of this application are as follows:

[0018] The chip configuration method provided in this application embodiment can configure the chip according to the user's selection, realizing the selection of the necessary configuration based on the user's required application scenario. It does not require understanding the dependencies between the various components involved in the chip configuration, and directly generates the chip configuration file required by the chip according to the user's selection, thereby reducing the complexity of chip configuration and the difficulty for users to learn chip development, and also reducing the difficulty of chip driver development. Attached Figure Description

[0019] Figure 1 This is a schematic flowchart of a chip configuration method provided in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of a channel configuration interface provided in an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of another channel configuration interface provided in an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of the structure of a chip configuration device provided in an embodiment of this application;

[0023] Figure 5 This is a schematic diagram of the hardware structure of an electronic device implementing a chip configuration method, provided in an embodiment of this application. Detailed Implementation

[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.

[0025] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the corresponding listed items.

[0026] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0027] The chip configuration method provided in this application will be described in detail below.

[0028] See Figure 1 , Figure 1 This is a flowchart of a chip configuration method provided in this application, applied to an electronic device equipped with an integrated development environment (IDE) for the chip. The method may include the following steps:

[0029] S101. Based on the user's selection of the serial channel in the chip, generate the interface configuration information of the interface corresponding to the selected serial channel.

[0030] In this step, when users learn the working principle and development process of the chip in the early stage of chip development, they need to perform a series of configurations on the chip. Based on this, this application provides users with a convenient and quick chip configuration process in the IDE tool to reduce the difficulty of getting started with chip development.

[0031] Optionally, step S101 can be performed according to the following process: displaying the channel configuration interface of the serial channel to the user; determining whether the serial channel selected by the user based on the channel configuration interface belongs to the same kernel; if it belongs to the same kernel, displaying the interface configuration interface of the interface that the selected serial channel can form to the user; generating the interface configuration information of the target interface according to the target interface selected by the user based on the interface configuration interface.

[0032] Specifically, when a user configures a chip using an IDE tool, the IDE tool will display a serial channel configuration page. Based on this page, the user can select the serial channel according to the desired interface speed. (See reference...) Figure 2 As shown. For example, interface speeds are typically 10G, 100G, and 400G, and correspondingly, interface types can be categorized as 10G, 100G, and 400G. Based on this, users can execute selection commands on the displayed serial channels in the channel configuration interface to select multiple serial channels. Please also refer to... Figure 2As shown. When the IDE tool receives this selection command, it can identify the number of serial channels selected by the user, the serial channel identifiers included in the selected area, etc., for example... Figure 2 In the process, the IDE will recognize that the number of serial channels selected by the user is 10, and the serial channels included in the selected area are lane0 to lane9. Specifically, the IDE tool can determine the area selected by the user and the number and identifier of the serial channels included in the area based on the coordinate position recognition algorithm.

[0033] Furthermore, in practical applications, chips often include multiple cores (such as MAC cores), each managing a different number of serial channels (lanes). For example, a chip might have m cores and n lanes distributed on each side. Therefore, the number of lanes managed by each core is typically n / m. Please refer to [reference needed]. Figure 2 As shown in the diagram. Based on this, when selecting a serial channel, a user might select serial channels for two different kernels. Interface configuration is based on kernels, and the selected serial channels generally need to belong to the same kernel. That is, a serial channel within one kernel is selected for configuration first, and then a serial channel within the other kernel is selected. Therefore, when the user selects a serial channel, the IDE tool determines whether the selected serial channels belong to the same kernel. If so, it displays the interface configuration interface of the possible interfaces formed by the selected serial channels. Based on this, the user can select the desired target interface from the displayed interface configuration interface, triggering a target interface selection command. Upon receiving the target interface selection command, the IDE tool generates the interface configuration information for the target interface based on the user's selection.

[0034] In addition, if the selected serial channels do not belong to the same kernel, the user will be shown an interface indicating that the selection failed. Furthermore, error details can be displayed, such as "Serial channels of different kernels cannot be selected at the same time".

[0035] Furthermore, since the number and location of serial channels that can be used by different types of interfaces are limited, when it is determined that the selected serial channels belong to the same kernel, the interface configuration interface of the interfaces that can be formed by the selected serial channels can be displayed to the user in the following manner: if they belong to the same kernel, determine whether the selected serial channels meet the interface restriction conditions; if they meet the interface restriction conditions, display the interface configuration interface of the interfaces that can be formed by the selected serial channels to the user.

[0036] Specifically, the above constraints are based on the hardware itself. Optionally, the above interface constraints can be understood as: whether the number and position of the selected serial channels match the serial channel number and position required by the interface. For example, based on the number of serial channels selected by the user, the interface type the user needs to select can be predicted. Then, based on the predicted interface type, it is determined whether the number and position of the serial channels selected by the user match the predicted number and position of the serial channels required by the interface type. If they match, it is confirmed that the selected serial channels meet the interface constraints; if they do not match, it is confirmed that the interface constraints are not met. Specifically, the number and position of the selected serial channels can also be matched one by one with the number and position of the serial channels corresponding to each interface type, and then it is determined whether any matching interface type exists.

[0037] It should be noted that different serial channels have different channel rates, therefore, the above interface limitations will also change accordingly, and can be determined according to the actual situation.

[0038] Optionally, before displaying the interface configuration interface of the interfaces that can be formed by the selected serial channels to the user, after confirming that the selected serial channels belong to the same kernel, it can also be determined whether the serial channels preceding the selected serial channel have been selected. If they have been selected, it is then confirmed whether the selected serial channel meets the interface restriction conditions. If they do, the interface configuration interface of the interfaces that can be formed by the selected serial channels is displayed to the user. If the serial channels preceding the selected serial channel have not been selected, the user is prompted that the selection failed and the selection starts from the last selected serial channel. This ensures the continuity of the selected serial channels.

[0039] To better understand the above embodiment, an example is given with 48 lanes (lane0 to lane47) distributed on each of the east and west sides of the chip. (Refer to...) Figure 3As shown, the chip includes four MAC cores, each managing 12 lanes on one side. For example, MAC core 1 corresponds to lanes 0-11, MAC core 2 to lanes 12-23, MAC core 3 to lanes 24-35, and MAC core 4 to lanes 35-47. Furthermore, the chip in this embodiment can be configured with 10GE, 100GE, and 400GE interfaces. For instance, one MAC core can be configured with 12 10G interfaces, 3 100GE interfaces, or 1 400GE interface. Correspondingly, when 12 10G interfaces are configured, each lane corresponds to one 10G interface; when 3 100G interfaces are configured, every 4 lanes correspond to one 100G interface; and when one 100G interface is configured, every 8 lanes correspond to one 400G interface. It should be noted that in practical applications, there may be limitations inherent in the hardware itself. When a MAC core is configured with a 400G interface, the remaining lanes of the MAC core cannot be configured with other interfaces. For example, when the user selects lanes 0 through 3, the IDE tool can recognize that the selected serial channels are lanes 0 through 3. It can then determine that lanes 0 through 3 belong to MAC core 1, i.e., the same core. The IDE tool will then further determine whether lanes 0 through 3 meet the constraints. That is, based on lanes 0 through 3, the IDE tool can predict that the user expects to select a 100GE interface. It can then determine whether lanes 0 through 3 match the number and position of the serial channels corresponding to the 100GE interface. In practical applications, when performing interface matching for the first time, and configuring a 100GE interface, it needs to start from lane 0. Since a 100GE interface corresponds to 4 lanes, the actual number and position of the serial channels corresponding to the 100GE interface are 4, lanes 0 through 3. It can be confirmed that the user's selected lanes 0 through 3 exactly match the number and position of the serial channels corresponding to the 100GE interface. Therefore, the interface configuration interface that lanes 0 through 3 can form is then displayed to the user.When the user selects serial channels 1 through 4, it can be confirmed that the number and position of serial channels 1 through 4 do not match the 100GE interface, resulting in a selection failure message. When the user selects serial channels 0 through 9 (10 lanes), it can be predicted that the user intends to configure a 400GE interface. However, since the 400GE interface requires 8 serial channels starting from lane 0, it can be confirmed that the user selected more than 8 lanes (lanes 0 through 9). While this confirms a match in the number and position of serial channels with the 400GE interface, due to limitations in the chip hardware, this MAC core, after configuring a 400GE interface... Other lanes cannot be configured with other interfaces. Therefore, when the IDE displays the interface configuration interface of the selected serial channels to the user, it will show the actual lanes that the interface needs to use, namely lane0 to lane7. At the same time, the channel configuration interface will adjust the number and position of the actual lanes occupied by the 400GE interface accordingly. That is, it will select the actual serial channels lane0 to lane7, and indicate that lane8 to lane11 of the MAC core are not selectable. For example, lane8 to lane11 of the MAC core will be grayed out to indicate that these channels are not selectable. At the same time, the number of interfaces corresponding to lane0 to lane7, namely 400GE, can be displayed.

[0040] Through the above embodiments, users can dynamically select different lanes to form Ethernet interfaces of various speeds, which can intuitively show users the number of lanes occupied by Ethernet interfaces of different speeds.

[0041] It should be noted that the aforementioned users can include chip application developers, etc.

[0042] Optionally, the interface configuration information includes two parameters: IF Engine and IF Number. IF Engine indicates the kernel corresponding to the selected serial channel; IF Number indicates the position of the selected serial channel. These two parameters are automatically generated based on the user's selected serial channel and change accordingly. For example, when the user selects 100G lane0 to lane3, IF Number = 0; when the user selects lane4 to lane7, IF Number = 1, and IF Engine is the value corresponding to kernel 1. It should be noted that when recording in the interface configuration information, IF Number must be recorded separately based on the selected serial channel. This saves chip configuration time.

[0043] Optionally, the interface configuration information may also include transmit enable (TX Enable) and receive enable (RX Enable), which are the transmit and receive enable for the interface corresponding to the selected serial channel, respectively. Generally, these two parameters are enabled by default, so their values ​​are automatically filled in with default values. By default, TX Enable and RX Enable are filled with 1, indicating that the transmit function of the interface in the transmit direction and the receive function of the interface in the receive direction are enabled by default. This saves chip configuration time.

[0044] Optionally, the interface configuration information mentioned above also includes TxBase Oq Channel, RxBaseBudget ID, and Local ID. TxBase Oq Channel is the interface number for the sending direction, used for retrieving the outgoing interface for CTOP message processing. It can be configured by the user, i.e., entered by the user when the interface configuration interface is displayed to the user. RxBaseBudgetID is the retrieval number of the network chip NP resource management module, used to count the storage MEM resources used by the messages received by the current interface.

[0045] The aforementioned Local ID refers to the internal ID of the interface corresponding to the selected serial channel within the chip. This Local ID is automatically generated according to the chip's internal interface ID generation rules, aiming to ensure that different interfaces correspond to different Local IDs. The RxBaseBudget ID and Local ID mentioned above are generated by default and do not require user configuration, thus saving chip configuration time and reducing the entry barrier for chip development.

[0046] S102. Generate the corresponding forwarding table based on the user's configuration of the forwarding table and the interface configuration information.

[0047] Specifically, step S102 can be performed according to the following process: display the table configuration interface of the forwarding table to the user; generate the corresponding forwarding table based on the table type selected by the user based on the table configuration interface, the destination information configured by the user for forwarding messages, and the interface configuration information.

[0048] Specifically, this application supports multiple types of forwarding tables. Therefore, when generating a forwarding table, a table configuration interface for the forwarding table will be displayed to the user. The user can select the type of forwarding table based on this table configuration interface. After receiving the instruction to select the type of forwarding table, the IDE tool will continue to display the table configuration interface for the forwarding table under that table type to the user. This table configuration interface will display the interface configuration information configured by the user in step S101 read by the IDE tool. Then, the user can configure the destination information for packet forwarding based on this table configuration interface, that is, establish the correspondence between each destination information and the interface, thereby generating a forwarding table for packet forwarding under the table type selected by the user.

[0049] Optionally, the aforementioned destination information may include, but is not limited to, the destination IP address and the subnet mask corresponding to the destination IP address, etc.

[0050] Optionally, the table types of the aforementioned forwarding tables may include, but are not limited to, Table, Hash table, IP routing table UIP (Ultra IP) table, and internal tri-state content addressing memory Itcam table, etc.

[0051] S103. Based on the interface configuration information and the forwarding table, generate a data program and a chip configuration file for processing messages in the chip. The chip configuration file includes interface configuration, memory configuration used by the forwarding table, external storage configuration used by the forwarding table, and table structure configuration of the forwarding table.

[0052] Specifically, the IDE tool automatically generates a full-path data program (DP) based on the structure parameter information of the forwarding table. This data program can identify and process various types of packets (for example, the DP program may include lookup table code), including but not limited to IPv4, IPv6 and tunnel packets, and can also adapt to various chip configurations.

[0053] In addition, the IDE tool can generate chip configuration files according to the following process: generate parameter values ​​for interface parameters based on interface configuration information; generate parameter values ​​for table structure parameters based on the forwarding table; obtain parameter values ​​for memory parameters and external storage parameters used by the forwarding table, wherein the parameter values ​​for memory parameters and external storage parameters are pre-configured or adjusted based on the forwarding table; and generate chip configuration files based on the parameter values ​​for interface parameters, table parameters, memory parameters, and external storage parameters.

[0054] Specifically, interface parameter values ​​are generated based on the interface configuration information. This interface can be, but is not limited to, an Ethernet interface, and correspondingly, the interface parameters can be, but are not limited to, Ethernet Interface Parameters and Ethernet Receive Channel Parameters. Furthermore, table structure parameters are generated based on the forwarding table. These table structure parameters can include, but are not limited to, table parameters and hash parameters, and are then used to characterize the forwarding table. Additionally, since the forwarding table needs to be stored for subsequent packet forwarding, this embodiment also needs to obtain the memory and external storage parameters used by the forwarding table when caching it. The memory parameters can be represented using Internal Memory Space Parameters, and the external storage parameters can be represented using External Memory Space Parameters.

[0055] It should be noted that the memory and external storage parameters used in the aforementioned forwarding table can be default values, i.e., default configurations, such as a memory parameter value of approximately 1MB, and an external storage parameter value that can be larger to cache the forwarding table. The specific values ​​can be determined based on the actual situation. Optionally, the memory and external storage parameters used in the forwarding table can also be padded according to the actual size of the forwarding table. That is, after generating the forwarding table, the memory size occupied by the table is calculated, and then the memory and external storage parameter values ​​are configured based on this memory size, aiming to configure parameter values ​​that are not less than this memory size.

[0056] Optionally, the aforementioned chip configuration file may include, but is not limited to, a basic configuration file, and may also include a lookup interface file (search_entries) and an internal tri-state content-addressable memory lookup interface file (itcam_entries). Optionally, the aforementioned chip configuration file may be in XML format; correspondingly, the basic configuration file may be denoted as config.XML, the lookup interface file may be denoted as search_entries.XML, and the aforementioned itcam_entries file may be denoted as itcam_entries.XML.

[0057] It should be noted that when generating the search_entries.XML or itcam_entries.XML file, the three parameters Tx Base Oq Channel, RxBaseBudget ID, and Local ID from the interface configuration information need to be used to automatically generate related table entries. The key value in each table entry is recorded as the destination information, and the value of the result field in the table entry is recorded as the interface information of the interface corresponding to the required serial channel, such as the Local ID. Optionally, the result field may also include indicator bits other than interface information to indicate whether the interface needs to support Traffic Management™.

[0058] It is worth noting that when the above forwarding table is an itcam type forwarding table, in addition to generating the parameter values ​​of the above parameters, it is also necessary to generate the parameter values ​​of the parameters required by the itcam forwarding table. The specific values ​​can be determined according to the actual situation.

[0059] It should be noted that the steps of generating interface parameter values, generating table structure parameter values, and generating internal and external memory parameter values ​​are performed in no particular order.

[0060] Optionally, when performing step S103, a target program can be used to implement step S103. This target program is also automatically generated.

[0061] S104. Configure the chip according to the chip configuration file.

[0062] Specifically, after generating the chip configuration file, the chip can be configured, such as the software flow for driving the chip, and chip initialization and debugging. Then, application development for the chip can also be performed.

[0063] Optionally, the chip configuration method provided in this embodiment may further include the following process: converting the chip configuration file into a code file.

[0064] Specifically, since chip configurations involve repetitive code, such as the code for initializing the same interface with very little difference between the same interfaces, in order to reduce the repetitive coding by users in configuration, a code automatic generation tool can be used to convert the chip configuration file (XML) previously configured by the user into Python or C code, which facilitates secondary driver development and greatly improves the efficiency of chip application development.

[0065] Specifically, the IDE tool provides a conversion function. Users can select the chip configuration file to be converted and then select the Export menu. When the IDE tool receives the conversion command entered by the user, it displays a code type interface showing the available code types. Users can then select the code type to be converted based on this interface. After receiving the code type selection command triggered by the user, the IDE tool can convert the selected chip configuration file to obtain a code file that matches the selected code type. In this way, users can develop based on the converted code file, thus saving the development of chip configuration code and greatly improving chip development efficiency.

[0066] Optionally, the code type mentioned above can be, but is not limited to, C code type and Python code type, etc. For example, when the user selects the chip configuration file config.XML and the user selects the code type as C code, the IDE tool can convert config.XML into C code, and finally into three configuration-related code files: config.h, config.c, and define.h. Then, the user can perform secondary development based on these three C code files.

[0067] By implementing the chip configuration method provided in this application, the method can configure the chip according to the user's selection, realize the selection of the necessary configuration based on the user's required application scenario, without needing to understand the dependencies between the various components involved in the chip configuration, and directly generate the chip configuration file required by the chip according to the user's selection, thereby reducing the complexity of chip configuration and the difficulty for users to learn chip development, and also reducing the difficulty of chip driver development.

[0068] Furthermore, this chip configuration method allows users to perform relevant configurations based on their application scenarios by displaying various configuration interfaces, ensuring that the configured chip matches the user's desired application scenario. Moreover, many configuration items in this application are automatically filled in, eliminating the need for user configuration and simplifying the configuration process. This reduces the user's burden, allowing them to focus on their specific areas of interest; for example, users interested in interface configuration do not need to understand the configuration related to table entries.

[0069] Furthermore, by automatically converting XML configuration files into code files of the user's selected code type, users (such as driver developers) are freed from the arduous task of developing configuration code, greatly shortening the chip application development cycle and improving the development efficiency of chip applications.

[0070] Based on the same inventive concept, this application also provides a chip configuration apparatus corresponding to the above-described chip configuration method. Specific implementation details of this chip configuration apparatus can be found in the above description of the chip configuration method, and will not be elaborated upon here.

[0071] See Figure 4 , Figure 4 This application provides an exemplary embodiment of a chip configuration apparatus, comprising:

[0072] The information generation module 401 is used to generate interface configuration information for the interface corresponding to the selected serial channel based on the user's selection of the serial channel in the chip.

[0073] The table generation module 402 is used to generate a corresponding forwarding table based on the user's configuration of the forwarding table and the interface configuration information;

[0074] The file generation module 403 is used to generate a data program and a chip configuration file for processing messages in the chip according to the interface configuration information and the forwarding table. The chip configuration file includes interface configuration, memory configuration used by the forwarding table, external storage configuration used by the forwarding table, and table structure configuration of the forwarding table.

[0075] The configuration module 404 is used to configure the chip according to the chip configuration file.

[0076] Optionally, the information generation module 401 is specifically used to display the channel configuration interface of the serial channel to the user; determine whether the serial channel selected by the user based on the channel configuration interface belongs to the same kernel; if it belongs to the same kernel, display the interface configuration interface of the interface that the selected serial channel can form to the user; and generate the interface configuration information of the target interface according to the target interface selected by the user based on the interface configuration interface.

[0077] Furthermore, the aforementioned information generation module is specifically used to determine whether the selected serial channel meets the interface restriction conditions if they belong to the same kernel; if they meet the interface restriction conditions, it displays the interface configuration interface of the interface that the selected serial channel can form to the user.

[0078] Optionally, the table generation module 402 is specifically used to display the table configuration interface of the forwarding table to the user; and to generate the corresponding forwarding table based on the table type selected by the user based on the table configuration interface, the destination information configured by the user for forwarding messages, and the interface configuration information.

[0079] Optionally, the file generation module 403 is specifically used to generate parameter values ​​for interface parameters based on the interface configuration information; generate parameter values ​​for table structure parameters based on the forwarding table; obtain parameter values ​​for memory parameters and external storage parameters used by the forwarding table, wherein the parameter values ​​for memory parameters and external storage parameters are pre-configured or adjusted based on the forwarding table; and generate the chip configuration file based on the parameter values ​​for interface parameters, table structure parameters, memory parameters, and external storage parameters.

[0080] Optionally, the chip configuration device provided in this embodiment further includes:

[0081] A conversion module (not shown in the figure) is used to convert the chip configuration file into a code file.

[0082] The chip configuration device provided in this application can configure the chip according to the user's selection, realizing the selection of the necessary configuration based on the user's required application scenario. It does not require understanding the dependencies between the various components involved in the chip configuration, and directly generates the chip configuration file required by the chip according to the user's selection, thereby reducing the complexity of chip configuration and the difficulty for users to learn chip development, and also reducing the difficulty of chip driver development.

[0083] Based on the same inventive concept, embodiments of this application provide an electronic device, such as... Figure 5 As shown, the device includes a processor 501 and a machine-readable storage medium 502. The machine-readable storage medium 502 stores a computer program executable by the processor 501. The processor 501 is prompted by the computer program to execute the chip configuration method provided in any embodiment of this application. Furthermore, the electronic device also includes a communication interface 503 and a communication bus 504, wherein the processor 501, the communication interface 503, and the machine-readable storage medium 502 communicate with each other via the communication bus 504.

[0084] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0085] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0086] The memory may include random access memory (RAM), DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0087] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0088] In addition, embodiments of this application provide a machine-readable storage medium storing a computer program. When called and executed by a processor, the computer program causes the processor to execute the chip configuration method provided in embodiments of this application.

[0089] For embodiments of electronic devices and machine-readable storage media, since the methods involved are basically similar to those described in the foregoing method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.

[0090] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0091] The specific implementation process of the functions and roles of each unit / module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0092] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units / modules described as separate components may or may not be physically separate. The components shown as units / modules may or may not be physical units / modules, that is, they may be located in one place or distributed across multiple network units / modules. Some or all of the units / modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0093] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A chip configuration method, characterized in that, include: For the user's selection of serial channels in the chip, if the serial channels selected by the user belong to the same core, the interface configuration information of the interface corresponding to the selected serial channel is generated. Based on the user's configuration of the forwarding table and the interface configuration information, a corresponding forwarding table is generated; Based on the interface configuration information and the forwarding table, a data program and a chip configuration file for processing messages are generated in the chip. The chip configuration file includes interface configuration, memory configuration used by the forwarding table, external storage configuration used by the forwarding table, and table structure configuration of the forwarding table. Configure the chip according to the chip configuration file.

2. The method according to claim 1, characterized in that, The method further includes: Display the channel configuration interface of the serial channel to the user; Determine whether the serial channels selected by the user based on the channel configuration interface belong to the same kernel; When the serial channels belong to the same kernel, the step of generating interface configuration information for the interface corresponding to the selected serial channel includes: If the serial channels selected by the user based on the channel configuration interface belong to the same kernel, then the interface configuration interface of the interfaces that the selected serial channels can form is displayed to the user. Based on the target interface selected by the user through the interface configuration interface, the interface configuration information of the target interface is generated.

3. The method according to claim 2, characterized in that, If they belong to the same kernel, the interface configuration interface of the selected serial channels will be displayed to the user, including: If they belong to the same kernel, then determine whether the selected serial channel meets the interface restriction conditions; If the interface constraints are met, the interface configuration interface that can be formed by the selected serial channels will be displayed to the user.

4. The method according to claim 1, characterized in that, Based on the user's configuration of the forwarding table and the interface configuration information, a corresponding forwarding table is generated, including: Display the forwarding table configuration interface to the user; A corresponding forwarding table is generated based on the table type selected by the user in the table configuration interface, the destination information configured by the user for forwarding messages, and the interface configuration information.

5. The method according to claim 1, characterized in that, Based on the interface configuration information and the forwarding table, a chip configuration file is generated, including: Based on the interface configuration information, generate the parameter values ​​for the interface parameters; Based on the forwarding table, generate the parameter values ​​for the table structure parameters; Obtain the parameter values ​​of the memory parameters and the external storage parameters used by the forwarding table. The parameter values ​​of the memory parameters and the external storage parameters are pre-configured or obtained based on adjustments to the forwarding table. The chip configuration file is generated based on the parameter values ​​of the interface parameters, the table structure parameters, the memory parameters, and the external storage parameters.

6. The method according to claim 1, characterized in that, Also includes: The chip configuration file is converted into a code file.

7. A chip configuration device, characterized in that, include: The information generation module is used to generate interface configuration information for the interface corresponding to the selected serial channel in the chip, when the serial channel selected by the user belongs to the same core. The table generation module is used to generate the corresponding forwarding table based on the user's configuration of the forwarding table and the interface configuration information; The file generation module is used to generate a data program and a chip configuration file for processing messages in the chip according to the interface configuration information and the forwarding table. The chip configuration file includes interface configuration, memory configuration used by the forwarding table, external storage configuration used by the forwarding table, and table structure configuration of the forwarding table. The configuration module is used to configure the chip according to the chip configuration file.

8. The apparatus according to claim 7, characterized in that, The information generation module is also used to display the channel configuration interface of the serial channel to the user; and to determine whether the serial channel selected by the user based on the channel configuration interface belongs to the same kernel. If the serial channels selected by the user based on the channel configuration interface belong to the same kernel, then the interface configuration interface of the interfaces that the selected serial channels can form is displayed to the user. Based on the target interface selected by the user through the interface configuration interface, the interface configuration information of the target interface is generated.

9. The apparatus according to claim 8, characterized in that, The information generation module is specifically used to determine whether the selected serial channel meets the interface restriction conditions if they belong to the same kernel; if they meet the interface restriction conditions, it displays the interface configuration interface of the interface that the selected serial channel can form to the user.

10. The apparatus according to claim 7, characterized in that, The table generation module is specifically used to display the table configuration interface of the forwarding table to the user; and to generate the corresponding forwarding table based on the table type selected by the user based on the table configuration interface, the destination information configured by the user for forwarding messages, and the interface configuration information.

11. The apparatus according to claim 7, characterized in that, The file generation module is specifically used to generate parameter values ​​for interface parameters based on the interface configuration information; generate parameter values ​​for table structure parameters based on the forwarding table; and obtain parameter values ​​for memory parameters and external storage parameters used by the forwarding table, wherein the parameter values ​​for memory parameters and external storage parameters are pre-configured or obtained based on adjustments to the forwarding table. The chip configuration file is generated based on the parameter values ​​of the interface parameters, the table structure parameters, the memory parameters, and the external storage parameters.

12. The apparatus according to claim 7, characterized in that, Also includes: The conversion module is used to convert the chip configuration file into a code file.

Citation Information

Patent Citations

  • Protocol message processing method and switch

    CN110851289A

  • Hardware circuit with reconfigurable data rate for RapidIO switching network

    CN112214445A