Device and method for data frame storage switching

文档序号:1003496 发布日期:2020-10-23 浏览:9次 中文

阅读说明:本技术 一种数据帧存储切换的装置及方法 (Device and method for data frame storage switching ) 是由 梁世江 杨彦波 娄非志 于 2020-06-10 设计创作,主要内容包括:本发明公开了一种数据帧存储切换的装置及方法,涉及数据存储技术领域。该方法包括:当各端口需要将数据帧读出时,根据端口DDR资源占用计数、端口OCB资源占用计数、端口的缓存门限配置值,产生多等级的端口抢占请求;对产生的多等级的端口抢占请求进行判决仲裁,得到仲裁结果;根据得到的仲裁结果,将各端口数据帧送入对应的DDR缓存或OCB缓存或进行阻塞。本发明能实现内部缓存和外部缓存的动态切换,提高设备的存储带宽和容量,且使用成本低,满足实际应用需求。(The invention discloses a device and a method for switching data frame storage, and relates to the technical field of data storage. The method comprises the following steps: when each port needs to read out the data frame, generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the cache threshold configuration value of the port; carrying out judgment arbitration on the generated multi-level port preemption requests to obtain an arbitration result; and sending the data frame of each port to a corresponding DDR buffer or OCB buffer or blocking according to the obtained arbitration result. The invention can realize the dynamic switching of the internal cache and the external cache, improve the storage bandwidth and the capacity of the equipment, has low use cost and meets the requirement of practical application.)

1. An apparatus for switching between data frame storage, comprising: the device comprises a port switching judgment module, a judgment arbitration module, a DDR read-write control module and an OCB read-write control module;

the port switching decision module is configured to: generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the port cache threshold configuration value; sending each port data frame to a corresponding DDR read-write control module or OCB read-write control module or blocking according to an arbitration result fed back by the judgment arbitration module;

the decision arbitration module is configured to: performing decision arbitration on the multi-level port preemption request generated by the port switching decision module, and feeding an arbitration result back to the port switching decision module;

the DDR read-write control module is used for: counting the DDR resource occupation count of each port; controlling data writing and reading of the DDR cache;

the OCB read-write control module is used for: counting the OCB resource occupation count of each port and sending the OCB resource occupation count to a port switching judgment module; and controlling the data writing and reading of the OCB buffer.

2. The apparatus for switching data frame storage according to claim 1, wherein the buffer threshold configuration value of the port comprises: the OCB caches the threshold configuration value and DDR caches the threshold configuration value; the OCB cache threshold configuration value is a single threshold configuration value, and the DDR cache threshold configuration value is a multi-level threshold configuration value;

the port switching judgment module generates a multi-level port preemption request, and specifically comprises the following procedures:

comparing the port OCB resource occupation count of each port with the OCB cache threshold configuration value of each port, and generating a port occupation request of the lowest level for the port exceeding the OCB cache threshold configuration value;

and comparing the port DDR resource occupation counts of the rest ports with the multi-level DDR cache threshold configuration values of the respective ports, and if the port DDR resource occupation counts are greater than the Nth-level DDR cache threshold configuration values, generating an Nth-level port occupation request for the ports, wherein N is a natural number.

3. The apparatus for switching data frame storage according to claim 1, wherein the decision arbitration module, when performing decision arbitration, adopts a packet absolute priority mode: dividing the port preemption requests of the same level of each port into a group, carrying out arbitration selection between the groups according to an absolute priority mode, configuring the priority between the ports in the same group according to a designated strategy, and carrying out arbitration selection in the group according to the absolute priority mode; the selected port will get one of a switch grant, a hold grant and a block grant as an arbitration result.

4. The apparatus for switching storage of data frames according to any of claims 1 to 3, further comprising a port input buffer module for: and requesting the port switching judgment module to process the data frames which are input by the port cache after the port caches the data frames with the specified number.

5. An apparatus for switching storage of a data frame according to any one of claims 1 to 3, wherein: when the data frame is input and read out by each port, the OCB read-write control module and the DDR read-write control module respectively update the OCB resource occupation count and the DDR resource occupation count of each port.

6. A method of data frame storage switching, the method comprising the steps of:

when each port needs to read out the data frame, generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the cache threshold configuration value of the port;

