VHDL: mudanças entre as edições

De Pontão Nós Digitais
Ir para navegaçãoIr para pesquisar
Sem resumo de edição
Sem resumo de edição
Linha 1: Linha 1:
'''VHDL''' ('''[[VHSIC]] Hardware Description Language''') is a [[hardware description language]] used in [[electronic design automation]] to describe [[digital electronics|digital]] and [[mixed-signal integrated circuit|mixed-signal]] systems such as [[field-programmable gate array]]s and [[integrated circuit]]s. VHDL can also be used as a general purpose parallel programming language.
== História ==
== Design ==
== Vantagens ==
== Desvantagens ==
<source lang="VHDL">
-- (this is a VHDL comment)
-- import std_logic from the IEEE library
library IEEE;
use IEEE.std_logic_1164.all;
-- this is the entity
entity ANDGATE is
  port (
    I1 : in std_logic;
    I2 : in std_logic;
    O  : out std_logic);
end entity ANDGATE;
-- this is the architecture
architecture RTL of ANDGATE is
begin
  O <= I1 and I2;
end architecture RTL;
</source>
(Notice that <code>RTL</code> stands for ''[[Register transfer level]]'' design.) While the example above may seem verbose to HDL beginners, many parts are either optional or need to be written only once. Generally simple functions like this are part of a larger behavioral module, instead of having a separate module for something so simple. In addition, use of elements such as the <tt>std_logic</tt> type might at first seem to be an overkill. One could easily use the built-in <tt>bit</tt> type and avoid the library import in the beginning. However, using this [[Multi-valued logic|9-valued logic]] ([[IEEE 1164|<tt>U</tt>,<tt>X</tt>,<tt>0</tt>,<tt>1</tt>,<tt>Z</tt>,<tt>W</tt>,<tt>H</tt>,<tt>L</tt>,<tt>-</tt>]]) instead of simple bits (0,1) offers a very powerful simulation and debugging tool to the designer which currently does not exist in any other HDL.
=== Synthesizable constructs and VHDL templates ===
=== MUX template ===
The [[multiplexer]], or 'MUX' as it is usually called, is a simple construct very common in hardware design. The example below demonstrates a simple two to one MUX, with inputs <tt>A</tt> and <tt>B</tt>, selector <tt>S</tt> and output <tt>X</tt>. Note that there are many other ways to express the same MUX in VHDL.
<source lang="VHDL">X <= A when S = '1' else B;</source>
=== Latch template ===
A [[transparent latch]] is basically one bit of memory which is updated when an enable signal is raised. Again, there are many other ways this can be expressed in VHDL.
<source lang="VHDL">
-- latch template 1:
Q <= D when Enable = '1' else Q;
-- latch template 2:
process(D,Enable)
begin
  if Enable = '1' then
    Q <= D;
  end if;
