A Taylorsville man will serve 20 years in prison after pleading guilty to accidentally and fatally stabbing a man in Edinburgh.