





Code: Alles auswählen
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Code: Alles auswählen
apt-get install locales-all
apt-get install libncurses5
Code: Alles auswählen
apt-get install locales-all
Code: Alles auswählen
apt-get install libncurses5
Code: Alles auswählen
david@git:~/Xilinix-bin/Vivado/2023.1/bin$ ./vivado
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory
Code: Alles auswählen
Y <= S;
Y <= A or B;
-- Falsch A => Y; -- Falsch
Code: Alles auswählen
signale <signalname>: typ;
signal x0, x1, x2, x3: bit;
signal EN: std_logic;
signal on_of: boolean;
Code: Alles auswählen
0: starke 0
1: starke 1
Z: hochohmig
-: don't care
U: unbekannt
X: konflikt
L: Schwache 0
H: Schwache 1
W: Schwaches X
Code: Alles auswählen
signal <signalname>: typ (<lower> to <upper>);
signal <signalname>: typ (<upper> downto <lower>);
signal x: bit_vector(0 to 7);
signal a: std_logic_vector(2 to 4);
signal r: bit_vector(3 downto 0);
Code: Alles auswählen
c <= a or b;
c <= ('1', '0', '0', '0');
c <= "1000";
Code: Alles auswählen
library ieee;
use ieee.std_logic_1164.all
use ieee.std_logic_unsigned.all
Code: Alles auswählen
entity <blockname> is
port
(
<signalnamen>: <richtung> <typ>;
<signalnamen>: <richtung> <typ>;
<signalnamen>: <richtung> <typ>
);
end;
Code: Alles auswählen
entity multiplexer is
port
(
a0, a1, a2, a3: in bit;
b0, b1, b2, b3: in bit;
s: in bit;
y0, y1, y2, y3: out bit;
);
end;
Code: Alles auswählen
entity counter is
port
(
clk: in bit;
rst: in bit;
q: out bit_vector (3 downto 0)
);
end;
Code: Alles auswählen
architecture <beschreibungsname> of <blockname> is
-- locale signale
begin
-- functionsbeschreibung
end;
Code: Alles auswählen
architecture mymux of multiplexer is
signal a, b, y: bit_vector (0 to 3);
begin
a <= (a0, a1, a2, a3);
b <= (b0, b1, b2, b3);
y <= a when (s='0') else b;
y0 <= y(0);
y1 <= y(1);
y2 <= y(2);
y3 <= y(3);
end mymux
Code: Alles auswählen
architecture verhalten of multiplexer is
signal a, b, y: bit_vector (0 to 3);
begin
a <= (a0, a1, a2, a3);
b <= (b0, b1, b2, b3);
y <= a when (s='0') else b;
y0 <= y(0);
y1 <= y(1);
y2 <= y(2);
y3 <= y(3);
end verhalten
Code: Alles auswählen
architecture mymux of multiplexer is
signal a, b, y: bit_vector (0 to 3);
begin
a <= (a0, a1, a2, a3);
b <= (b0, b1, b2, b3);
y <= a when (s='0') else b;
y0 <= y(0);
y1 <= y(1);
y2 <= y(2);
y3 <= y(3);
end mymux
Code: Alles auswählen
process <empfindlichkeitsliste>
-- lokale signale
begin
-- sequentielle umgebung
end process;
Code: Alles auswählen
architecture verhalten of counter is
signal qint: std_logic_vector ( 3 downto 0);
begin
process (reset, clk)
begin
if (reset='0') then
quint <= x"0";
elseif (clk='1') and clk'event
then
qint <= qint+1;
end if;
end process;
q<=qint;
end;
Code: Alles auswählen
process ..
variable V std_logic_vector (3 downto 0);
begin
V := ...
end;
Code: Alles auswählen
with <auswahlsignal> select
ergebnis <= <Verknüpfung_1> when <auswahlwert_1>,
<Verknüpfung_2> when <auswahlwert_2>,
<Verknüpfung_n> when others;
Code: Alles auswählen
<ergebnis> <= <Verknüpfung_1> when <Bedingung_1>,
else <Verknüpfung_2> when <Bedingung_2>,
else <Vernüpfung_n>;
Code: Alles auswählen
if <Bedingung_1> then <Sequentielle Anweisungen 1>;
elseif <Bedingung_2> then <Sequentielle Anweisungen 2>;
elseif <Bedingung_3> then <Sequentielle Anweisungen 3>;
else <Sequentielle Anweisungen n>;
end if;
Code: Alles auswählen
case <testsignal> is
when <Wert_1> => <Sequentielle Anweisungen 1>;
when <Wert_2> => <Sequentielle Anweisungen 2>;
when <Wert_3> => <Sequentielle Anweisungen 3>;
when others => <Sequentielle Anweisungen n>;
end case;
Code: Alles auswählen
-- ich habe jetzt erst mal das:
use std.textio.all;
entity myhello is
port
(
a0, a1, a2, a3: inout bit;
b0, b1, b2, b3: in bit;
s: in bit;
y0, y1, y2, y3: out bit
);
end;
architecture behaviour of myhello is
begin
process
variable l : line;
begin
if (a0='0') then
a0 <= '1';
write (l, String'("Hello world!"));
writeline (output, l);
else
a0 <= '0';
write (l, String'("das ist ein Standardspruch"));
writeline (output, l);
end if;
wait;
end process;
end behaviour;
Code: Alles auswählen
-- 0001 VHDL - Multiplexer, Adder, Fulladder, Paralleladder, Coder, Decoder
-- without architecture and entity - this will be in 0002 - VHDL
-- Multiplexer
signal a: bit_vector (3 downto 0);
signal b: bit_vector (3 downto 0);
signal c: bit_vector (3 downto 0);
process (cout)
begin
a <= ain;
b <= bin;
if (clk='0') then
c <= a;
elseif (clk='1') then
c <= b;
end if;
cout <= c;
end process;
Code: Alles auswählen
-- 0001 VHDL - Multiplexer, Halfadder, Fulladder, Paralleladder, Coder, Decoder
-- without architecture and entity - this will be in 0002 - VHDL
-- Multiplexer
signal a: bit_vector (3 downto 0);
signal b: bit_vector (3 downto 0);
signal c: bit_vector (3 downto 0);
process (cout)
begin
a <= ain;
b <= bin;
if (clk='0') then
c <= a;
elseif (clk='1') then
c <= b;
end if;
cout <= c;
end process;
-- Adder
signal a: bit;
signal b: bit;
signal c: bit;
signal s: bit;
process (cout, sout)
begin
a <= ain;
b <= bin;
c <= a xor b;
s <= a and b;
cout <= c;
sout <= s;
end process;
Code: Alles auswählen
-- 0001 VHDL - Multiplexer, Halfadder, Fulladder, Paralleladder, Coder, Decoder
-- without architecture and entity - this will be in 0002 - VHDL
-- Multiplexer
signal a: bit_vector (3 downto 0);
signal b: bit_vector (3 downto 0);
signal c: bit_vector (3 downto 0);
process (cout)
begin
a <= ain;
b <= bin;
if (clk='0') then
c <= a;
elseif (clk='1') then
c <= b;
end if;
cout <= c;
end process;
-- Adder
signal a: bit;
signal b: bit;
signal c: bit;
signal s: bit;
process (cout, sout)
begin
a <= ain;
b <= bin;
c <= a xor b;
s <= a and b;
cout <= c;
sout <= s;
end process;
-- Fulladder
signal a: bit;
signal b: bit;
signal c: bit;
signal s0: bit;
signal s1: bit;
process (cout, sout)
begin
a <= ain;
b <= bin;
s0 <= sin;
c <= a xor b xor s0;
s1 <= (a and b) or (a or b) and c;
cout <= c;
sout <= s1;
end process;