원문: http://warpproject.org/trac/wiki/WARPLab/Examples


이제부터의 포스팅은 아래의 WARPLab 7에서 제공하는 Example 을 직접 실행보고 결과 및 코드를 간단히 분석해 보도록 하겠습니다.


제 경우에는, MIMO OFDM 의 코드의 사용이 필요해서 주로 앞으로의 포스팅은 MIMO쪽을 다루게 될 것 같습니다.


하이퍼링크가 걸려있는 "WARPLab 7 Example: MIMO OFDM" 를 클릭하시면 File: wl_example_mimo_ofdm_txrx.m 에 대한 


간단한 설명과 결과 그래프를 보실수 있습니다. 6번 포스팅부터는 MIMO OFDM 예제를 사용하기 위해 필요한 지식들과 관련된 파일/함수들에 대해서 다루겠습니다.



Examples

This page briefly describes the examples in the M_Code_Examples directory that part of every WARPLab Reference Design Release.

SISO Transmission and Reception Example

File: wl_example_basic_txrx.m

Requirements: 2 WARP v3 kits or 2 WARP v2 kits, 1 antenna each.

This is the introductory example to WARPLab 7. This example demonstrates basic transmission and reception of waveforms between two WARP nodes. One node will transmit a simple sinusoid and the other node will receive the sinusoid.

SISO OFDM Comm Example

Please see SISO OFDM Example for details and code.

MIMO OFDM Comm Example

Please see MIMO OFDM Example for details and code.

Synchronized Nodes Example

Please see Synchronized Nodes Example for details and code.

Multi-Node Array Example

Please see 8x2 Multi-node Array for details and code.

Spectrogram Example

Please see Spectrogram Example for details and code.

User Extension Example

Please see EEPROM User Extension for details and code.




기억을 되살리고자, 지난 5. WARPLab 7 포스팅을 보시면 


WARPLab_Reference_Design_7.7.1.zip 파일을 다운로드하여 설치하였습니다.


파일의 구성은 아래와 같습니다.



이러한 구성은 아래의 


WARP 프로젝트 도움말의 구성과 유사한데.. 

이는 개발자가  Examples과 Reference 에 대해서 자세히 설명하겠다는 의도가 보입니다.




위의 그림과 같이 도움말들은 크게 Getting Started, WARPLab 7 Framework, WARPLab 7 Reference Design 3개의 분류로 나누어 져 있음을 알수있습니다. 실제로 M_Code_Reference 폴더의 내용들은 WARPLab 7 Framework와 WARPLab 7 Reference Design 의 내용을 기반으로 설명이 가능합니다. 


따라서, WARPLab7 을 실행하고 해당 코드를 해석하기 위해서 먼저, 위의 도움말의 위치와 내가 보고자 하는 코드파일이름들과 매칭하는 것이 중요합니다.



예를들어, http://warpproject.org/trac/wiki/WARPLab/Reference/Utility 에는 

아래와 같이 폴더 WARPLab_Reference_Design_7.7.1\M_Code_Reference\util 에 있는 코드들에 대한 간략한 설명들이 있습니다.




정리하자면, "WARPLab 7 Example: MIMO OFDM" 예제의 이해와 해석을 위해서는 WARPLab 7 Reference Design 에 대한 기반지식을 습득해야만 진행이 가능합니다. 또한, 실제 MIMO OFDM 통신에 대한 지식도 필요합니다. 












'N.&C. > WARP v3' 카테고리의 다른 글

3-3. SD Card 로 WARP Reference 시작하기  (2) 2017.08.02
5-2-2. WARPLab Quick Start 정리버전  (0) 2016.05.19
5-2. WARPLab Quick Start  (0) 2016.05.04
5-1. WARPLab Reference Design: Downloads  (0) 2016.05.03
5. WARPLab 7  (0) 2016.05.03

원문: http://warpproject.org/trac/wiki/WARPLab


Note:

XPS공부중에 WARP를 제어하기 위해서는 자일링스의 ISE를 사용하거나 Matlab으로 제어해야 함을 알게되었습니다. 따라서 유료 소프트웨어를 구매하기전 매트랩으로 어느정도까지 제어가 가능한지 알아보기 위하여 먼저 subsection 5 부터 포스팅 하기로 결정하였습니다.




WARPLab 7


WARPLab is a framework for rapid physical layer prototyping that allows for coordination of arbitrary combinations of single and multi-antenna transmit and receive nodes. The extensible framework gives users the flexibility to develop and deploy large arrays of nodes to meet any application or research need.




WARPLab 은 위의 그림과 같이 싱글 또는 여러개의 Warp 노드들을 이더넷 스위치와 연결된 PC Matlab을 이용하여 제어가 가능합니다. 그러긴 위해서는 WARPLab reference design 을 먼저 기본적인 프레임워크로 사용하기 위해서 WARP에 설치해야합니다. (설치는 자일링스 ISE+SDK를 사용)  이 reference design은  사용자 정의로 변경도 가능한 유연성을 가지기 때문에 연구를 위한 개발자들은 반드시 숙지해야 할 것입니다. reference design을 사용하여 WARP 노드를 제어 및 신호 처리 하기 위해서는 Matlab을 사용하며 이를 통해서는 엄격한 Real-time 처리까지는 불가능합니다. 



