TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Peek at GNU Radio’s Buffer Architecture

142 pointsby ptrover 8 years ago

3 comments

hoytechover 8 years ago
The double-mapped ring buffer trick is so clever I can&#x27;t help but wish I invented it. :)<p>Here&#x27;s the code for the GNU radio implementation described in the article, it&#x27;s a good reference for some various ways to set up the mappings:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;gnuradio&#x2F;gnuradio&#x2F;blob&#x2F;master&#x2F;gnuradio-runtime&#x2F;lib&#x2F;vmcircbuf_createfilemapping.cc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gnuradio&#x2F;gnuradio&#x2F;blob&#x2F;master&#x2F;gnuradio-ru...</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;gnuradio&#x2F;gnuradio&#x2F;blob&#x2F;master&#x2F;gnuradio-runtime&#x2F;lib&#x2F;vmcircbuf_mmap_shm_open.cc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gnuradio&#x2F;gnuradio&#x2F;blob&#x2F;master&#x2F;gnuradio-ru...</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;gnuradio&#x2F;gnuradio&#x2F;blob&#x2F;master&#x2F;gnuradio-runtime&#x2F;lib&#x2F;vmcircbuf_mmap_tmpfile.cc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gnuradio&#x2F;gnuradio&#x2F;blob&#x2F;master&#x2F;gnuradio-ru...</a><p>And here some other links to implementations I&#x27;ve collected:<p><a href="http:&#x2F;&#x2F;vrb.sourceforge.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;vrb.sourceforge.net&#x2F;</a><p><a href="https:&#x2F;&#x2F;fgiesen.wordpress.com&#x2F;2012&#x2F;07&#x2F;21&#x2F;the-magic-ring-buffer&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fgiesen.wordpress.com&#x2F;2012&#x2F;07&#x2F;21&#x2F;the-magic-ring-buff...</a> <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;rygorous&#x2F;3158316" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;rygorous&#x2F;3158316</a><p><a href="https:&#x2F;&#x2F;www.mikeash.com&#x2F;pyblog&#x2F;friday-qa-2012-02-03-ring-buffers-and-mirrored-memory-part-i.html" rel="nofollow">https:&#x2F;&#x2F;www.mikeash.com&#x2F;pyblog&#x2F;friday-qa-2012-02-03-ring-buf...</a> <a href="https:&#x2F;&#x2F;www.mikeash.com&#x2F;pyblog&#x2F;friday-qa-2012-02-17-ring-buffers-and-mirrored-memory-part-ii.html" rel="nofollow">https:&#x2F;&#x2F;www.mikeash.com&#x2F;pyblog&#x2F;friday-qa-2012-02-17-ring-buf...</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;mikeash&#x2F;MAMirroredQueue" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mikeash&#x2F;MAMirroredQueue</a><p><a href="http:&#x2F;&#x2F;atastypixel.com&#x2F;blog&#x2F;a-simple-fast-circular-buffer-implementation-for-audio-processing&#x2F;" rel="nofollow">http:&#x2F;&#x2F;atastypixel.com&#x2F;blog&#x2F;a-simple-fast-circular-buffer-im...</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;michaeltyson&#x2F;TPCircularBuffer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;michaeltyson&#x2F;TPCircularBuffer</a><p><a href="http:&#x2F;&#x2F;www.koanlogic.com&#x2F;libu&#x2F;api&#x2F;html&#x2F;group__rb.html" rel="nofollow">http:&#x2F;&#x2F;www.koanlogic.com&#x2F;libu&#x2F;api&#x2F;html&#x2F;group__rb.html</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;ulfalizer&#x2F;botniklas&#x2F;blob&#x2F;master&#x2F;src&#x2F;read_msg.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ulfalizer&#x2F;botniklas&#x2F;blob&#x2F;master&#x2F;src&#x2F;read_...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;willemt&#x2F;cbuffer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;willemt&#x2F;cbuffer</a>
quotemstrover 8 years ago
tl;dr: the old magic ring buffer trick
zumpover 8 years ago
SDR strikes me as good in theory, but breaks down for anything practical.<p>My core 2 duo was 100% cpu utilization simply from decoding 56kbps 2-BPSK, even with SIMD extension enabled (within GR).
评论 #13407855 未加载
评论 #13407819 未加载
评论 #13408519 未加载
评论 #13408967 未加载
评论 #13407824 未加载
评论 #13407878 未加载
评论 #13407761 未加载
评论 #13407692 未加载
评论 #13407848 未加载
评论 #13408061 未加载
评论 #13407783 未加载