当前位置:网站首页>RTL仲裁器设计
RTL仲裁器设计
2022-06-11 19:27:00 【Starry丶】
目录
当多个Master访问一个Slave时,该Slave就需要对这几个Master进行仲裁,实际上有很多仲裁算法,此处就作如下讲解。
仲裁器设计(一) – Fixed Priority Arbiter
仲裁器设计(二)-- Round Robin Arbiter
仲裁器设计(三)-- Weighted Round Robin
1. Fixed_Priority_Arbiter
这种仲裁算法很简单,这几个Master的优先级是固定的,永远是优先级最高的Master可以访问Slave。
1.1. 参数描述
| Signal | Direction | Width(bits) | Description |
|---|---|---|---|
| req | input | REQ_WIDTH | Master请求信号,优先级由0到REQ_WIDTH-1依次递减 |
| grant | input | REQ_WIDTH | 表明被赋予访问权的Master索引,该信号只有1bit为1 |
| Parameter | Units | Description |
|---|---|---|
| REQ_WIDTH | bit | 参与仲裁的Master个数 |
1.2. 逻辑设计
首先可以发现这是一个组合逻辑,即当前的输出只与当前的输入有关。
涉及的数学关系是,req所有为1的位中最低的那一位就是grant为1的那一位。我们可以用真值表表达这层关系
例如3bit
| req | grant |
|---|---|
| xx1 | 001 |
| x10 | 010 |
| 100 | 100 |
由此可以直接写出逻辑表达式
grant[0] = req[0];
grant[1] = req[1] && (~req[0]);
grant[2] = req[2] && (~req[1])&& (~req[0])= req[2] && (~(req[1] || req[0]));
grant[3] = req[3] && (~req[2])&& (~req[1])&& (~req[0])=req[3] && (~(req[2]||req[1]||req[0]));
...
grant[i] = req[i] && (~(|req[i-1:0]));
由这个逻辑表达式直接得出代码
module fix_prio_arb#(
parameter REQ_WIDTH = 15
)(
input [REQ_WIDTH-1:0] req,
output [REQ_WIDTH-1:0] grant
);
genvar i;
generate
for(i=0;i<REQ_WIDTH;i=i+1) begin
if(i==0)
assign grant[0] = req[0];
else
assign grant[i] = req[i] && (~(|req[i-1:0]));
end
endgenerate
endmodule
1.3. 测试
测试也比较简单,此处直接上图

2. Round_Robin_Arbiter
2.1. 参数描述
2.2. 逻辑设计
2.3. 测试
3. Fixed_Priority_Arbiter
3.1. 参数描述
3.2. 逻辑设计
3.3. 测试
边栏推荐
- 使用图像处理技术和卷积神经网络(CNN)的作物病害检测
- Specific methods for porting WinCC flexible 2008 project to botu WinCC
- An adaptive chat site - anonymous online chat room PHP source code
- Pstack and dmesg
- PIL pilot image processing [1] - installation and creation
- Anaconda installation, jupyter notebook default startup path modification and nbextensions plug-in installation
- 疫情下远程办公沟通心得|社区征文
- Database design graduation information management
- Raki's notes on reading paper: memory replace with data compression for continuous learning
- [video denoising] video denoising based on salt with matlab code
猜你喜欢

MOS transistor 24n50 parameters of asemi, 24n50 package, 24n50 size

CMU 15-445 database course lesson 5 text version - buffer pool

Multimodal learning toolkit paddlemm based on propeller

《经济学人》:WTO MC12重启 数字经济成为全球经济复苏和增长的核心引擎
![[signal denoising] signal denoising based on FFT and fir with matlab code](/img/4c/782afe2652a674d64fccd8d28304ed.png)
[signal denoising] signal denoising based on FFT and fir with matlab code
![[Lao Wang's fallacy of brain science] Why do blind people](/img/7c/98f27bb55a1a3b74c0ed8fd7fd2cc5.jpg)
[Lao Wang's fallacy of brain science] Why do blind people "seem" to be more "sensitive" than normal people?

Yolov3 pytoch code and principle analysis (II): network structure and loss calculation

懂机器学习如何入门量化交易?

2022各大厂最新总结的软件测试宝典,看完不怕拿不到offer

Common - name of conference room
随机推荐
SQL injection vulnerability learning 1: phpstudy integrated environment building DVWA shooting range
Leetcode: sword finger offer 56 - ii Number of occurrences of numbers in the array II [simple sort]
Cf:d. black and white stripe
The Economist: WTO MC12 restarts the digital economy and becomes the core engine of global economic recovery and growth
无监督图像分类《SCAN:Learning to Classify Images without》代码分析笔记(1):simclr
[assembly] analysis of Experiment 7 of the fourth edition of assembly language
Go语言入门(五)——分支语句
使用图像处理技术和卷积神经网络(CNN)的作物病害检测
懂机器学习如何入门量化交易?
Common - name of conference room
【Multisim仿真】利用运算放大器产生方波、三角波发生器
使用canvas给页面添加文字水印
Chrome tips - browser web page setting coding, solving the problem of web page garbled code, obtaining the latest version of charset plug-in, UTF-8 coding setting
Today's sleep quality record is 60 points
PIL pilot image processing [1] - installation and creation
cocan yocto buildroot
Introduction to typescript
PyMySQL利用游标操作数据库方法封装!!!
Web3 Games: exploring and reshaping the game experience
《经济学人》:WTO MC12重启 数字经济成为全球经济复苏和增长的核心引擎