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

📄 bitadd.tdf

📁 乘法器的vhdl语言描述.本人调试已经通过
💻 TDF
字号:
%
Serial adder - inspired by the work of Ray Andraka

Written by steven groom (steven.groom@arrow.co.nz)
This module can be used freely as and when needed as long as this message remains intact.
%
include "lpm_add_sub";
subdesign bitadd
(
	dataa				:	input;		-- serial data in
	datab				:	input;		-- other serial data in
	result				:	output;		-- serial result out
	clk					:	input;		-- module clock
	reset				:	input;		-- module reset
)
variable
	_sum				:	dff;		-- the 1/2 adder sum
	_carry				:	dff;		-- and the carry
begin
	_sum.clk=clk;
	_sum.clrn=not reset;
	_carry.clk=clk;
	_carry.clrn=not reset;
	_sum=(((not dataa) and (datab xor _carry)) or (dataa and (datab xnor _carry)));
	_carry=(((not dataa) and (datab and _carry)) or (dataa and (datab or _carry)));
	result=_sum;
end;

⌨️ 快捷键说明

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