【leetcode】Edit Distance 详解

下图为TI C6xx DSP Nyquist总线拓扑图,总线连接了master与slave,提供了高速的数据传输。有很多种速率不同的总线,如图中的红色方框,最高速总线为CPU/2 TeraNet SCR(即VBUSM SCR),带宽为256bit,其他低速总线为CPU/3,CPU/6,带宽参考图中所示。总线之间用Bridge(桥)连接,作用包括转换总线的速率,使之与所流向总线的速率相同等。

在具体应用中,各种速率的总线完全可以满足复杂的数据传输,而数据传输的瓶颈往往在于连接总线之间的Bridge。下面将举例说明,首先讲解下master访问salve的路径。

AIF2(片上协处理器,在LTE系统中用于接收天线数据)访问MSM(MSM为片上共享内存,对于Nyquist,大小为4M,它独立于四个CPU,四个CPU均可访问,管理MSM的为MSMC,即共享内存控制器,在MSMC上提供给协处理访问MSM的接口为SMS)与DDR(DSP外接的扩展内存,即外存,在MSMC上提供给协处理访问DDR的接口为SES,MSMC详细内容可参考MSMC
data manual):

1,AIF2访问MSM路径:

AIF2-->CPU/3低速总线-->Bridge-->CPU/2高速总线-->MSMC接口M3_SL2(即SMS)-->MSM。(见图中的蓝色曲线)

2,AIF2访问DDR路径:

AIF2-->CPU/3低速总线-->Bridge-->CPU/2高速总线-->MSMC接口M3_DDR(即SES)-->EMIF(外部内存接口控制器)-->DDR。(见图中的蓝色曲线)

CPUx访问CPUy的L1或L2内存:

CPUx(通过corePac-x的XMC模块)-->MSMC S端口(S表示MSMC作为slave)-->MSMC M端口(M表示MSMC作为msater发起访问)-->CPU/2高速总线-->Bridge-->corePac-y的EMC模块-->corePac-y的L1或L2内存。(图中紫色曲线)

Bridge的瓶颈问题:

如图中示,若FFTC与AIF2或者还有其他模块同时访问了MSM或者DDR,这样连接CPU/3与CPU/2的Bidge(指向CPU/2总线方向的Bridge)将面临很大的压力,Bridge必将舍弃一些数据传输任务,导致数据传输失败,如AIF2无法写或读MSM或DDR内存,导致软件或硬件出现问题。

解决Bridge瓶颈问题的办法:

1,尽量避免多个Master(图中左下侧连接CPU/3总线的master)同时访问MSM或DDR.

2,如果无法避免多个Master同时访问MSM或DDR,可将某些Master的内存空间设置在corePac中的L1D或者L2资源,这样可以避免访问MSM或者DDR的次数,减小Bridge的数据传输压力。因为Mster(图中左下侧连接CPU/3总线的master)访问corePac中的L1D或者L2资源不再需要经过连接CPU/3与CPU/2的Bidge(指向CPU/2总线方向的Bridge)。如指定AIF2将接收到的天线数据存储在需要处理该天线数据的CPU对应的corePac中的L1D或者L2资源中。

【leetcode】Edit Distance 详解,布布扣,bubuko.com

时间: 2024-12-25 05:24:52

【leetcode】Edit Distance 详解的相关文章

学习ASP .NET MVC5官方教程总结(七)Edit方法和Edit视图详解

学习ASP .NET MVC5官方教程总结(七)Edit方法和Edit视图详解 在本章中,我们研究生成的Edit方法和视图.但在研究之前,我们先将 release date 弄得好看一点.打开Models\Movie.cs 文件.先添加一个引用: <span style="font-size:14px;">using System.ComponentModel.DataAnnotations;</span> 然后在Movie类中添加以下代码: [Display(

[LeetCode] Edit Distance(很好的DP)

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word: a) Insert a character b) Delete a character c) Repla

Leetcode:Edit Distance 解题报告

Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word: a) Insert a characterb) Delete a chara

LeetCode - Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word: a) Insert a character b) Delete a character c) Repla

Leetcode:Edit Distance 字符串编辑距离

原题戳我 Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word: a) Insert a character b) Delete a character c)

[leetcode]Edit Distance @ Python

原题地址:https://oj.leetcode.com/problems/edit-distance/ 题意: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a w

LeetCode:Edit Distance(字符串编辑距离DP)

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word: a) Insert a character b) Delete a character c) Repla

LeetCode算法题详解之两个数组的交集

题目背景: 这个与我们高中时期学习的交集是一样的,顺便复习一下相关的数学知识有助于更好的理解. 交集的定义: 对于两个集合A和B,定义A和B的交集为C,其中C={x|x属于A且X属于B},记作A∩B. 如图所示: 解题思路一: public int[] intersect(int[] nums1, int[] nums2) { Arrays.sort(nums1); Arrays.sort(nums2); List<Integer> tmp = new ArrayList<Integer

[LeetCode] One Edit Distance 一个编辑距离

Given two strings S and T, determine if they are both one edit distance apart. 这道题是之前那道Edit Distance的拓展,然而这道题并没有那道题难,这道题只让我们判断两个字符串的编辑距离是否为1,那么我们只需分下列三种情况来考虑就行了: 1. 两个字符串的长度之差大于1,那么直接返回False 2. 两个字符串的长度之差等于1,那么长的那个字符串去掉一个字符,剩下的应该和短的字符串相同 3. 两个字符串的长度之