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


WARPLab Quick Start



WARP 프로젝트 웹사이트의 내용들은 친절하고 자세하지만, 처음 시작하는 저에게는 너무 생소하고 접근하기에 어려워서
실질적으로 어떻게 해야 WARPLab을 시작할수가 있을까? 에 대한 해답을 정리해보았습니다.

> 먼저 WARPLab 이란? 
 가지고 계신 WARP 장비를 매트랩을 이용하여 연구를 진행할수 있도록 지원하는 FPGA 레퍼런스를 의미합니다.
따라서, WARPLab 을 사용하기 위해서 필요한 준비물은 2가지로 분류 가능합니다.

1) 하드웨어 준비물
PC 1대, WARP 모듈 (2대이상)과 FMC-RF-2X245 radio FMC 모듈 각 1개씩, 이더넷카드 2개 (PC내장형 1개와 추가1개), 무선 AP (스위치용도로) , LAN 케이블 3개, SD 카드와 리더기 각1개씩 (레퍼런스 소스파일을 WARP 모듈에 설치용)


2) 소프트웨어 준비물

매트랩(2011a 버전이상),  

PC에는 고정 IP주소를 할당해야함 : 아이피 주소 10.0.0.250, 서브넷 마스크 255.255.255.0

UDP 포트사용을 위한 방화벽해제

WARP v3 Latest Release 파일(4개의 폴더가 존재) : 아래에 다시 자세히 설명하겠습니다.



Q. PC와 WARP간의 연결은 무선공유기를 스위치 기능으로 사용하여 통신하는것은 이해가 되지만, 실질적으로 어떻게 MATLAB 으로 명령을 전달하고 사용자 정의의 프로그램을 코딩하여 예제를 실행할수있는지는 아직까지 명확하게 이해가 되진 않습니다.


Q. 또한 자일링스사의 FPGA보드를 시스템으로 사용하지만,  어플리케이션 구현시에는 MATLAB을 사용하는데, 이에 대한 구체적인 동작원리와 방식은 의문이 남습니다. 여기에 대한 해답은 차차 달도록 하겠습니다. 


3) Code File의 구성과 설명


(1) Bitstreams_Reference


확장자가 Bin인 파일로써, WARP장비의 전원이 켜져있고 SD카드가 WARP의 카드 슬롯에 삽입되어있다면, SD카드에 해당되는 Bitstreams_Reference 는 자동으로 WARP에 설치를 진행합니다. Bin 파일을 SD 카드에 설치 및 구성하는 방법은 아래의 링크를 참조해주세요. http://warpproject.org/trac/wiki/howto/SD_Config