The WARPLab reference design is an implementation of the WARPLab framework that allows many physical layer designs to be constructed and tested. The reference design combines MATLAB and FPGA implementations of the WARPLab framework modules that allow for easy extensibility and customization. While the reference design uses MATLAB to control nodes and perform signal processing, it also allows applications with strict latency requirements to move time critical processing in to the FPGA. The latest WARPLab 7 reference design runs on both WARP v2 and WARP v3 hardware. Users with WARP v1 hardware should use WARPLab 6.



* WARPLab 레퍼런스 디자인이란? 다양한 물리계층 디자인을 구성하고 테스트 할수있는 하나의 프레임 워크의 실현을 의미합니다. 앞으로 소개할 디자인은 매트랩과 FPGA(WARP Board) 와의 조합으로 구성되며 간단하게 사용자가 확장하거나 수정이 가능한 형태로 제공될 것 입니다. 


앞으로의 포스팅은 아래의 순서대로 진행 됩니다.










Introduction to the Xilinx Platform Studio (XPS)

(compatible with WARP v3)


In this exercise, users will be introduced to the Xilinx Platform Studio (XPS). This tool is used by designers to build complete systems out of separate peripheral cores known as "pcores." In this exercise, user's will extend a provided template project by adding a custom pcore that implements a pseudorandom number generator (PRNG) directly in the FPGA. This core is then connected to the template project's User I/O core so it can drive random values out to LEDs and hexadecimal displays.


본 예제에서는, 자일링스 플랫폼 스튜디오 XPS를 소개합니다. 본 툴은 사용자에 의해서 pcores 로써 주변 cores와는 분리된 형태로 완벽한 시스템을 빌드 할수가 있다. 따라서 본 예제에서 사용자는 직접적으로 FPGA에서 제공하는 PRNG을 실행하여 의사난수를 생성 할수가 있다. 이는 생성된 난수값을 16진수 LED 세그먼트로 디스플레이 하는 예제 샘플이다. 


Prerequisites

    • You have a WARP v3 board
    • ESD protection for the WARP board (wrist strap, etc)
    • External USB JTAG cable and a micro USB cable for UART
    • Complete installation of ISE System Edition 13.4
    • Checked out a local copy of the WARP Repository
    • Set up a terminal on your computer using PuTTY or an alternative.
    • Familiarity with the Xilinx SDK. Make sure you have completed the Introduction to the SDK exercise.

XPS를 실행하기 위해서는 WARP 보드와 정전기 방지대책, JTAG 케이블, ISE 시스템 에디션의 설치, WARP 저장소의 Local 백업, PuTTY를 통한 터미널연결, 마지막으로 SDK에 대한 숙지가 필요합니다. 


Overview







In this exercise, we provide users with a custom peripheral core: the prng_useriosrc. This core is a pseudorandom number generator with ports that are meant to be connected to the User I/O core that is present in the template WARP design. The above figure describes is a simplified diagram of the final after adding the custom pcore. Inside the custom core there is a Linear Feedback Shift Register (LFSR) that produces a sequence of pseudorandom values. These values are then latched by a counter circuit to slow them down and make their changes visible to the naked eye when observing a board. The output of this latch is sliced up and connected to output ports on the core. All pcores have two distinct ways of getting information into and out of the peripheral:


간략한 시스템 블록 다이어그램에 대한 소개와 본 예제에 대한 설명이 명시되어있다.

prng_useriosrc 라는 메인 블록 (소스예제) 는 LFSR 선형 피드백 시프트 레지스터를 사용하여 의사난수를 생성하여 Segment를 제어하는 프로그램이다. 프로그램의 시작은 유저의 Push 버튼으로 짐작되며, 랜덤 시퀀스를 LFSR에서 생성하면 이를 래치하여 해당 출력의 MSB 나 LSB를 Hex Display 와 LEDs로 출력시킨다. 


Ports: Shown in yellow in the above figure, ports allow direct connectivity between peripherals. They can serve as inputs or outputs of the design.

Registers: Shown in red in the above figure, registers allow peripherals to be controlled by software running in a Microblaze soft processor. Registers allow the core to hang off a bus such as the Processor Local Bus (PLB) and allow custom C-code to read or write memory addresses to control the core.

The prng_useriosrc pcore has the following inputs and outputs:



포트는 내부포트(노랑)와 외부포트(초록)으로 구분되며, 하드웨어적으로 직접 연결이 가능한 핀(포트) 이다. 또한 붉은색 블락의 레지스터는 Microblaze CPU를 사용하여 소프트웨어를 통하여 제어가 가능하다. 레지스터는 PLBs 버스를 통하여 제어 및 데이터의 송수신이 이루어진다. 


