  We study a 0-$\pi$ dc superconducting quantum interference device (SQUID)
with asymmetric inductances and critical currents of the two Josephson
junctions (JJs). By considering such a dc SQUID as a black box with two
terminals, we calculate its effective current-phase relation $I_s(\psi)$ and
the Josephson energy $U(\psi)$, where $\psi$ is the Josephson phase across the
terminals. We show that there is a domain of parameters where the black box has
the properties of a $\varphi$ JJ with degenerate ground state phases
$\psi=\pm\varphi$. The $\varphi$ domain is rather large, so one can easily
construct a $\varphi$ JJ experimentally. We derive the current phase relation
and show that it can be tuned \emph{in situ} by applying an external magnetic
flux resulting in a continuous transition between the systems with static
solutions $\psi=\pm\varphi$, $\psi=\varphi_0$ ($\varphi_0 \neq 0,\pi$) and even
$\psi=\varphi_0\pm\varphi$. The dependence of $\varphi_0$ on applied magnetic
flux is not $2\pi$ (one flux quantum) periodic.