performing judgment arbitration on the multi-level port preemption request to obtain an arbitration result;

and sending the data frame of each port to a corresponding DDR buffer or OCB buffer or blocking according to the arbitration result.

7. The method of data frame storage switching according to claim 6, wherein the buffer threshold configuration value of the port comprises: the OCB caches the threshold configuration value and DDR caches the threshold configuration value; the OCB cache threshold configuration value is a single threshold configuration value, and the DDR cache threshold configuration value is a multi-level threshold configuration value;

generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the port cache threshold configuration value, wherein the specific process comprises the following steps:

comparing the port OCB resource occupation count of each port with the OCB cache threshold configuration value of each port, and generating a port occupation request of the lowest level for the port exceeding the OCB cache threshold configuration value;

and comparing the port DDR resource occupation counts of the rest ports with the multi-level DDR cache threshold configuration values of the respective ports, and if the port DDR resource occupation counts are greater than the Nth-level DDR cache threshold configuration values, generating an Nth-level port occupation request for the ports, wherein N is a natural number.

8. The method of claim 6, wherein when performing decision arbitration for said multi-level port preemption requests, a packet absolute priority approach is used: dividing the port preemption requests of the same level of each port into a group, carrying out arbitration selection between the groups according to an absolute priority mode, configuring the priority between the ports in the same group according to a designated strategy, and carrying out arbitration selection in the group according to the absolute priority mode; the selected port will get one of a switch grant, a hold grant and a block grant as an arbitration result.

9. A method of data frame store switching according to any one of claims 6 to 8, further comprising, prior to generating a multi-level port preemption request: and based on the data frames input by the port buffer, when the port buffers the data frames with the specified number, requesting to read the data frames.

10. A method of data frame storage switching according to any of claims 6 to 8, characterised in that the method further comprises the operations of:

and when the data frame is input and read out, updating the OCB resource occupation count and the DDR resource occupation count of each port in real time.

Technical Field

The invention relates to the technical field of data storage, in particular to a device and a method for switching data frame storage.

Background

At present, HGU (Home Gateway Unit) devices are applied in large scale in an access Network, and these devices need to provide a PON (Passive Optical Network) access supporting multiple protocols for a client, and with the continuous improvement of access bandwidth, a conventional data storage manner cannot meet the requirement of throughput.

In data communication, a large number of data frames need to be cached in some application scenarios, and chip internal cache (OCB) is adopted, which is limited by chip area and cost control, and capacity often cannot meet requirements. At this time, a mode of expanding an external cache of a chip, such as a DDR (Double Data Rate) cache, is usually adopted to meet a requirement of capacity, but is limited by factors such as a bit width of the DDR, a working frequency, and a loss of efficiency, and a storage bandwidth may have a condition that cannot meet a special application scenario.

For example, in an XGSPON (10-Gigabit-Capable Symmetric Passive Optical Network, 10 Gigabit Symmetric Passive Optical Network) HGU device, the device specification requires that the downstream can buffer 1000 1518 bytes of data frames, the upstream can buffer data frames within a DBA (dynamic Bandwidth allocation) response interval, and the maximum upstream and downstream flows are both 10 Gbps. Although bandwidth can meet requirements by adopting an OCB (optical bus buffer) cache, the chip area and the cost are overhigh due to overlarge cache capacity, the read-write bandwidth of about 34G can be provided at most by adopting the bus BIT width of an external cache such as DDR1066 and 16BIT, the actually available storage bandwidth is lower in consideration of cost and efficiency loss, and the cost of the chip and a system is increased due to the fact that the DDR specification is improved to meet the requirements.

In the related art, although it is mentioned that an internal cache and an external cache may coexist to improve throughput during data storage, one of the internal cache or the external cache needs to be selected based on port fixation, for example, an OCB cache mode is selected for an uplink port and a DDR cache mode is selected for a downlink port in an HGU device. Although the scheme can meet the requirements of some scenes, the scheme cannot meet the requirements of the scenes with requirements on the number of buffer frames in both uplink and downlink.

Therefore, in a scenario where the internal cache and the external cache coexist, how to efficiently utilize the storage bandwidth and the capacity is an urgent problem to be solved by those skilled in the art.

Disclosure of Invention