따라서, 설치를 원하는 Reference 파일의 Bitstreams (bit 파일을 .bin file로 변환합니다. 다음의 SD카드에 로 구성하여 생성하는 법을 참고 : http://warpproject.org/trac/wiki/howto/SD_Config) 을 SD카드에 넣어놓고 WARP에 읽히면 됩니다.


Q.그럼 bit파일은 무엇이고? bin 파일은 무엇인가?     (bin파일: binary configuration file )

         .bit 파일은 Xilinx ISE 하드웨어 및 구현 단계에서 생성되는 최종의 출력물을 의미한다.  .bit 파일은 여러분의                WARP 보드에 적합하도록 생성해야 하며, http://warpproject.org/trac/wiki/howto/SD_Config 절차를 따라하기

   전에 적절한 bit 파일을 생성하고 진행해야 한다.

   


(2) EDK_Projects


이 폴더에는 다양한 EDK 프로젝트들이 포함되어있습니다. 자일링스 ISE를 설치하게 되면 자일링스 임베디드 개발 키트 EDK 소프트웨어도 함께 설치가 됩니다. 하드웨어의 구성 및 설계는 XPS로 실행 되어야 합니다. 또한 마이크로 블레이즈 프로세서의 실행에 필요한 여러 라이브러리들은 자일링스 SDK에 내장되어 있습니다. 

만약 기존의 제공되는 Reference 디자인을 사용하는 경우는 위의 Bitstreams_Reference 의 설치와 M 코드파일만 필요합니다. 하지만 MicroBlaze/PPC C code의 수정이 필요하다면 EDK 프로젝트를 열어 수정해야 합니다. 만약 FPGA reference design을 수정하기 위해서는 XPS 프로젝트를 열어서 수정해야 합니다. 

The WARPLab FPGA design uses custom peripherals designed in Xilinx System Generator, including the warplab_buffers core. You will need MATLAB, Simulink and System Generator to modify these cores.


CPLD 복합 프로그램 가능 논리 소자



(3) M_Code_Examples


이 폴더는 WARPLab 릴리즈와 호환되는 스크립트들이 포함되어있습니다. 예제들은 아래와 같습니다.


== SISO OFDM Comm Example ==

Please see [wiki:./OFDM SISO OFDM Example] for details and code.


== MIMO OFDM Comm Example ==

Please see [wiki:./MIMO_OFDM MIMO OFDM Example] for details and code.


== Synchronized Nodes Example ==

Please see [wiki:./nodeSync Synchronized Nodes Example] for details and code.


== Multi-Node Array Example ==

Please see [wiki:./8x2Array 8x2 Multi-node Array] for details and code.


== Spectrogram Example ==

Please see [wiki:./Spectrogram Spectrogram Example] for details and code.


== User Extension Example ==

Please see [wiki:./userExtension EEPROM User Extension] for details and code.



우리는

http://warpproject.org/trac/browser/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Examples/wl_example_basic_txrx.m


기본적인 SISO 송수신 예제를 하나씩 살펴보면서 어떤 형태로 WARPLab 7이 설치된 WARP Node가 동작하는지 알아볼 것입니다. 2개의 WARP node가 정현파를 전송하고 수신 받을 것 입니다.



(4) M_Code_Reference


PC의 매트랩을 실행하여 WARP와 연동하기 위한 WARPLab 지원 파일들을 의미합니다.

사용자가 wl_setup.m 스크립트를 실행시켜야 합니다.

자세한 설명은 아래와 같습니다.


WARPLab의 셋업때마다  wl_setup.m 파일은 실행되어야 합니다. 

파일이 실행되면 MATLAB의 prompt 창으로 요청되는 사항들에 대해서 입력을 하면 됩니다. 

주로 IP주소나 디렉토리 주소들을 묻는 셋업환경설정을 묻습니다. 입력값에 따라서  'wl_config.ini' 파일을 형성 시키고 이는 셋팅값으로 유지 됩니다. 후에 다시 이작업을 하지 않길 원하면 미리 작업해놓은 .ini 파일을 복사해놓습니다.



>> 따라서 요약하자면, (1)의 파일을 WARP에 설치하고  PC-WARP를 무선AP (스위치)와 연결하면서 IP주소를 세팅하고, 매트랩의 wl_setup.m 을 통해 설정하고 나면 사용자가 원하는 M_Code Examples를 실행할수가 있습니다. 







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

6. WARPLab 7_Example  (0) 2018.01.31
3-3. SD Card 로 WARP Reference 시작하기  (2) 2017.08.02
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/QuickStart


WARPLab Quick Start


System Requirements


1) Check your WARP Repository is set up and up to date



2) Review the WARPLab 7 System Requirements



3) Review the Getting Started Guide for hardware basics and the WARPLab Hardware Configuration  

    Guide for WARPLab specific uses of WARP hardware.


 앞서 포스팅한 1~4 까지의 내용들을 리뷰하고 오셔야 합니다.


4) Review the WARPLab Mex Compilation Guide for additional WARPLab features






Setting up the WARPLab 7 Framework


  1. Download the latest WARPLab Reference Design Release (Download) and unzip it to a location of your choosing.
  2. Open MATLAB and change the current path to the M_Code_Reference directory from the downloaded archive.
  3. Run wl_setup on the MATLAB command line.
  4. Follow the prompts to configure your WARPLab environment.


