vhdl - VHDL fullAdder 模拟?
问题描述
考虑下面的代码:
entity FA is
port(X,Y:in bit;
cin : bit:='0';
sum:out bit;
cout : out bit); --this--
end FA;
architecture Data_flow of FA is
signal S1 , S2 : bit;
begin
S2<=S1 and cin;
S1<=X xor Y;
sum<=S1 xor cin;
cout<=S2 or(X and Y);
end Data_flow;
entity testBench is
end testBench;
architecture BA of testBench is
signal X,Y,cin,sum,cout:bit;
component FA port(X,Y:in bit;
cin:in bit:='0';
sum:out bit;
cout:out bit);
end component;
for all : FA use entity FA(Data_flow);
end for;
begin
EUT:FA port map(X,Y,cin,sum,cout);
X<='0','1' after 4ns;
Y<='0','1' after 2ns,'0' after 4ns,'1' after 6ns;
cin <='0','1' after 1ns,'0' after 2ns,'1' after 3ns,'0' after 4ns,'1'after 5ns,'0'after 6ns;
end BA;
我想用 VHDL 模拟这个代码来创建一个 fullAdder 模拟。
我尝试了很多次,但我无法获得我的目标视图。
解决方案
推荐阅读
- docker - TeamCity Docker 为 .NET 5 构建代理
- python - 为什么我的代码只读取第一个条件而不检查第二个条件?
- javascript - Svg animateTransforms 未按预期工作
- apache-spark - 在多个条件下加入两个数据框pyspark
- python - http.client 的更好替代品
- c# - 在 Unity 日志引用的 JSON 配置文件中无法理解/发现错误
- javascript - 使用 vscode.commands.executeCommand 创建一个新的 Flutter 应用项目
- networking - CRC 生成器位是否都相同?
- sql - 计算 SQL 中行组的方差
- docker - Java HiveMQ 客户端每秒从 docker swarm 中的不同端口重新连接