Direct current generation due to harmonic mixing: from bulk semiconductors to semiconductor superlattices