The present invention aims to overcome the defects of the background art, and provides a device and a method for switching data frame storage, which can realize dynamic switching between an internal cache and an external cache, improve the storage bandwidth and capacity of equipment, have low use cost, and meet the requirements of practical application.

In order to achieve the above object, the present invention provides a device for switching data frame storage, which comprises a port switching decision module, a decision arbitration module, a DDR read-write control module and an OCB read-write control module;

the port switching decision module is configured to: generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the port cache threshold configuration value; sending each port data frame to a corresponding DDR read-write control module or OCB read-write control module or blocking according to an arbitration result fed back by the judgment arbitration module;

the decision arbitration module is configured to: performing decision arbitration on the multi-level port preemption request generated by the port switching decision module, and feeding an arbitration result back to the port switching decision module;

the DDR read-write control module is used for: counting the DDR resource occupation count of each port; controlling data writing and reading of the DDR cache;

the OCB read-write control module is used for: counting the OCB resource occupation count of each port and sending the OCB resource occupation count to a port switching judgment module; and controlling the data writing and reading of the OCB buffer.

On the basis of the above technical solution, the configuration value of the buffer threshold of the port includes: the OCB caches the threshold configuration value and DDR caches the threshold configuration value; the OCB cache threshold configuration value is a single threshold configuration value, and the DDR cache threshold configuration value is a multi-level threshold configuration value;

the port switching judgment module generates a multi-level port preemption request, and specifically comprises the following procedures: comparing the port OCB resource occupation count of each port with the OCB cache threshold configuration value of each port, and generating a port occupation request of the lowest level for the port exceeding the OCB cache threshold configuration value; and comparing the port DDR resource occupation counts of the rest ports with the multi-level DDR cache threshold configuration values of the respective ports, and if the port DDR resource occupation counts are greater than the Nth-level DDR cache threshold configuration values, generating an Nth-level port occupation request for the ports, wherein N is a natural number.

On the basis of the technical scheme, when the decision arbitration module carries out decision arbitration, a mode of grouping absolute priority is adopted: dividing the port preemption requests of the same level of each port into a group, carrying out arbitration selection between the groups according to an absolute priority mode, configuring the priority between the ports in the same group according to a designated strategy, and carrying out arbitration selection in the group according to the absolute priority mode; the selected port will get one of a switch grant, a hold grant and a block grant as an arbitration result.

On the basis of the technical scheme, the device further comprises a port input buffer module, which is used for: and requesting the port switching judgment module to process the data frames which are input by the port cache after the port caches the data frames with the specified number.

On the basis of the technical scheme, when the data frame is input and read out, the OCB read-write control module and the DDR read-write control module respectively update the OCB resource occupation count and the DDR resource occupation count of each port.

The invention also provides a method for switching the storage of the data frame, which comprises the following steps:

when each port needs to read out the data frame, generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the cache threshold configuration value of the port;

performing judgment arbitration on the multi-level port preemption request to obtain an arbitration result;

and sending the data frame of each port to a corresponding DDR buffer or OCB buffer or blocking according to the arbitration result.

On the basis of the above technical solution, the configuration value of the buffer threshold of the port includes: the OCB caches the threshold configuration value and DDR caches the threshold configuration value; the OCB cache threshold configuration value is a single threshold configuration value, and the DDR cache threshold configuration value is a multi-level threshold configuration value;

generating a multi-level port preemption request according to the port DDR resource occupation count, the port OCB resource occupation count and the port cache threshold configuration value, wherein the specific process comprises the following steps: comparing the port OCB resource occupation count of each port with the OCB cache threshold configuration value of each port, and generating a port occupation request of the lowest level for the port exceeding the OCB cache threshold configuration value; and comparing the port DDR resource occupation counts of the rest ports with the multi-level DDR cache threshold configuration values of the respective ports, and if the port DDR resource occupation counts are greater than the Nth-level DDR cache threshold configuration values, generating an Nth-level port occupation request for the ports, wherein N is a natural number.

On the basis of the technical scheme, when the decision arbitration is carried out on the multi-level port preemption requests, a grouping absolute priority mode is adopted: dividing the port preemption requests of the same level of each port into a group, carrying out arbitration selection between the groups according to an absolute priority mode, configuring the priority between the ports in the same group according to a designated strategy, and carrying out arbitration selection in the group according to the absolute priority mode; the selected port will get one of a switch grant, a hold grant and a block grant as an arbitration result.

