Fully digital-compatible built-in self-test solutions to linearity testing of embedded mixed-signal functions