Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is negation (not) of a bit vector in VHDL

Tags:

vector

bit

vhdl

What does it mean to do a negation of a bit vector in VHDL? For example if I have 10100111 which is a bit vector called temp and I do something like temp := not temp what will my output be?

like image 806
JC2 Avatar asked Feb 03 '11 03:02

JC2


People also ask

How do you perform a negation in VHDL?

If you really want to negate a vector, you need to use a vector which has certain properties defined for it. Specifically: some notion of numerical value (so you can't use bit_vector or std_logic_vector , which are just collections of bits) some notion of "sign"

What is a bit vector in VHDL?

Description. The Bit_vector type is an unconstrained vector of elements of the bit type. The size of a particular vector is specified during its declaration (see the example below). The way the vector elements are indexed depends on the defined range and can be either ascending or descending (see range).

How to use std_ logic_ vector in VHDL?

The std_logic_vector type is used for arrays of std_logic variables and signals. The basic VHDL logic operations are defined on this type: and , nand , or , nor , xor , xnor . These must be given two arrays of the same size; they do the operation on ecah position and return another array.

What does std_logic_vector mean in VHDL?

The VHDL keyword “std_logic_vector” defines a vector of elements of type std_logic. For example, std_logic_vector(0 to 2) represents a three-element vector of std_logic data type, with the index range extending from 0 to 2.


1 Answers

A bit-wise inversion.

In general in VHDL (LRM 7.2.1): "For the unary operation not defined on one-dimensional array types, the operation is performed on each element of the operand, and the result is an array with the same index range as the operand."

like image 177
Jan Decaluwe Avatar answered Sep 28 '22 16:09

Jan Decaluwe