Inputs


User I/O Pushbutton Port: This port is connected directly to the User I/O "up" pushbutton port. When the user presses the button on the board, the latch inside the prng_useriosrc core will stop updating the outputs. This will effectively "pause" the core and allow the user to read the current set of outputs from the LEDs and other display elements.

Capture Period Register: This register attaches to the bus and allows C-code executing inside the MicroBlaze to control how often the latch on the LFSR triggers. In effect, this is a way for C-code to control how fast the output updates occur. Note: even though we have listed this as an input to the core, this register can also be read by the C-code in order to check and see what it had been set to.


2개의 입력 포트 및 레지스터가 존재한다. 푸쉬버튼이 연결된 포트는 코어 내부의 래치 출력 업데이트를 제어할수 가 있다. (노파심에 설명을 해보자면,) 사실 이런류의 임베디트 프로그래밍을 진행해본 사람들은 잘 알겠지만, 무작정 해당버튼을 누른다고 정말 래치가 동작을 하다가 중단되고 하지는 않는다. 이는 모두다 메인 프로그램 코드에서 위와 같이 동작하도록 사전이 코딩을 해놓았기에 푸쉬 버튼을 누르면 해당 기능이 수행되는 것이다. 따라서 이와 같은 예제들을 많이 접해보고 따라해보되, 어떻게 코딩을 했으며 내가 정의하고자 하는 프로그램은 어떤 기능이 필요하고 어떻게 동작되었으면 좋을지 그리고 그런 프로그램을 코딩하기 위해서 어떤식으로 프로그램 구조를 짜야하는지를 미리 경험하는 시간이 되길 바란다. 


Outputs


Left/Right Hex Display Ports: The left and right hexadecimal displays contain seven individual on/off segments. These output ports drive 7-bit wide random numbers to the equivalent input ports on the User I/O core.

Red/Green LED Ports: The banks of red and green LEDs each contain 4 elements. These 4-bit wide random numbers drive the equivalent input ports on the User I/O core.

Captured Output Register: This register attaches to the bus and allows C-code executing inside the MicroBlaze to read the current latched output of the LFSR.

You will also notice in the diagram the green "FPGA Pins" ports. These are top-level ports that are routed out to physical pins on the FPGA. These pins are connected to other components on the WARP board. For the purpose of this exercise, we have provided this pcore as an example of a hardware peripheral you may want to integrate into your design. The Exporting pcores from System Generator exercise covers how this pcore was created.

출력 레지스트리를 통하여 FPGA 핀에 물리적인 값이 전달됩니다. 이 핀은 WARP의 다른 구성요소와 연결되어서 사용자의 목적에 맞게 제어 및 디자인 될수가 있습니다. 


Instructions

일단 여기 포스팅에서 다루는 것은 템플릿 프로젝트 (Not lite ver.) 이며, lite 버전으로 가볍게 시작하기를 권한다. FPGA의 특성상 빌드시간이 꽤 오래걸리기 때문이다.

아래의 예제 실행순서는 별것 없다. 예제 소스코드를 루트폴더에 다운로드 후 XPS에서 open하여 아래의 순서대로 빌드하면 실행이 된다. 


  1. Download either the WARP v3 Template Project. Note: We recommend using the "lite" template for this exercise as it will build the quickest.
  2. Extract the archive into a folder on your hard drive. Note: this folder must not contain any spaces in the path (this includes the the Windows desktop, as that lives in a folder known as "Documents and Settings").
  3. Navigate to this folder in Windows Explorer. Go into the SDK_workspace folder. These are the default SDK projects used in the Introduction to SDK exercise. We do not need them for this exercise. Delete the three folders in SDK_workspace (but do not delete SDK_workspace itself).
  4. Download the provided pcore. Unzip the archive and place the "prng_useriosrc_plbw_v1_02_a" folder inside the "pcores" folder in the extracted template project.
  5. Launch XPS from the Start menu. Click "Open project" and navigate to the system.xmp file from the template project. Click Open.
    • If this is the first time you have run XPS, you will receive a number of error messages saying that cores cannot be found. XPS must be told where to find the WARP SVN repository in order for it to find these files. In XPS, click Edit→Preferences. Then, under the "Application" category, click "Browse ..." under the "Global Peripheral Repository Search Path." Navigate to and select the "edk_user_repository" folder on your hard drive. If you do not have an "edk_user_repository" SVN working copy, please see our SVN documentation. After making this selection, close and reopen XPS. This step of adding the global repository path only needs to be done once per installation of the Xilinx tools.
  6. To connect the new pcore to the system, we will modify the Microprocessor Hardware Specification "system.mhs" You can find this file in the "Project" tab under "Project Files." Double-click this file to open it.

프로그램의 실행을 위해서는 아래의 자일링스사의 ISE 소프트웨어 다운로드 링크로 가서 설치를 진행하도록 하자.

생각보다 용량이 많기 때문에 시간이 많이 소요 된다. 



+ Recent posts