WARPLab 7의 셋팅은 매우 쉽습니다.
먼저 레퍼런스 디자인 파일을 설치하여 로컬 폴더에 압축을 풉니다.

매트랩에서 경로추가를 하고 wl_setup  파일을 run 합니다. 

그 후 매트랩의 지시를 따릅니다.



Hardware Setup


For your PC:

  1. Assign one of your NICs to the manual IP address specified in the wl_setup step above (default: (10.0.0.250, 255.255.255.0))
  2. Connect the NIC to a 1Gb Ethernet switch

앞서 Getting Start 에서 보여드린 PC와 WARP 간의 연결은 AP나 스위치에 LAN 케이블을 통해서 연결됩니다. 따라서 PC와 WARP 의 설정이 필요합니다. 먼저 PC의 경우는 위와 같은 고정되 IP주소를 지정하고 이더넷 스위치에 연결합니다.


For WARP v3 nodes:

  1. Connect ETH_A to the 1Gb Ethernet switch your PC is connected to.
  2. Set the user DIP switch to a unique value on each node, starting at 0
  3. Configure the FPGA with the Reference Design. The reference bitstreams are included in the Bitstreams_Reference folder from the downloaded archive. Find the bitstream appropriate for your hardware and program the .bit file to the board using the Xilinx iMPACT tool. The .bin file can be used to configure an SD card with the design (see the SD config howto for help using the .bin file).
    1. On boot each node will display its node ID on the right hex display
    2. The bottom green LED will blink until the Ethernet link is up
    3. All four green LEDs will blink when the node is ready to accept commands from MATLAB


ETH_A 포트와 PC와 연결된 스위치간에 LAN 케이블로 유선 연결합니다.
각노드들은 고유한 값으로 DIP 스위치를 셋팅합니다.
FPGA와 레퍼런스 디자인을 WARP에 구성합니다.
이는 비트스트림으로 작성된 레퍼런스 입력 파일을 해당 Bitstreams_Reference 폴더에 복사합니다.
SD카드에 구성하는 방법은 이전의 포스팅에서 설명했습니다.

그러고나면 이제 각각의 WARP는 HEX 디스플레이에 해당 노드의 ID값을 디스플레이 합니다.
그리고 하단의 녹색 LED가 깜빡입니다.
이후 WARP 노드가 매트랩의 명령을 받아들일 준비가 다 되면 4개의 LED들이 모두 깜빡입니다.


예를들면,
Examples

Confirm everything is ready by copying and pasting the following lines to the MATLAB command line:
clear
N = 1;
nodes = wl_initNodes(N);
wl_nodeCmd(nodes,'identify');
disp(nodes)


Note: N can be changed to the number of nodes in your network. When you run these lines of code, you should see the User I/O LEDs on your N nodes blink as a result of the identify command. Additionally, you should see your nodes object vector print status messages to the screen. For N = 2, your status display should be similar to:

Displaying properties of 2 wl_node objects:
|  ID |  WLVER |  HWVER |    Serial # |  Ethernet MAC Addr |
------------------------------------------------------------
|   0 |  7.0.0 |      3 |  W3-a-00027 |  40-D8-55-04-20-36 |
------------------------------------------------------------
|   1 |  7.0.0 |      3 |  W3-a-00041 |  40-D8-55-04-20-52 |
------------------------------------------------------------

If the previous stepped work, you should now try one of the M-Code Examples.



Getting Help

There are a few resources for getting help with using WARPLab for your own designs:

The wl_cmd_list is a function that allows you to display all commands than an object supports.
The wl_cmd_doc is a function that will display documentation for a particular command.
The WARP forums (​http://warpproject.org/forums/) are a great place to ask questions.




위의 프로세스에 따라서 진행을 하시면, 사진과 같이 각 노드들의 세그먼트에 노드아이디 1,2과 출력이되고 서로간에 준비가 되었음을 매트랩 실행화면에 출력이 됩니다. 

원문: 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) 와의 조합으로 구성되며 간단하게 사용자가 확장하거나 수정이 가능한 형태로 제공될 것 입니다. 


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










+ Recent posts