Functions and procedures should be defined in packages, not in architectures.
architecture a of e is procedure my_procedure; function my_function return type1; ... end;
package p is procedure my_procedure; function my_function return type1; ... end;