什么';s相当于Verilog tilde操作符~&引用;用VHDL?

什么';s相当于Verilog tilde操作符~&引用;用VHDL?,vhdl,Vhdl,在Verilog和c语言中,我可以使用tilde操作符轻松地对向量求反。例如: // 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

在Verilog和c语言中,我可以使用tilde操作符轻松地对向量求反。例如:

// 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;
--VHDL
图书馆ieee;
使用ieee.std_logic_1164.all;
实体设计是
终端实体;
设计的体系结构rtl是
a:std_逻辑_向量(7到0):=X“0F”;
b:标准逻辑向量(7到0);
开始

b非
操作员:

b <= not a;

bnot
操作员:

b <= not a;
b

在ISO/IEC 9899中,C~是按位补码,其中C或Verilog中的整数类型用位显示底层类型。VHDL中的求反是使用一元运算符“-”对表示有符号数的标量或元素类型执行的。VHDL中表示布尔值或位(包括数组类型)的类型的逻辑互补使用“非”逻辑运算符。VHDL类型integer和real是没有逻辑运算的标量数字类型-它们没有“位”,不像-2008 fixed_pkg/fixed_generic_pkg和float_pkg/float_generic_pkg和std_ulogic元素(“位”)其中有“非”运算符。这来自Ada,它遵循数学定义,而不是底层机器类型-如果对标量最小值范围有足够的支持,Ada或VHDL可以在基于十进制的ALU的机器上运行。在ISO/IEC 9899中,C~是按位补码,其中C或Verilog中的整数类型用位显示底层类型。VHDL中的求反是使用一元运算符“-”对表示有符号数的标量或元素类型执行的。VHDL中表示布尔值或位(包括数组类型)的类型的逻辑互补使用“非”逻辑运算符。VHDL类型integer和real是没有逻辑运算的标量数字类型-它们没有“位”,不像-2008 fixed_pkg/fixed_generic_pkg和float_pkg/float_generic_pkg和std_ulogic元素(“位”)其中有“非”运算符。这来自Ada,它遵循数学定义,而不是底层机器类型——只要对标量最小值范围有足够的支持,Ada或VHDL可以在基于十进制的ALU的机器上运行。
C:\> ghdl.exe -a --std=08 --ieee=synopsys --work=work ./testit.vhd
C:\> ghdl.exe --elab-run --std=08 testbench --ieee-asserts=disable
./testit.vhd:17:5:@0ms:(report note): a:F0
./testit.vhd:18:5:@0ms:(report note): b:0F