FONT SIZE : AAA
Verilog has built-in types for signed and unsigned when we define registers (reg). The default type for a reg is unsigned, and so, therefore, we can define a 16-bit unsigned integer using the following syntax:
1 reg [15:0] unsigned_integer;
It can be a little unclear as to where the decimal point occurs, and one approach to make this explicit in the declaration is to offset the array indices accordingly. For example, to use an unsigned integer of the form 8:8, the declaration could be redefined as follows:
1 reg [7:−8] unsigned_integer;
Signed integers are defined in Verilog in exactly the same manner, except using the addition of the keyword signed, so taking the previous example, the declaration would become:
1 reg signed [7:−8] signed_integer;
When using these numbers, no additional functions are required; however, care needs to be taken when shifting to ensure that the correct notation is used (i.e., that it is consistent), and the result is shifted by the appropriate number of bits to maintain the correct accuracy.
One of the nice aspects of Verilog is that it is not really necessary to define new types and conversion routines as with VHDL, and it is possible to allow Verilog to handle the conversions. For example, the low level definition of integers or fixed point data types as registers means that the conversion between the two is implicit, as long as the number of bits is consistent, making conversions very simple.
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Active Active
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Active Active
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs
Lifecycle:Obsolete -
RoHS:
Manufacturer:Xilinx
Product Categories: FPGAs (Field Programmable Gate Array)
Lifecycle:Obsolete -
RoHS: No RoHS
Manufacturer:Xilinx
Product Categories:
Lifecycle:Obsolete -
RoHS:
Support