Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library IEEE;
- use IEEE.STD_LOGIC_1164.all;
- use IEEE.STD_LOGIC_UNSIGNED.all; -- dodatkowa biblioteka
- ------------------------------------------------------------
- entity cw09z1_df3 is
- port (x : in std_logic_vector (1 to 5);
- y : out std_logic);
- end cw09z1_df3;
- ------------------------------------------------------------
- -- architektura df3 - styl przepływowy (DataFlow)
- -- opis za pomocą tablicy (tabela prawdy funkcji f5)
- -- z wykorzystaniem stałej typu STD_LOGIC_VECTOR
- architecture df3 of cw09z1_df3 is
- constant f : std_logic_vector (0 to 31)
- := "10000100001000110010000001101100";
- -- AĄCBĘEĆDFGIHŁLJKŚTWUŻŹYZMNOŃSRÓP
- begin
- y <= f(CONV_INTEGER(x));
- -- CONV_INTEGER jest funkcją służącą do konwersji
- -- wektora na liczbę całkowitą (STD_LOGIC_VECTOR to INTEGER)
- -- wymagana jest deklaracja biblioteki IEEE.STD_LOGIC_UNSIGNED
- end df3;
- ----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement