Digital Logic and Functions in the Upgrade LLRF System