vhdl - VHDL 中的 Verilog 波浪号运算符“~”等价于什么?
问题描述
在 Verilog 和 c 语言中,我可以通过使用波浪号运算符轻松否定向量。例子:
// Verilog
module try;
wire [7:0] a = 8'b1111_0000;
reg [7:0] b;
initial begin
b = ~a;
// b = 8'b0000_1111;
end
endmodule
我将如何在 VHDL 中做同样的事情?
-- VHDL
library ieee;
use ieee.std_logic_1164.all;
entity design is
end entity;
architecture rtl of design is
a: std_logic_vector(7 downto 0) := X"0F";
b: std_logic_vector(7 downto 0);
begin
b <= ?negate? a;
-- result: b = X"F0"
end architecture;
解决方案
not
运营商:
b <= not a;
推荐阅读
- powershell - 如何在 powershell 脚本中使用三个连字符/破折号重命名数据库名称?
- angular - 使用 UI 库的 NX 工作区中的故事书
- r - For循环改变多列
- swiftui - 如何定位原生 SwiftUI PageTabView 样式的 TabView 的控制指示器(小点)?
- python - 新的不和谐更新后,不和谐机器人不再提供角色
- python - 对从 Quickbase 解析的列应用日期时间操作,以在 pyspark 数据块中获取正确的日期时间格式
- facebook - 可从 facebook api 格式化余额
- ibm-doors - DXL 门:查找模块仍然打开的原因
- cloud - 我们收到 Cloudfront 502 错误 - Abortedorigin 导致我们的移动应用程序出现异常
- javascript - 通过 chrome.windows.create 将 JSON 数据填充到 chrome 扩展创建的弹出窗口中