Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------ my_gates_package ------
- library ieee;
- use ieee.std_logic_1164.all;
- package my_gates_package is -- funktion og procedure erklæres som del af package
- function my_xor(a, b : std_logic) return std_logic;
- procedure and_or(signal a,b: in std_logic; signal and_out, or_out: out std_logic);
- end my_gates_package;
- package body my_gates_package is
- -- funktion hvor xor af a og b returneres
- function my_xor(a, b : std_logic) return std_logic is
- begin
- return a xor b;
- end my_xor;
- -- procedure hvor and or or af a og b returneres
- procedure and_or(signal a,b: in std_logic; signal and_out, or_out: out std_logic) is
- begin
- and_out <= a and b;
- or_out <= a or b;
- end and_or;
- end my_gates_package;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement