📄 operations_4.v
字号:
/*-------------------------------------------------------------------------
CONFIDENTIAL IN CONFIDENCE
This confidential and proprietary software may be only used as authorized
by a licensing agreement from CrazyBingo (Thereturnofbingo).
In the event of publication, the following notice is applicable:
Copyright (C) 2011-2012 CrazyBingo Corporation
The entire notice above must be reproduced on all authorized copies.
Author : CrazyBingo
Technology blogs : http://blog.chinaaet.com/crazybingo
http://www.cnblogs.com/crazybingo
Eamil Address : thereturnofbingo@gmail.com
Filename : operations_4.v
Data : 2012-10-20
Version : 1.0
Description : This module is arithmetic of 4 operations.
Modification History :
Data By Version Change Description
===========================================================================
12/10/20 CrazyBingo 1.0 Original
--------------------------------------------------------------------------*/
`timescale 1 ns / 1 ns
module operations_4
(
input clk,
input rst_n,
input [3:0] x,
input [3:0] y,
output [3:0] sum,
output carry_out,
output [3:0] sub,
output borrow_out
);
//------------------------
adder_4bits u_adder_4bits
(
.clk (clk),
.rst_n (rst_n),
.x (x),
.y (y),
.sum (sum),
.carry_out (carry_out)
);
//------------------------
subtractor_4bits subtractor_4bits
(
.clk (clk),
.rst_n (rst_n),
.x (x),
.y (y),
.sub (sub),
.borrow_out (borrow_out)
);
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -