设计多线程和多核系统
如果您的微控制器应用程序需要处理数字音频,请考虑采用多线程方法。使用多线程设计方法可以使设计者以简单的方式重用其部分设计。
多核和多线程是设计实时系统的有效方法。使用这些技术,系统被设计成一个多任务的集合,这些任务在需要时独立运行并相互通信。将系统设计从大型块代码分解为更易于管理的任务,大大简化了系统设计并加快了产品开发速度。因此,整个系统的实时性更容易理解。设计者只需担心执行每个任务的保真度,并询问诸如“网络协议是否正确实现”之类的问题?
在本文中,我们将讨论如何使用多线程或多核设计方法来设计实时操作数据流的系统,如数字音频系统。我们用几个数字音频系统来说明设计方法,包括异步USB音频2,AVB以太网和MP3播放器数字码头。在讨论如何有效地使用多核和多线程来设计缓冲和时钟方案之前,我们简要地讨论了数字音频、多核和多线程的概念。
Digital audio
Digital audio has taken over from analog audio in many consumer markets for two reasons. First, most audio sources are digital. Whether delivered in lossy compressed form (MP3) or in uncompressed formats (CD), digital standards have taken over from the traditional analog standards such as cassettes and tapes. Second, digital audio is easier to deal with than analog audio. Data can be transferred without loss over existing standards, such as IP or USB, and the hardware design does not need any “magic” to keep the noise floor down. As far as the digital path is concerned, the noise floor is constant and immune from TDMA noise which mobile phones may cause.
A digital audio system operates on streams of samples. Each sample represents the amplitude of one or more audio channels at a point in time, with the time between samples being governed by the sample rate. CD standards have two channels (left and right) and use a sample rate of 44.1 kHz. Common audio standards use 2, 6 (5.1), and 8 (7.1) channels, and sample rates of 44.1 kHz, 48 kHz, or a multiple. We use 48 kHz as a running example, but this is by no means the only standard.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !