aboutsummaryrefslogtreecommitdiff
path: root/VHDL.wiki
blob: dff44f41cb6de006133d41ea9629e3e8b53ac7f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
= VHDL =

VHDL = VHSIC HDL
VHSIC = Very High Speed Integrated Circuits
HDL = Hardware Description Language

Verilog mer hacker-vänligt
Vanligare i USA

VHDL vanligare i Europa

== "Kod" ==

Gränssnitt mot omvänden
{{{vhdl
entity namen1 is
  -- beskrivningav in och utgångar
end entity namn1;
}}}

Intern implementation.
{{{vhdl
architecture namn2 of namn1 is
  -- beskrivning av interna signaler
begin
  -- beskrvining av funktion
end architecture namn2;
}}}

== Exempelkrets ==

{{$
\begin{aligned}
\text{låt} x &= a \wedge b \\
           y &= a \vee b :
\end{aligned}
c = \neg (x \vee y)
}}$

{{{vhdl
entity knet is
    port (a, b : in std_logic;
          c: out std_logic);
end entity knet;
  
architecture fisttry of knet is
  signal x, y : std_logic;
begin
  c <= not (x or y);
  x <= a and b;
  y <= a or b;
end architecture fisttry;
}}}


Mycket hårt typat, men nästan inga datatyper. Så nästintill allting
måste deffinieras upp själv.