1 / 14

ASGARD installation and basic concepts

ASGARD installation and basic concepts. Oscar Tonelli – Aalborg University October 30th 2013. Web resources. http://asgard.lab.es.aau.dk/. The ASGARD website. The wiki. http://wiki.asgard.lab.es.aau.dk/projects/asgard/wiki. email. asgard-info@es.aau.dk. Software Defined Radio concepts.

erelah
Download Presentation

ASGARD installation and basic concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ASGARD installation and basic concepts Oscar Tonelli – Aalborg University October 30th 2013

  2. Web resources http://asgard.lab.es.aau.dk/ The ASGARD website The wiki http://wiki.asgard.lab.es.aau.dk/projects/asgard/wiki email asgard-info@es.aau.dk

  3. Software Defined Radio concepts Task Where it happens A UserSpace process running in the OS Execution of the system application Asgard Interfacing with the hardware Hardware Drivers The SDR motherboard Streaming of samples to/from the hardware Radio TX/RX Radio Front-end

  4. Data domains HIGH-LEVEL DATA OBJECTS COMPLEX SAMPLES RADIO SIGNAL BITS application Asgard The USRP board Ethernet/USB Interface

  5. ASGARD building elements Components Software container for the implementation of data processing tasks Software objects which manage the data transfer and other interactions between components Software abstractions for the threads of execution Comm. Objects Modules ASGARD application defines the architecture of the communication system and manages its execution

  6. Structure of the ASGARD libraries IT++ Google Test dependencies Third-party libraries UHD Poco Boost GNU Radio Intel TBB Others... Communication Objects ASGARD Core Library Modules Data Structures System Messages OFDM Modulator ASGARD Components Library UHD Communication Bit Generator Another Component... tx_from_file_app ASGARD Applications example_app my_radio_app tx_from_file_app

  7. Getting the ASGARD code • Check the software dependecies: http://wiki.asgard.lab.es.aau.dk/projects/asgard/wiki/Dependencies • Checkout a copy of the ASGARD EDU repository: In a linux terminal type: git clone http://asgard.lab.es.aau.dk:8080/git/asgard_edu.git • Compile the ASGARD library: • The same compilation procedure holds for other ASGARD folders, e.g. unstable • For compiling the applications (from the main ASGARD folder): Enter the ASGARD main folder... git checkout UniTN cd core mkdir build cd build cmake ../ make make test sudo make install cd applications mkdir build cd build cmake ../ make

  8. Where is my app? • After compilation, application executables are typically found in: • The settings file (settings.xml) related to the app, should also be in the same folder of the executable • The components tests executables are in: • To execute an app from its folder just type: • Add ”sudo” when you use an app with the USRP hardware asgard_edu/applications/bin/app_folder asgard_edu/core/build/tests/components/component_folder (sudo) ./my_app_name

  9. Application Example Timer Module Clock Periodically generates data Timer Event Event Set() Timer Wait() Event Controlled Component Get() Set() Frame Number Int Push() Data Process Module Int Data Buffer Pop() Terminal Print Component Prints the received data to screen

  10. Developing an Asgard Component - fundamental steps: my_component.h my_component.cpp my_component_test.cpp class MyComponent: public api::Component { public: MyComponent(); ~MyComponent(); void Do(); private: .... #include ”my_component.h” MyComponent:: MyComponent() {...} MyComponent::~MyComponent() {...} void MyComponent::Do() {...} #include ”asgard_components/basic/my_component.h” using namespace asgard::api; namespace asgard { TEST (MyComponent, Do) { ...} Component Header Component Source (*.cpp) Test Source MESSAGE(STATUS " Compiling the basic Components") ## Add includes and dependencies# # Build the library from source files# SET(sources my_component.cpp ) ... # Build executables, register as tests, and install #SET(test_sources my_component_test.cpp ) ADD_DEFINITIONS( ${TEST_COMPILER_FLAGS} ) #.... Edit the Component CMakeLists.txt Edit the Tests CMakeLists.txt Compile the Tests Compile the Component Library

  11. Compiling and testing a Component • Compile the Component: • Compile and execute tests: Enter the Components folder (either asgard/core or asgard/unstable): make sudomake install (you can call directly this in most cases): • Enter the tests folder (either asgard/core/tests or asgard/unstable/tests): • make test (this will compile and execute all the tests of the folder in a non-verbose mode) • To execute and debug more carefully a single test, use the debugger (gdb) and execute directly the test binary. In the case of a component located in the basic folder of the asgard/core, for example, the binary will be located in asgard/core/build/tests/components/basic. • gdb ./my_component_test(to run the debugger) • run (to run the test)

  12. Developing an Asgard Application step-by-step my_application_app.cpp Headers of Components and COs • Create the Application Source (*_app.cpp) • Create the Components and COs Objects • Connect all objects • Create Modules and load Components • Manage the execution of the Modules • Prepare and create the application setting file • Edit the Applications CMakeLists.txt (remember the to copy the setting file) • Compile the Application • Run the application in the ”bin” folder #include ”my_component.h” #include ”another_component.h” #include ” asgard_api/the_communication_objects_i_need.h” namespace asgard { class MyAsgardNode : public AsgardSystem { ... #include ”my_component.h” #include ”another_component.h” #include ” asgard_api/the_communication_objects_i_need.h” namespace asgard { class MyAsgardApplication: public Poco::Util::Application { ... my_setting_file.xml CMakeLists.txt <!– This is the Setting file, settings.xml --> <settings> <!– List all the Components utilized in the application--> <ComponentA> <parameter_1>10</parameter_1> <parameter_2>a text string</parameter_2> <ComponentA> <ComponentB> <another_parameter>10</another_parameter> </ComponentB> </settings> # Build executables, register as tests, and install #SET(test_sources my_application_app.cpp ) ADD_DEFINITIONS( ${TEST_COMPILER_FLAGS} ) #.... Compile the Application

  13. Developing an Asgard Application (2) • In relation to point 1 from the previous slide: • The operations from a) to d) can be either implemented directly in the main() method of the application (e.g. my_application_app.cpp) or in a separate header (e.g. my_asgard_node.h) file creating an AsgardSystem object. • The second method is preferrable if a single application is meant to manage multiple node architectures or, more in general, when a compact object is preferrable to manage a complex system implementation. • The configuration settings file: • Should contain all the parameters required by each component, in a proper XML format. • It’s loaded in the application and typically given as an input to the system objects and to the Components constructors

  14. Additional Info • Read the PDF file available at the bottom of the page: http://wiki.asgard.lab.es.aau.dk/projects/asgard/wiki/Further_Documentation • Check the Google Test Documentation: https://code.google.com/p/googletest/wiki/V1_5_Documentation • Check the POCO Library Documentation: http://pocoproject.org/ • Check the IT++ library: http://itpp.sourceforge.net/devel/index.html

More Related