a flap or bag concealing an opening in the front of men's breeches, esp in the 15th and 16th cent
Why, what a ruthless thing is this … for the rebellion of a codpiece to take away the life of a man! — Shakespeare
[Middle English codpese, from cod bag, scrotum (from Old English codd) + pese piece1]