小编JC2*_*JC2的帖子

什么是VHDL中的位向量的否定(非)

在VHDL中对位向量进行否定是什么意思?例如,如果我有10100111这是一个名为temp的位向量,我会做一些像temp:= not temp我的输出是什么?

vector vhdl bit

5
推荐指数
2
解决办法
5万
查看次数

2
推荐指数
1
解决办法
160
查看次数

VHDL:从浮点转换为定点解释?

在第6.2章的VHDL设计器指南中,有一个实体和体系结构体,用于从浮点到定点表示的转换器.我很困惑

library ieee; use ieee.std_logic_1164 all;
entity to_fp is
   port(vec: in std_u_logic_vector(15 downto 0);
        r: out real);
end entity to_fp;

architecture behavioral of to_fp is
begin 
    behavior : process (vec) is
       variable temp: bit_vector(vec'range);
       variable negative: boolean;
       variable int_result: integer;
    begin
       temp := to_bitvector(vec);
       negative := temp(temp'left) = '1';
       if negative then
          temp := not temp;
       end if;
       int_result := 0;
       for index in vec'range loop
           int_result := int_result*2 + bit'pos(temp(index));
       end loop;
       if negative then
          int_result := (-int_result) -1; …
Run Code Online (Sandbox Code Playgroud)

vhdl

1
推荐指数
1
解决办法
2375
查看次数

标签 统计

vhdl ×2

bit ×1

surroundscm ×1

vector ×1

version-control ×1