On the basis of the above technical solution, before generating a multi-level port preemption request, the method further includes the following operations: and based on the data frames input by the port buffer, when the port buffers the data frames with the specified number, requesting to read the data frames.

On the basis of the technical scheme, the method further comprises the following operations: and when the data frame is input and read out, updating the OCB resource occupation count and the DDR resource occupation count of each port in real time.

The invention has the beneficial effects that:

in the invention, multi-level port preemption requests can be generated according to the flow of each port and the configurable cache threshold of each port; judging and arbitrating the multi-level port preemption request generated by each port, and generating one permission of switching, maintaining and blocking as an arbitration result; and sending the data frames of each port into a corresponding DDR cache or OCB cache or blocking according to different arbitration results, thereby realizing the dynamic storage switching of the internal cache and the external cache. The advantages of large bandwidth of an internal cache and large capacity of an external cache are fully utilized, and the integral data storage capacity of the equipment is effectively improved; in addition, an external storage device with high specification is not required, the use cost is low, and the practical application requirement is met.

Drawings

FIG. 1 is a block diagram of an apparatus for switching data frame storage according to an embodiment of the present invention;

fig. 2 is a schematic diagram illustrating that a decision arbitration module divides port preemption requests into groups according to an embodiment of the present invention;

FIG. 3 is a diagram illustrating an embodiment of a decision arbitration process;

FIG. 4 is a flowchart of a method for switching data frame storage according to an embodiment of the present invention;

fig. 5 is a flowchart of a method for switching data frame storage according to another embodiment of the present invention.

Detailed Description

With the continuous increase of data storage bandwidth and capacity requirements of HGU and OLT (Optical Line Terminal) devices, the traditional data caching architecture has been unable to meet new requirements. Although the bandwidth can meet the requirement by simply adopting the internal cache of the chip, the large capacity will inevitably cause the area and the cost of the chip to be overhigh. Although the capacity of the external cache (such as a DDR cache) is adopted alone to meet the requirement, the capacity is limited by the efficiency loss and the overhead of the external cache, and when the bandwidth of the internal cache is the same, a higher-specification external device is often required to implement the external cache, and the adoption of a high-specification external memory device also causes the system cost to be too high.

In the prior art, the purpose of meeting bandwidth and capacity is achieved by adopting a mode of coexistence of an internal cache and an external cache, for example, port data with a large capacity requirement is fixedly written into the external cache and port data with a large bandwidth requirement is written into the internal cache according to different requirements of the ports on the bandwidth and the capacity in equipment, and the mode can achieve the balance of the bandwidth and the capacity in a specific scene. However, when all ports have strict requirements on bandwidth and capacity, the fixed division of the internal cache and the external cache cannot meet the requirements.

Aiming at the problem of how to efficiently utilize the storage bandwidth and capacity under the situation that an internal cache and an external cache coexist, the invention aims to provide a device and a method for data frame storage switching, which can realize the dynamic switching of the internal cache and the external cache so as to improve the storage bandwidth and capacity of equipment, have low use cost and meet the requirements of practical application.

In order to achieve the purpose, the main design idea of the invention is as follows: generating multi-level port preemption requests according to the flow (port DDR resource occupation count and port OCB resource occupation count) of each port and the configurable cache threshold of each port; judging and arbitrating the multi-level port preemption request generated by each port, and generating one permission of switching, maintaining and blocking as an arbitration result; and sending the data frame of each port to a corresponding DDR buffer or OCB buffer or blocking according to different arbitration results. Compared with the prior art, the mode that the internal cache and the external cache are fixedly divided is adopted, the scheme can realize the dynamic storage switching of the internal cache and the external cache, fully utilizes the advantages of large bandwidth of the internal cache and large capacity of the external cache, and effectively improves the integral data storage capacity of the equipment.

In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.

However, it should be noted that: the examples to be described next are only some specific examples, and are not intended to limit the embodiments of the present invention necessarily to the following specific steps, values, conditions, data, orders, and the like. Those skilled in the art can, upon reading this specification, utilize the concepts of the present invention to construct more embodiments than those specifically described herein.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种日志输出方法、装置、设备及可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!