Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library ieee;
- use ieee.std_logic_1164.all;
- use ieee.numeric_std.all;
- package my_functions is
- function my_xor(s1: std_logic; s2: std_logic) return std_logic;
- procedure my_and_or(signal s1:in std_logic;signal s2:in std_logic;signal and_out, or_out: out std_logic);
- end my_functions;
- package body my_functions is
- function my_xor(s1: std_logic;s2: std_logic) return std_logic is
- begin
- return (s1 xor s2);
- end my_xor;
- procedure my_and_or(signal s1:in std_logic;signal s2:in std_logic;signal and_out, or_out: out std_logic) is
- begin
- or_out<=(s1 or s2);
- and_out<=(s1 and s2);
- end my_and_or;
- end my_functions;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement