Custom Function for Portfolio Archive Template With Conditonal Tag

Use is_post_type_archive():

if ( is_post_type_archive( 'portfolio' ) )
{
    // echo something
}

You can also pass multiple post types here:

if ( is_post_type_archive( array ( 'portfolio', 'project' ) ) )
{
    // echo something
}