当前位置:网站首页>Alu logic operation unit
Alu logic operation unit
2022-07-05 05:28:00 【Li Junfeng】
ALU Logical unit of operation
according to ( Two ) Medium to single cycle CPU The definition of , This module needs to realize the following 4 Class operation : Add 、 reduce 、 Bitwise AND 、 Press bit or . Therefore need 2 bit The control signal of Aluc To control ALU Operation type of .
Correspondence of signals :
surface 4 1 Aluc Coding and corresponding functions
Aluc code Realization function Arithmetic type
00 Add Arithmetic operation
01 reduce Arithmetic operations
10 Bitwise AND Logical operations
11 Press bit or Logical operations
Addition and subtraction can be used 32 Bit full adder ADDSUB_32 Realization , Bitwise and used AND32, Bit by bit or used OR32, The choice of function uses 32 Bit two choose one multi-channel selector MUX2X32 Realization , Returned the result R, as well as ALU Whether the operation result of is 0 The judgment of the Z( if R=0,Z=1;),Z Mainly for beq、bne Instructions .
Code
module ALU(X,Y,Aluc,R,Z);
input [31:0]X,Y;
input [1:0] Aluc;
output [31:0]R;
output Z;
wire [31:0]d_as,d_and,d_or,d_and_or;
ADDSUB_32 as32(X,Y,Aluc[0],d_as);
AND32 a32(X,Y,d_and);
OR32 o32(X,Y,d_or);
MUX2X32 select1(d_and,d_or,Aluc[0],d_and_or);
MUX2X32 select2(d_as,d_and_or,Aluc[1],R);
isZero i1(R,Z);
endmodule
边栏推荐
- To the distance we have been looking for -- film review of "flying house journey"
- 对象的序列化
- Animation scoring data analysis and visualization and it industry recruitment data analysis and visualization
- Count sort
- 质量体系建设之路的分分合合
- C语言杂谈1
- Under the national teacher qualification certificate in the first half of 2022
- [binary search] 69 Square root of X
- Introduction to memory layout of FVP and Juno platforms
- 动漫评分数据分析与可视化 与 IT行业招聘数据分析与可视化
猜你喜欢
随机推荐
Introduction to tools in TF-A
GBase数据库助力湾区数字金融发展
Solon Logging 插件的添加器级别控制和日志器的级别控制
Web APIs DOM node
Haut OJ 1352: string of choice
搭建完数据库和网站后.打开app测试时候显示服务器正在维护.
Es module and commonjs learning notes
lxml. etree. XMLSyntaxError: Opening and ending tag mismatch: meta line 6 and head, line 8, column 8
YOLOv5添加注意力機制
Reflection summary of Haut OJ freshmen on Wednesday
Web APIs DOM节点
[to be continued] [depth first search] 547 Number of provinces
Solution to the palindrome string (Luogu p5041 haoi2009)
Insert sort
[转]MySQL操作实战(一):关键字 & 函数
A new micro ORM open source framework
对象的序列化
[interval problem] 435 Non overlapping interval
Embedded database development programming (VI) -- C API
Developing desktop applications with electron


![[转]MySQL操作实战(三):表联结](/img/70/20bf9b379ce58761bae9955982a158.png)






