Mudanças entre as edições de "Operadores Aritméticos em VHDL"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
(Criou página com 'Alguns operadores estão definidos na própria linguagem VHDL. <syntaxhighlight lang=vhdl> function "+" (L, R: INTEGER) return INTEGER; function "+" (L, R: NATURAL) return INTEGER; </syntaxhighlight> ...')
 
 
(2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
Alguns operadores estão definidos na própria linguagem VHDL.
+
=[[Standard.vhdl |Implícitos no Standard.vhd]]=
 +
Alguns operadores estão definidos implicitamente na linguagem VHDL  
 
<syntaxhighlight lang=vhdl>
 
<syntaxhighlight lang=vhdl>
  function "+" (L, R: INTEGER) return INTEGER;
+
--
  function "+" (L, R: NATURAL) return INTEGER;
+
  function "+" ( a, b: integer ) return integer;
 +
  function "+" (anonymous: real) return real;
 +
  function "+" (anonymous, anonymous2: real) return real;
 +
  function "+" (anonymous1: TIME) return TIME;
 +
  function "+" (anonymous1, anonymous2: TIME) return TIME;
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Na linguagem VHDL os operadores aritméticos estão definidos nas bibliotecas.
 
  
 
=[[Numeric std.vhd | numeric_std]]=
 
=[[Numeric std.vhd | numeric_std]]=
 
<syntaxhighlight lang=vhdl>
 
<syntaxhighlight lang=vhdl>
 
+
--
 
   function "+" (L, R: UNSIGNED) return UNSIGNED;
 
   function "+" (L, R: UNSIGNED) return UNSIGNED;
  -- Result subtype: UNSIGNED(MAX(L'LENGTH, R'LENGTH)-1 downto 0).
 
  -- Result: Adds two UNSIGNED vectors that may be of different lengths.
 
 
 
   function "+" (L, R: SIGNED) return SIGNED;
 
   function "+" (L, R: SIGNED) return SIGNED;
  -- Result subtype: SIGNED(MAX(L'LENGTH, R'LENGTH)-1 downto 0).
 
  -- Result: Adds two SIGNED vectors that may be of different lengths.
 
 
 
 
   function "+" (L: UNSIGNED; R: NATURAL) return UNSIGNED;
 
   function "+" (L: UNSIGNED; R: NATURAL) return UNSIGNED;
  -- Result subtype: UNSIGNED(L'LENGTH-1 downto 0).
 
  -- Result: Adds an UNSIGNED vector, L, with a non-negative INTEGER, R.
 
 
 
   function "+" (L: NATURAL; R: UNSIGNED) return UNSIGNED;
 
   function "+" (L: NATURAL; R: UNSIGNED) return UNSIGNED;
  -- Result subtype: UNSIGNED(R'LENGTH-1 downto 0).
 
  -- Result: Adds a non-negative INTEGER, L, with an UNSIGNED vector, R.
 
 
 
   function "+" (L: INTEGER; R: SIGNED) return SIGNED;
 
   function "+" (L: INTEGER; R: SIGNED) return SIGNED;
  -- Result subtype: SIGNED(R'LENGTH-1 downto 0).
 
  -- Result: Adds an INTEGER, L(may be positive or negative), to a SIGNED vector, R.
 
 
 
   function "+" (L: SIGNED; R: INTEGER) return SIGNED;
 
   function "+" (L: SIGNED; R: INTEGER) return SIGNED;
  -- Result subtype: SIGNED(L'LENGTH-1 downto 0).
 
  -- Result: Adds a SIGNED vector, L, to an INTEGER, R.
 
 
</syntaxhighlight>
 
</syntaxhighlight>

Edição atual tal como às 21h13min de 10 de maio de 2016

Implícitos no Standard.vhd

Alguns operadores estão definidos implicitamente na linguagem VHDL

--
   function "+" ( a, b: integer ) return integer;
   function "+" (anonymous: real) return real;
   function "+" (anonymous, anonymous2: real) return real;
   function "+" (anonymous1: TIME) return TIME;
   function "+" (anonymous1, anonymous2: TIME) return TIME;

numeric_std

--
  function "+" (L, R: UNSIGNED) return UNSIGNED;
  function "+" (L, R: SIGNED) return SIGNED;
  function "+" (L: UNSIGNED; R: NATURAL) return UNSIGNED;
  function "+" (L: NATURAL; R: UNSIGNED) return UNSIGNED;
  function "+" (L: INTEGER; R: SIGNED) return SIGNED;
  function "+" (L: SIGNED; R: INTEGER) return SIGNED;