⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alu.v

📁 debussy中文使用手册
💻 V
字号:
// ************************************************************************// *  NOVAS SOFTWARE CONFIDENTIAL PROPRIETARY NOTE                        *// *                                                                      *// *  This software contains information confidential and proprietary     *// *  to Novas Software Inc. It shall not be reproduced in whole          *// *  or in part or transferred to other documents, or disclosed          *// *  to third parties, or used for any purpose other than that           *// *  for which it was obtained, without the prior written consent        *// *  of Novas Software Inc.                                              *// *  (c) 1996, 1997, 1998 Novas Software Inc.                            *// *  All rights reserved                                                 *// *                                                                      *// ************************************************************************/* Debussy tutorial case: A simplified microprogramming-based CPU   file name: alu.v   description: this parts perform the arithmetic and login funtion  	        which is defined by mode select		a,b: operand data inputs		cin: carry input		select: alu function select		dout: alu result data output		carry: alu result carry output		zero: alu result zero output*/`timescale 1 ns / 1 nsmodule alu(a, b, cin, select, out, carry, zero);input [7:0] a;input [7:0] b;input cin;input [2:0] select;output [7:0] out;output carry;output zero; assign #1 {carry,out}= (select==0) ? a + b + cin 	: (select==1) ? a - b - 1 + cin 	: (select==2) ? b - a - 1 + cin	: (select==3) ? a & b	: (select==4) ? a | b	: (select==5) ? a ^ b	: (select==6) ? a ^~ b	: 0; assign zero = (out==0) ? 1 : 0;endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -