MAC layer control and logic outlined and codegenerated