Analysis of hardware route forwarding principles-early morning supplement

Source: Internet
Author: User

Analysis of hardware route forwarding principles-early morning supplement
Because it was so sleepy last night, my eyes were spent while explaining the problem, and my mind was also short-circuited. When I got up in the morning and found my family still asleep, I wanted to continue talking about what I didn't say last night.
My explanation diagram shows my hardware forwarding schematic again:

 

 

Please note that there is no optimization, you can try to use some tips to further optimize it, or you can directly map it with standard TCAM. The figure shows in detail how the logic of "Longest prefix" is implemented. In the TCAM route forwarding table instances, it is often painted as a black box called "Priority logic controller ", however, this logic circuit is relatively simple, and we believe that you can design it by yourself.
In fact, there is a container called "anti-Mask" in which the anti-mask is arranged by bit next to the bit line comparison key behind the decoder. This is a standard TCAM practice.
We all know about content addressing and address addressing that the cache is expensive, so it cannot be too large, and the content can be very large, because it is cheaper.
But can you explain it at the technical level? In fact, the difference between expensive and cheap is caused by technical reasons. Let's take a look at the memory storage array circuit:

 

 

This is a very typical matrix and very simple. However, the CAM circuit is not that simple, as shown in:

 

 

For TCAM, you need to add a care logic to make it more complicated. It is not only complicated in the circuit, but also increased in power consumption. You must know that in the process of CAM/TCAM matching, all parts of the circuit work simultaneously.
Many people say that there is a hardware HASH in the CPU cache. For example, the nth to m bit of the address is actually a shift and a modulo operation! In the programmer's opinion, this is only good. The simplest HASH algorithm that programmers know is more complicated than this one. In fact, hardware engineers are dismissive to programmers, because their focus is on how to make the circuit work at the same time with the lowest power consumption and smaller circuit scale. Both CAM and TCAM use hardware HASH, which is a simple hardware HASH. However, the circuit can work at the same time. This is a big problem of software hash. The purpose of software hash is to make hash distribution more even and the average performance better. In this way, the average variance of the conflicting linked list length is the smallest. Software hash is designed to solve conflicts, but hardware HASH does not need to do so, because in the view of the software, when the conflicting linked list must be serialized, the hardware can be simultaneously implemented.
At the beginning of the design, the CPU computer for sequential execution is a model for sequential execution. commands are executed one by one. This is because it fully simulates the actions of people in the real world. This means that all the algorithm steps running on the computer must be implemented in serial mode over time. A good algorithm aims to minimize the time consumption. However, the design of hardware circuits does not follow the real-world practices of people. It is impossible for a person to do many things at the same time. The execution process of hardware circuits is more like a flood process. Because of the potential energy, the flood will go at the same time (note, at the same time !) All the places where it can go, instantly swallowed up everything.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.