Using the Linux IO framework for SDR

Video in TIB AV-Portal: Using the Linux IO framework for SDR

Formal Metadata

Using the Linux IO framework for SDR
A hardware abstraction layer
Alternative Title
Software Defined Radio - Sdr
Title of Series
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Release Date
Production Year

Content Metadata

Subject Area
Context awareness Computer hardware Analogy Software Point cloud Software-defined radio Software framework Software-defined radio Limit (category theory)
Point (geometry) Purchasing Presentation of a group Context awareness Link (knot theory) Software developer Code Ferry Corsten Device driver Set (mathematics) Insertion loss Streaming media Mereology Food energy Different (Kate Ryan album) Kernel (computing) String (computer science) Computer hardware Software framework Interrupt <Informatik> output Monster group User interface Sine Interface (computing) Projective plane Software-defined radio Device driver Cartesian coordinate system System call Frame problem Digital-to-analog converter Word Kernel (computing) Vector space Software Function (mathematics) Analog-to-digital converter Computer hardware Order (biology) Buffer solution Universe (mathematics) Video game Moment <Mathematik> output Energy level Sinc function Spacetime
Group action Context awareness Length Correspondence (mathematics) Direction (geometry) View (database) Multiplication sign Execution unit Range (statistics) Set (mathematics) Price index Water vapor Function (mathematics) Open set Food energy Hysteresekurve Medical imaging Mathematics Bit rate Very-high-bit-rate digital subscriber line Different (Kate Ryan album) Semiconductor memory Memory management File system Software framework Information Imperative programming Resource allocation Algorithm Arm Mapping Block (periodic table) File format Closed set Sampling (statistics) Physicalism Attribute grammar Virtualization Bit Motion capture Connected space Type theory Data stream Process (computing) Telecommunication Chain Buffer solution Configuration space output Normal (geometry) Right angle Data structure Spacetime Thomas Bayes Point (geometry) Digital filter Functional (mathematics) Game controller Implementation Computer file Observational study Connectivity (graph theory) Similarity (geometry) Device driver Control flow Directory service Theory Metadata Attribute grammar Aeroelasticity Peripheral Read-only memory Well-formed formula String (computer science) Software Computer hardware Gastropod shell Software testing Selectivity (electronic) Data structure Implementation Computer-assisted translation Addition Standard deviation Multiplication Scaling (geometry) Weight Mathematical analysis Software-defined radio Cartesian coordinate system Frame problem Subject indexing Kernel (computing) Computer hardware Network topology Family
Context awareness Game controller Greatest element Group action Duplex (telecommunications) Direction (geometry) Motion capture Water vapor Bit rate Function (mathematics) Streaming media Theory Attribute grammar Element (mathematics) Optical disc drive Frequency Different (Kate Ryan album) Software Diagram Physical system Area Default (computer science) Dependent and independent variables Shift operator Information Forcing (mathematics) Data storage device Shared memory Software-defined radio Core dump Bit Instance (computer science) Cartesian coordinate system Flow separation Subject indexing Sparse matrix Process (computing) Sample (statistics) Personal digital assistant Computer hardware Buffer solution Order (biology) Musical ensemble
Demon Multiplication sign Mereology Food energy Subset Very-high-bit-rate digital subscriber line Different (Kate Ryan album) Kernel (computing) Software framework Diagram Position operator Physical system Programming language Mapping Point (geometry) Physicalism Computer simulation Bit Front and back ends Connected space Process (computing) Buffer solution Interface (computing) Software testing Right angle Energy level Whiteboard Physical system Spacetime Laptop Server (computing) Service (economics) Computer file Real number Virtual machine Student's t-test Power (physics) Computer hardware Operating system Energy level Data structure Communications protocol Computing platform Plug-in (computing) Window Information Server (computing) Weight Interface (computing) Ordinary differential equation Planning Software-defined radio Computer network Client (computing) Cartesian coordinate system Supersymmetry Kernel (computing) Software Computer hardware Data center Video game Window Abstraction Library (computing)
Laptop Source code Inheritance (object-oriented programming) Block (periodic table) Demo (music) Source code Software-defined radio Parameter (computer programming) Streaming media Group action Perspective (visual) Transmitter Formal language Computer hardware Normal (geometry) Implementation Plug-in (computing) Directed graph Social class
Logical constant Email Loop (music) Computer hardware Googol Source code Software-defined radio Family Library (computing)
thank you very much OK at the thought and so my name is not a single 1 my name is lost the the clouds I work for analog devices and this talk will be about the industrial I over the Linux industrial 0 framework called I O and dump how you can use that to elaborate sits in the context of SDR and dumb limit could be start with what is
actually I 0 so it's a framework in the Linux kernel it was the handles pretty much all in non-human interface input and output devices so the name says industrial 0 but it's really because we have the in the Linux kernel we have been told framework which handles human interface input so we had to come up with a different names for this framework so called industrial 0 but it really handles all kinds of sensors on now in the life and centimeters from recently we merge some sensors which I know call like lifestyle sensors which like you have mobile phones which count many steps to take all many calories you burn it's very diverse set of sensors that are supported by this framework on has been in the absence of kernel since word include 682 since 2009 and was originally developed by a guy called Jonassen Cameron he developed a sore spot as they are at the university as part of a research project so you have lots of essentialism and teaching in a common framework to represent these sensors we came up with this framework at some point was virtually absent Connell initially staging area of the call so that's where all the kind of work-in-progress stuff goes but we moved out of thinking and string of 5 2 years ago almost 3 years ago now and as of today there are drivers for about order 200 different drivers but each driver typically supports more than 1 device so we have like an of 506 hundred devices supported and so in the next question is of course how what s but doesn't that do with the is the ah or why can we or why should we use this where's the R & what the frame of defines is a common lower-level API which obstructs the way the the hotter the exit actual purchase access to the hardware so rude get a common API or ABI that you can develop the applications against and dicing we've seen this some of the torques before the 1st thing you actually do when you start working on the STL project you write some code to actually get data out of your device and In my opinion it shouldn't be the way it should be because side of a common framework which provides the capabilities of getting the data out of the device and you can actually focus on writing your solution on when you actually application without having to care about all the low-level register access because loss of the modern devices which are a useful so for defined radio can be quite complex like over 1000 registers and you need to know how to program all these different registers and and this is where the framework comes in that we do have a driver for certain part and striver exposes a common API this API is shared between different kinds of devices so you can write of application once and hopefully will will work with like this chip this chip just chips are without you having to actually modify your application at all and another knows vantage of I always there is actually running in the Linux kernel itself so we get all these kind of things like giraffes against memory-mapped interface registers which are sometimes not so easy to handle if you just have a like user-space applications and so on the other thing that I O provides as the fast and efficient data transport both for transmitting data from an application to the hardware as well as transmitted over capturing data from the hard to the application and something working on that we ought to know ready in a couple of monsters using the region splice and splices scores of the Linux kernel and can directly be able to stream data from the ABC Orson Welles to the network device without having to copy person to buffer use of space applications unmanned vector copied into a buffer and the network devices so you basically have 0 copy which there's like fast and efficient ways to store your data or send it out over the network without having lots of CPU where and so what I'm
trying to do in this talk is to give an overview of the overall framework in the context of software defined radio it's not going to be a complete overview of the I framework there are other talks that go of the more into detail of link them in the end of the flights of anybody's interested and you can look up these the presentations
and 1 you know what you f and I 0 it is the starting point kind of this device that's the the main entry points so if you have a physical device typically you get a I O devices the corresponding structure of the structure which you can reference and work was and you know always have to exactly a 1 a one-to-one mapping like if you 1 physical Harvard your eyes but this implements to logical functions connect you want to be registered to I O devices 0 1 feature function on and it's but the viral only devices are represented in sense of us there does everybody know what Sisyphus this who doesn't know what his business OK have a few people on says is that there's this you can actually show you of flight will show you later but it's basically on the virtual file system in the provided by the Linux kernel which say exposed to use of base which you can access on was normal file open close this because you can read from it and this is what is by the o framework for configuration of devices so the next thing we have is we have contributes 1 device can have many attributes as many actresses wants and yes reviews are responsible for 4 2 thanks mainly 1 describing the capabilities of the device and the others along to configure the device on configuring is pretty easy a file you can open the file you can write a new configuration to it like Alexei all we have sample rates you can she wanted changes and break you open up the file right imperator the file and so on the capabilities come basically and you 2 flavors if you know that jurors say final allows you to changes and parades you know that this device while the capability to some changes and break and there are also some files for example if a year from a discrete set of separated only supported and you will have our final college sample rates and SCO available which will list the discrete sets of some parades available so your application knows which emperors available or which capabilities are as on the next thing we have this and again the channel the Committee what maternal study mice and the can be about views per channel and similar as the device represents a physical hardware the channel typically represent physical channel like on ADC u of a input what shell on a duck URI output water channel on X formula you of the acceleration channels input acceleration channels and so on so the channel has the direction i the input output type which can be many different things that can be watches can be acceleration can be energy can be assessed earlier steps like to walk 1 In addition as an index if you have multiple channels of the same type will want to have an an extra 1 chain their attention to want and what of possible is to assign a modifier which you use this channels are here like multiple channels but which are kind of corresponding for example the next or myriad typically have 3 excess and the way you would represent us this notes we different channels but I'm not using different index indices you would say is still to non-zero body would say this is the action a wide shallow and the channel and for example himself I define radio context that would be your 1 data stream 1 data channel but as I component a Q component and that would be the modifier again I mentioned this and there couple of standardized attributes for example gain and offset so what the type the tribe also specifies is the units in which the data that's coming through data channel by go from you channel types we typically try to use the as I units for example for some legacies stuff like water tree use now Microworlds and when you don't want to do a newcomer drivers you want don't want to convert each and every sample especially if you are running at a high sample rates so on the wider scale and also the view which you can use to converge from the role from or simple you have to something known and unknown unit in Monday also a lots of other different so basically everything yeah that can be configurable
image telecommun attributes like the cat invasion data offered defending or psoriasis and so on and so on and so on the and the next thing we have is a buffer and again the buffer can of attributes but the device a connection be only 1 buffer at most either 0 or 1 buffers and the buffers also reference to channels defined earlier I and when the buffer allows you to do is gives you access to the data is represented as a death that is a character device normal character devices are exposed by Linux family can we derive from it using Ammamaria right functions and if for but 1st if you are running a device and buffet note the channel were described what kind of data while the data format that the channel is in like 16 bit unsigned in little-endian big-endian see application actually knows what's available data can in defeated accordingly and you don't need to hard-code isn't the application arms again the buffer this configuration using this offense files typically you will have like the length of the bar for the size of the buffer and well above us and they will not but does this theory it's possible to have all kinds of different attributes for all buffers I'm no framework supports different buffer implementations say the this is of course you a device-specific buffer on but we really need this and there is a 1 software-based buffer which is the FIFO and this is mainly used for slower something applications that sensors which sample like in I no 100 hertz or something out in the kilohertz range you get interrupt the samples ready I've been read the sample from offer and rather than the you buffer and then user space application which eventually wakes up and can read from the buffer but of course is not going to work in the str context where we have how mega samples per 2nd you can't have 1 interrupt per fewer running small multiple megacycle samples per 2nd so for this we have DMA buffers and the weight you may buffers work this you essentially have and yeah that while you the DMA controller which is used to copy data from your converted into memory region and so you can use em map to map this no region in the application which means you don't have to do a copy so it's 0 copy again and um Bolus allows us high speed and lower at transport and the way it works is that do we allocate small chunks of data so called Brock's and dump the Broca's basically allocated by the application so precise amount of a 1 and then you pass the ownership of the Baroque to read to the incoming killed Anderson goes on to a DMA controller the DMA controller reads the data from a pipeline from the process the pipeline from you receive or transmit a pipeline and once that's done was abrupt once and Broca's fully for that puts into outgoing chew and user space can read from it and so you really only move around the meta information about where the data is and what length the data has but you don't actually copy the data itself in well which allows for very efficient access and done so use bayes application can sleep on this 1 or 2 this 1 is blocking other things you can use enormous scores like Paul or select and put your application to sleep and once said he may controllers have done processing at the block and the application will wake up and and can run analysis on was a on and once it's done was owning the algorithm that would give you back to the DMA controller and typically we you will have a couple of blocks likes 304 to Q this pipeline fully saturated all the time and um 1 interesting bit tests you can dynamically allocate and free these blocks which means for example if you have an algorithm which weeks for 4 beacon frame awake of frame or whatever you can allocate a large buffalo and send it to the DMA controller application only wakes up paying 8 and then once you find those wake-up frame you want to have smaller blocks to have a lower latency for a while low latency processing so you will I look at smaller blocks and policy smaller blocks into the DMA controller and you for have a low-latency data from
I am said to put this into context I'm going to use the example of the afferent comes to you be that which is a port we design which is the 361 which is think is also on the edges of the 2 to enter into an attempt odds so basically it entity integrated chip force of a defined radio for for the finally applications this this 1 over here it's durable from regular arts and so separators tunable from heroes of 256 Arabs and the band and the band was itself as so that the base frequencies tunable from 70 mega is up to 16 hours full-duplex my 2 are x 2 to x and the way the so this is just below this is just a
sport and this chip on the sport and you typically OK up to FPGA using different connector and this is kind of the system overview diagram on this is the trip itself has to decks 280 seas and so on and so on and we stream the data over into into the FPGA and we have a small talk processing pipeline by default which just does this summer correction calibration data and then uh sensor 2 DMA controller 1 for transmit and 114 receive that's what we see seen earlier and the way this is represented In this is the 1st is on you 1 director we which is called SIS sparse I O devices in which you have all the different devices and as you can see in this case we have 5 devices 2 of them are just start Norma sensors which to temperature and so this is me x anything in designing the PGA which useful what action temperature monitoring others assert temperature and what monitoring chip that we have won the that at comes to water but this is a device which corresponds to the 89 361 and this is the demise of response to the receive he may block and this is the 1 that corresponds to transmit American and so let's quit you take a look at how this looks like for the devices the 89 361 device and the this is what I was talking about earlier you of channels important on the the tenets of all kinds of different attributes and what he can see if c is is some if a certain kind of edgy buddhist share shared between all all instances of the channels he will don't have as the next and if a channel-specific value have been next like 0 1 2 and so on so these can be changed Burchell these can only be changed her direction so using the same or spend with 4 channels but you cannot change the gain individually on the channel so output is similar so this is these are not all the attributes just know it because there are way too many and done there some device-specific attributes like the fear filter can know and we also over CompTIA center In 1st this is the capture devices and everthing early and all pipeline is reasonable and the example case there's only a couple of attributes which can be used for calibration or they have missing calibration of the channel and what we have is a buffer subdirectory which corresponds to the buffer and this again elements of the theory and the buffer subdirectory basically just as they enable underlying underlying specifies the size of the buffer and enable specifies that the name of and for the scan element you will have for each channel 3 attributes 1 was called enable which specifies it's the channel should be currently enable not so you can disable certain channels if you don't want to capture that and there is an in that and this in lecture this unique to the channel and it tells you in which order the channels are stored in the half a buffer so famous 1 as index 0 this 1 as the next 1 we know the force on a boat this 1 will become will be in the buffer before this 1 not when you this 1 is the label in this area this 1 is disabled on this 1 is enabled there will only be while the whom you want and the end of the tagger who viewed which contains a set earlier I information about the layout the channel and the buffer like the storage size how many bits that will take out how many significant bits and has if it's shifted like the shift 5 there are what about their non-significant bits at the bottom I was a little with Guinean army and this kind of thing so you can use this to during construct the buffer layout and don't have to know about the specific going to send their
and this was the common the kernel framework and now we're going to talk about the planning layer that sits above and the current which runs in user space and that use
their lives so called 0 which on we considered kind of think of like a lot by given the also for the all the framework which provides a bit higher interface so you and you write application you don't want to necessarily deal with all users of this files and there are more than the bio does is it reads this is the 1st information information about the device and the child from to suppress and well those students and data structures into the data structures that you application can use and work with so you don't have to do any raw access so this is the 1st I'm and 1 other saying is hand and transparently and of the difference between so-called low-speed and high-speed devices and the difference as I explained earlier that the low-speed devices and use this buffer a New Sweden right to get data from a to the buffer and was a high-speed interface you would normally use and and on the bottle will automatically use em map if it's available and otherwise fall like to be at low speeds interface on another saying that I own viral provides is that has internally an abstraction layer itself which allows it to have multiple back ends and 1 back and it's a local back and which would directly from this is that 1st file part 2 different back and this and if OPEC and so we have a demon which you can run on the board the and on your laptop on your life I interesting processing power computing platform you can on your application specify OK my my heart neurons in the sport which is like the rest and implication will behave the same but running directly in half all on a remote platform on a desktop PC on the left of the seal on on server the data center and there's also a debug plugin shh allows you to simulate real long winter things without actually having access to the hardware I'm we do of in Serbia findings for the from less programming languages like not and she chopper and to all SUSY + works also because library service written the and um the that the was the local back and only works on Linux thought for example Net repented works on Windows and Linux and also on other POS aches compliant operating system so fundamental 2nd and this will hopefully written posits compliance so it should work on the new these all level was gold necklace and is that it will never back in the and we have I O D which is a demon which runs on the board we have the physical hardware and server for the network back and say connects connects to the Iady of whether never vacant and um 1 singular idea also allows is of multiplexing different decay at applications 2 applications accessing the same hardware ODE will take care of the are sure that this superset of a neighbor channels from all applications has enabled and hardware so you can actually get all the hardware that all the channels at all data that you want without having to make the it was what was that the the applications conflicting with each other so if you run 2 applications both on the local back and they will 1 with an intent turn on the next which themselves and strange things will happen and you the o the donor the problem and the cost of the there's a and the advantage that we it you don't need level system privileges to access to device more and this is basically the diagram of homework say the the I was in the column and uh then the vital was local back and on the network like Anthony I would the users and the BIO itself whose in local back and to access the hardware and then on a remote machine you can also use a live wire but the National and talked energy Servedio so talks the look back in which talk laughter and there's a lot say this application running here this application running a connection with the same application and using you need to specify when you run the application OK are well he's the local back and all the work that can and I'm kind of running out of time so I'm going to do this
and we also the way your plugin which is sort of interesting from a sofa define radio of perspective now we have to facing blocks classes 1 as I was saying the other 1 is the I source which each subclass the basic source basics and say they allow you to stream data from my only voice into the radio or transmit data to I O device from the and and it's also possible to supplement the devices on and the examples of this special specific specifically for the sport which show allow to expose some extra parameters and should be like in the work on the fingers of 1 on I don't think what I
was going to do is that we have however such as angry and then we have the in 1961 we observe FPGA on his airport connected to the to my laptop ladies and at a norm I leftovers running radio and it's and sequencing no you can't think languages
yeah quit the loop we have a really simple pipeline who implemented here which is the constant source and sense of into a family receiver and on using and influence and learning Jose but in this nation like the library was I was 1 of 103 that certain 1 what we while doing this if you leave the room with we and as such with radio and that's it but