VHDL:subtype indication: mudanças entre as edições

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
Moecke (discussão | contribs)
Criou página com ';Syntax rule: ( type_mark [ '''range''' simple_expression ('''to''' | '''downto''') [[VDHL:simple_expression | simple_expressi...'
 
Moecke (discussão | contribs)
Sem resumo de edição
Linha 3: Linha 3:


;Examples:
;Examples:
'''subtype''' small_int '''is''' integer '''range''' -128 '''to''' 127;
<syntaxhighlight lang=vhdl>
subtype small_int is integer range -128 to 127;


'''subtype''' pcm_channel '''is''' integer range 31 '''downto''' 0;
subtype pcm_channel is integer range 31 downto 0;
</syntaxhighlight>

Edição das 16h30min de 18 de setembro de 2015

Syntax rule
( type_mark  [ range  simple_expression (to | downto)   simple_expression
Examples
subtype small_int is integer range -128 to 127;

subtype pcm_channel is integer range 31 downto 0;