end process;
</source>
== References ==
<references />
== Further reading ==
* Bryan Mealy, Fabrizio Tappero (February 2012). [http://www.freerangefactory.org/dl/free_range_vhdl.pdf Free Range VHDL]. The no-frills guide to writing powerful VHDL code for your digital implementations. [http://www.freerangefactory.org freerangefactory.org].
* {{cite news|title=Comparing Verilog to VHDL Syntactically and Semantically|author=Johan Sandstrom|publisher=EE Times|date=October 1995|work=Integrated System Design|url=http://www.sandstrom.org/systemde.htm}} &mdash; Sandstrom presents a table relating VHDL constructs to [[Verilog]] constructs.
* {{cite journal|url=http://www.eda.org/rassp/vhdl/guidelines/vhdlqrc.pdf|format=PDF|title=VHDL quick reference card|publisher=Qualis Design Corporation|author=Qualis Design Corporation|date=2000-07-20|version=1.1}}
* {{cite journal|url=http://www.eda.org/rassp/vhdl/guidelines/1164qrc.pdf|format=PDF|title=1164 packages quick reference card|publisher=Qualis Design Corporation|author=Qualis Design Corporation|date=2000-07-20|version=1.0}}
* Janick Bergeron, "Writing Testbenches: Functional Verification of HDL Models", 2000, ISBN 0-7923-7766-4.  (The HDL Testbench Bible)
== External links ==
{{Commons category}}
{{wikibooks|Programmable Logic|VHDL}}
* [http://www.eda.org/twiki/bin/view.cgi/P1076/WebHome IEEE VASG (VHDL Analysis and Standardization Group)], the official VHDL working group
* The VHDL newsgroup ''comp.lang.vhdl'' on [news://comp.lang.vhdl Usenet] and the [http://groups.google.com/group/comp.lang.vhdl/topics web] and their [http://www.vhdl.org/comp.lang.vhdl/ Frequently Asked Questions And Answers]
* [http://cseweb.ucsd.edu/classes/sp13/cse140-a/lectures/chap-rtl.pdf Máquinas de Estado de Alto Nível (tips and tricks)].
{{DEFAULTSORT:Vhdl}}
[[Category:Ada programming language family]]
[[Category:Hardware description languages]]


<__tonussi> automata, você me perguntou de refs do meu estudo em vhdl, basicamente isso é o que eu consigo fazer de mais alto nível http://cseweb.ucsd.edu/classes/sp13/cse140-a/lectures/chap-rtl.pdf livro para estudar que é ótimo Frank Vahid - Digital Systems (te da uma noção mt boa)
<__tonussi> automata, você me perguntou de refs do meu estudo em vhdl, basicamente isso é o que eu consigo fazer de mais alto nível http://cseweb.ucsd.edu/classes/sp13/cse140-a/lectures/chap-rtl.pdf livro para estudar que é ótimo Frank Vahid - Digital Systems (te da uma noção mt boa)


[[Category:Lab Macambira]]
[[Category:Lab Macambira]]

Edição das 09h48min de 19 de junho de 2013

VHDL (VHSIC Hardware Description Language) is a hardware description language used in electronic design automation to describe digital and mixed-signal systems such as field-programmable gate arrays and integrated circuits. VHDL can also be used as a general purpose parallel programming language.

História

Design

Vantagens

Desvantagens

<source lang="VHDL"> -- (this is a VHDL comment)

-- import std_logic from the IEEE library library IEEE; use IEEE.std_logic_1164.all;

-- this is the entity entity ANDGATE is

 port ( 
   I1 : in std_logic;
   I2 : in std_logic;
   O  : out std_logic);

end entity ANDGATE;

-- this is the architecture architecture RTL of ANDGATE is begin

 O <= I1 and I2;

end architecture RTL; </source>

(Notice that RTL stands for Register transfer level design.) While the example above may seem verbose to HDL beginners, many parts are either optional or need to be written only once. Generally simple functions like this are part of a larger behavioral module, instead of having a separate module for something so simple. In addition, use of elements such as the std_logic type might at first seem to be an overkill. One could easily use the built-in bit type and avoid the library import in the beginning. However, using this 9-valued logic (U,X,0,1,Z,W,H,L,-) instead of simple bits (0,1) offers a very powerful simulation and debugging tool to the designer which currently does not exist in any other HDL.

Synthesizable constructs and VHDL templates

MUX template

The multiplexer, or 'MUX' as it is usually called, is a simple construct very common in hardware design. The example below demonstrates a simple two to one MUX, with inputs A and B, selector S and output X. Note that there are many other ways to express the same MUX in VHDL.

<source lang="VHDL">X <= A when S = '1' else B;</source>

Latch template

A transparent latch is basically one bit of memory which is updated when an enable signal is raised. Again, there are many other ways this can be expressed in VHDL.

<source lang="VHDL"> -- latch template 1: Q <= D when Enable = '1' else Q;

-- latch template 2: process(D,Enable) begin

 if Enable = '1' then
   Q <= D;
 end if;

end process; </source>

References

<references />

Further reading

External links

Predefinição:Commons category Predefinição:Wikibooks


<__tonussi> automata, você me perguntou de refs do meu estudo em vhdl, basicamente isso é o que eu consigo fazer de mais alto nível http://cseweb.ucsd.edu/classes/sp13/cse140-a/lectures/chap-rtl.pdf livro para estudar que é ótimo Frank Vahid - Digital Systems (te da uma noção mt boa)