Participates in the primary piRNA biogenesis pathway and is required during spermatogenesis to repress transposable elements and prevent their mobilization, which is essential for the germline integrity. The piRNA metabolic process mediates the repression of transposable elements during meiosis by forming complexes composed of piRNAs and Piwi proteins and govern the methylation and subsequent repression of transposons.