Architectures and Cross-Layer Design for Cognitive Networks