원문: 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/howto/SD_Config



오늘은, WARP v3 구매시 함께 꽂혀서 배송되는 SD 카드로 간단한 "카운터 예제" 프로그램으로 Virtex-6 FPGA를 구성하여 동작시켜보겠습니다.


WARP v3: FPGA Configuration via SD Cards

The WARP v3 board includes an SD card slot and CPLD tied to the Virtex-6 FPGA's dedicated configuration pins. Together these circuits enable configuring the FPGA using bitstreams stored on the SD card. For more details on the hardware design, refer to the WARP v3 user guide.

The basic steps for SD card configuration:

  1. Generate a valid bitstream (.bit file) for the Virtex-6 FPGA
  2. Convert the .bit file into a correctly-formatted .bin file
  3. Copy the .bin file to the correct location on the SD card

Each step is discussed in detail below.

The SD cards shipped with WARP v3 kits are pre-programmed with a known good design that implements a simple counter displayed on the hex displays. To re-program your SD card with this design, use this file: w3_sd_newCard.bin.zip (unzip to retrieve the .bin file).



WARP v3 보드를 구매하면, SD 카드가 보드의 SD카드 슬롯에 꽂혀서 배송됩니다. 

해당 SD 카드에 우리는 미리 Warp Project에서 제공하는 .bin 예제 파일을 Binary copy로 먼저 수행해야 합니다.


사실, 원래는 FPGA의 구성을 위해서는 bitstreams 을 생성하고 이를 다시 bin으로 변환하여 SD카드에 복사하고 이를 사용하여 동작시켜야 하지만, 우리는 주어지는 bin파일을 사용하여 간단하게 동작시켜 보겠습니다.

(bitstreams 생성은, 본 글의 처음부분에 링크해놓은 글을 읽으면서 천천히 따라하시면 가능합니다.)


우선, bin파일은 위의 w3_sd_newCard.bin.zip​ 을 다운로드 하여 사용합니다.



Copying .bin Files SD Cards


Now that you've generated a valid binary configuration file (.bin), you must copy it to a specific location on an SD card.

WARNING: the tools for writing binary files to arbitrary locations on the SD card are also capable of overwriting critical areas of your computer's hard drive. Always verify the output device descriptor before running these tools.

The default WARP v3 CPLD design loads configuration files from the SD card starting at an offset of 64MB. Up to 8 configuration files can be stored per card, with each file separated by 16MB. The active configuration file is selected by the config DIP switch on the WARP v3 board. You must choose which "slot" when copying the .bin file to the SD card.

We use the open-source dd tool to write configuration files to SD cards. dd is available for OS X, Linux and Windows (and probably other OSs). Each call to dd copies one configuration file. There are four required arguments:


(복사 명령어 ↘ )

dd bs=512 seek=<base_block_addr> if=<config_file.bin> of=<sd_device_descriptor>

Variables to replace:

  • <sd_device_descriptor>: Device descriptor for SD card (OS specific; see below)
  • <config_file.bin>: Input file (your .bin file)
  • <base_block_addr>: Staring address for the output file, in units of block size. Use (131072 + slotNum*32768) for standard WARP v3 config design:

    • Slot 0: 131072
    • Slot 1: 163840
    • Slot 2: 196608
    • Slot 3: 229376
    • Slot 4: 262144
    • Slot 5: 294912
    • Slot 6: 327680
    • Slot 7: 360448

The specific calls to dd depend on your operating system.


다운로드한 bin파일을 SD카드로 복사하기 위해서는 우리는 dd 라는 리눅스 명령어를 사용합니다. 


(dd란? 파일을 변환하고 복사하는 것이 주 목적인 유닉스 및 유닉스 계열 운영 체제용 명령 줄 유틸리티입니다. -위키- )


현재 사용하신 OS가 리눅스라면 그대로 dd를 사용해서 위의 복사 명령어를 사용하시면 되지만, Window를 사용하신다면 window 용 dd 유틸리티가 필요합니다. 이것도 친절하게 웹사이트에 있습니다. 아래를 참고하세요.


http://www.chrysocome.net/download


위의 사이트에서, dd-0.6beta3.zip 또는 ddrelease64.exe 파일을 다운로드 하시면 사용가능합니다. 

다운로드한 파일들은 w3_sd_newCard.bin.zip​ 과 함께 같은 폴더로 복사해주세요. 편리를 위해서 이름을 그냥 win-dd.exe  로 변경하여 사용하겠습니다. 저는 c:\dd 라는 폴더에 두 파일을 복사했습니다.


이제 w3_sd_newCard.bin 파일을 SD카드로 복사하기 위해서 아래의 내용대로 따라해주세요.


http://warpproject.org/trac/wiki/howto/SD_Config/Windows



A port of dd is available for Windows from http://www.chrysocome.net/dd. We have sucessfully tested verison 0.6beta3 on Win 7 64-bit.

Download dd.exe from the site above. Move it to somewhere in your path, then rename it win-dd.exe (this avoids conflicts with the dd.exe distributed with the EDK, which isn't useful for writing SD cards in Windows).

Finding the SD card descriptor:

  1. Insert the SD card. Take note of which drive letter it is assigned in Windows Explorer.
  2. Open a command prompt as administrator and run win-dd --list. The output will be similar to:
    C:\xps_proj\SDK_Workspace\MyProj_hw_platform>win-dd --list
    rawwrite dd for windows version 0.6beta3.
    Written by John Newbigin <jn@it.swin.edu.au>
    This program is covered by terms of the GPL Version 2.
    
    Win32 Available Volume Information
    \\.\Volume{72603844-0595-11e1-822c-806e6f6e6963}\
      link to \\?\Device\HarddiskVolume2
      fixed media
      Not mounted
    
    \\.\Volume{72603845-0595-11e1-822c-806e6f6e6963}\
      link to \\?\Device\HarddiskVolume3
      fixed media
      Mounted on \\.\c:
    
    \\.\Volume{9654066c-60bd-11e1-9757-001018af5a78}\
      link to \\?\Device\HarddiskVolume4
      removeable media
      Mounted on \\.\f:
    
    \\.\Volume{72603848-0595-11e1-822c-806e6f6e6963}\
      link to \\?\Device\CdRom0
      CD-ROM
      Mounted on \\.\d:
    
    
    NT Block Device Objects
    \\?\Device\CdRom0
      size is 2147483647 bytes
    \\?\Device\Harddisk0\Partition0
      link to \\?\Device\Harddisk0\DR0
      Fixed hard disk media. Block size = 512
      size is 500107862016 bytes
    \\?\Device\Harddisk0\Partition1
      link to \\?\Device\HarddiskVolume1
      Fixed hard disk media. Block size = 512
      size is 41094144 bytes
    \\?\Device\Harddisk0\Partition2
      link to \\?\Device\HarddiskVolume2
    \\?\Device\Harddisk0\Partition3
      link to \\?\Device\HarddiskVolume3
    \\?\Device\Harddisk1\Partition0
      link to \\?\Device\Harddisk1\DR1
      Removable media other than floppy. Block size = 512
      size is 1977614336 bytes
    \\?\Device\Harddisk1\Partition1
      link to \\?\Device\HarddiskVolume4
      Removable media other than floppy. Block size = 512
      size is 32002048 bytes
    
    Virtual input devices
     /dev/zero   (null data)
     /dev/random (pseudo-random data)
     -           (standard input)
    
    Virtual output devices
     -           (standard output)
     /dev/null   (discard the data)
    
  3. To find the descriptor for the SD card itself (and not its FAT partition):
    1. Look in the "Win32 Available Volume Information" section and find the device descriptor for the SD card FAT partition. In this system the SD card mounts as drive F:. The corresponding descriptor is \\?\Device\HarddiskVolume4
    2. Look in the "NT Block Device Objects" section and find the alias for the same descriptor. In this example, it is:
      \\?\Device\Harddisk1\Partition1
        link to \\?\Device\HarddiskVolume4
        Removable media other than floppy. Block size = 512
        size is 32002048 bytes
      
    3. Look for the device with the same Harddisk number but with Partition0. In this example, it is:
      \\?\Device\Harddisk1\Partition0
        link to \\?\Device\Harddisk1\DR1
        Removable media other than floppy. Block size = 512
        size is 1977614336 bytes
      
    4. The block device listed is your SD card descriptor. In this example it is \\?\Device\Harddisk1\Partition0.
      • Confirm that the size of the Partition0 device approximates the capacity of your SD card. The SD card in this example is 2GB (all Mango-supplied cards are 2GB).
      • Confirm that your computer's hard drives have different Harddisk numbers. In this example the C: drive is \\?\Device\Harddisk0.
NOTE: The actual device descriptor on your system is likely different than this example. The descriptor can also change between reboots. Always confirm the current descriptor before copying to the SD card.

Copying the .bin file:

  1. Run this command, replacing the last three arguments with the correct values:
    win-dd bs=512 seek=<N> if=<yourFile.bin> of=<SD_device> --progress
    
    1. <N>: depends on the target slot number; use (131072 + slotNum*32768). More details here.
    2. <yourFile.bin>: the binary FPGA configuration file
    3. <SD_device>: SD device descriptor, usually in the format of \\?\Device\HarddiskX\Partition0. See instructions above.
  2. If successful, dd should report the following:
    18032+1 records in
    18032+1 records out
    
  3. win-dd may report "Error reading file: 87 The parameter is incorrect". In our experience this is normal and not an actual error.
  4. Repeat for additional .bin config files in additional slots, if needed.
  5. Eject the SD card.


1) 프로그램 및 파일 검색에서 "cmd" 를 검색하여 반드시 "관리자 권한" 으로 명령 프롬프트를 실행합니다. 

     : 관리자 권한을 얻으셔야, 현재 PC의 Disk들의 파티션이름을 정확하게 알수가 있습니다.

2) 앞서 미리 파일들을 다운로드 해놓은 폴더로 이동합니다. 

    cd\ 

    cd c:\dd

3) SD카드를 리더기를 사용하여 컴퓨터에 삽입합니다. (무슨 드라이브로 SD카드가 잡히는지 확인하세요. (예) e: ) 

4) win-dd --list 명령을 입력하여 현재 디스크정보를 모두 봅니다. 

     :위의 output 예시와 같은 디스크 정보가 출력됩니다. 

       만약 e:가 link to \\?\Device\HarddiskVolume4 를 가리킨다면, 

       이와 매칭되는 \\?\Device\Harddisk1\Partition1 의 위치를 가리킨다면, Partition0으로 변경하여 주소를 사용.

       즉, \\?\Device\Harddisk1\Partition0 이 SD카드의 위치를 의미하게 됩니다.

5) 복사 명령을 실행합니다.


win-dd bs=512 seek=131072 if=w3_sd_newCard.bin  of=\\?\Device\Harddisk1\Partition0 --progress



아마 제가 했던 방법대로 하셨다면, 위의 명령어로 복사를 진행하게 됩니다. if는 복사할 파일의 위치와 이름을 적으시면 되고 of에는 복사될 주소를 적으시면 됩니다. 또한, 131072는 SD카드의 슬롯주소를 의미하는데, WARP v3장비를 구매하면 제공하는 SD카드는 사전에 미리 8 slot으로 포맷/파티션 분할되어 제공하기 때문에 원하는 슬롯에 .bin 파일을 write 한다고 생각하면 됩니다. 예를 들면, slot0 = 131072 에는 기본적인 프로그램을 저장, slot1= 163840 에는 802.11 reference 프로그램을 저장했다고 생각해봅시다. 이때 우리는 원하는 프로그램을 동작시키고자 할때마다 새롭게 SD카드에 복사하는 것이 아니라, 미리 slot0과 1에 bin파일들을 복사해놓고 WARP v3의 DIP스위치만 변경하여 바로바로 사용하는 것입니다. (사실 SD카드 포맷해도 사용이 가능합니다. 파티션만 날아갈뿐 어쨌든 인식이 됩니다)



6) 아마 아래와 같은 복사 성공 메세지 외에도 어떠한 에러메세지가 출력될것입니다.

18032+1 records in

18032+1 records out


87 에러메서지는 단순한 표기오류일뿐 신경쓰시지 않아도 작동합니다. 


7) 이제 복사한 bin파일이 있는 SD카드를 WARP SD슬롯에 꽂고 전원을 넣어봅시다. 

    저는 아래와 같이 동작했습니다.







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

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


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










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 소프트웨어 다운로드 링크로 가서 설치를 진행하도록 하자.

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



원문: http://warpproject.org/trac/wiki/Exercises/13_4/IntroToSDK


Introduction to the Xilinx Software Development Kit (SDK)

(compatible with WARP v3)


In this exercise, users will be introduced to a tool that is used heavily in WARP development: the Xilinx Software Development Kit (SDK). Users will use these tools to construct a simple "Hello World" software project that prints messages via UART to a terminal running on the user's PC and controls the User I/O on the board to run on and off LEDs and display numbers on the hexadecimal displays.


유저는 SDK를 사용하여서 (간단한 example 을 구현한다.) 헬로월드 따위를 PC로 전송하여 터미널에 디스플레이 할 수 있고 몇가지 I/O 포트 제어 및 LED 제어가 가능할 것이다. SDK는 이클립스의 IDE와 유사하며, 그리고 주로 사용하는 언어는 C와 C++ 이다. 이를 통하여 마이크로 블레이즈 CPU를 제어한다. 



The SDK will look very familiar to users who are comfortable with the Eclipse IDE. Basically, the SDK allows users to write custom C or C++ code to execute on the MicroBlaze processor. Furthermore, it natively supports step-by-step debugging of code as well as code profiling.


Prerequisites

필요한 준비물은 아래와 같다. PC와 연결한 와프 보드와 인터페이스 JTAG이 필요하다. +정전기 방지에 대한 숙지.

보드만 구매하면 낭패를 볼수있으니, 반드시 호환되는 JTAG 케이블도 함께 구매하길 바란다. 

  • 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
  • Set up a terminal on your computer using PuTTY or an alternative. Instructions to do this are available instructions here.



Instructions

매우 간단한 예제를 따라하면서, 새프로젝트의 생성 및 디버거 툴을 사용해보면서 익숙해지는 과정을 상세히 설명하고 있습니다. 주석이 필요한 부분만 달고 나머지 부분은 직접 따라해보길 권장합니다.


  1. Download the WARP v3 Template Project. Note: any template for your version of the hardware will work fine for this exercise as only the SDK is necessary. In general, when FPGA hardware designs must be generated, the "lite" template will build the quickest, but it lacks peripherals like Ethernet that may be necessary for designs other than this simple Introduction to the SDK exercise.

    앞서 이야기한 예제를 실행하기 위해서, 위의 링크의 프로젝트를 다운로드 합니다. 이는 섹션4의 마지막 파트에서 설명하게되는 프로젝트 예시파일과 같습니다. (* Template Projects) 실행을 위해서는 SDK가 반드시 필요합니다. 일단적으로 FPGA 하드웨어 디자인들이 생성될때, lite 버전의 템플릿들은 빠르게 생성되지만 그것은 이더넷과 같은 주변장치를 제외하기 때문에 초기 학습에 적합하지 않습니다.


  2. Extract the archive into a folder on your hard drive. Note: this folder must not contain any spaces in the path (this includes folders such as "My Documents" in Windows; Please note that in Windows 7, the Desktop folder can be used, "C:\Users\<username>\Desktop", whereas in previous versions of Windows the Desktop folder was under the "Documents and Settings" directory and could not be used).

    어쨌거나 템플릿 프로젝트 파일의 압축을 풀고, 해당폴더는 최상위 폴더여야 합니다. 

  3. Launch the Xilinx SDK from the Start Menu. It will ask you to select a workspace. Click "Browse ..." and navigate to the "SDK_workspace" folder in the archive you just extracted. Do not check the box for "Use this as the default and do not ask again." We recommend the convention of using a single workspace per hardware project; checking this box will make this difficult. More useful tips for using the SDK are available here. Click OK.

    시작메뉴의 자일링스 SDK를 실행시킨다. SDK작업폴더로 이동한다. default 설정을 유지한다. 이 옵션을 선택하지 않으면 귀찮아 진다. 더 많은 정보는 here 링크를 참조하세요.

  4. Rather strangely, the Xilinx SDK does not automatically know about software drivers to custom peripherals in your XPS project. You have to explicitly tell the SDK where to find your hardware project. This is a step you have to do with every new SDK workspace. In this exercise, we do not have any custom peripherals, but it is still a good habit to get into. Click on the "Xilinx Tools" menu item and select "Repositories." Here, you want to ensure two things:
    • In Local Repositories, you want to point the SDK to the folder that contains the XPS project system.xmp file. Click on "New..." and navigate to and select this folder.
    • In Global Repositories, you want the SDK to point to the edk_user_repository folder on your hard drive. Unlike the local repositories, the SDK does remember this setting across workspaces. You'll only need to manually add the edk_user_repository the first time you run the SDK.

      자일링스 SDK는 자동적으로 소프트웨어 드라이버를 찾거나 알지 못합니다. 따라서 당신이 명확하게 지정해주어야 합니다. 이는 새로운 SDK workspace를 생성할때마다 반복해야 합니다. 실질적인 SDK와 XPS의 사용법은 직접 실행을 통하여 익숙해지길 권합니다.


  5. In the template project you downloaded, we have provided a template software project. We now need to add it to the workspace. Click on File→Import...

    다운로드한 템플릿 프로젝트는 현재의 작업영엑 추가해야한다. 클릭후 파일메뉴에서 불러오기 선택.
    (이제부터 아래의 메뉴얼의 내용대로 진행하세요. 앞으로 추가설명이 필요한 부분만 주석처리 하겠습니다.)

  6. Click the + next to "General" and select "Existing Projects into Workspace." Then click "Next."

  7. In the "Select root directory:" click "Browse..." Then, navigate to the "SDK_workspace" folder in the extracted archive and click "OK"

  8. Three projects have now been populated in the "Projects" area of the import window. Make sure all of these are checked. Do not check "Copy projects into workspace" because these projects are already in the SDK_workspace folder. Click "Finish."


  9. The three projects now appear in the "Project Explorer" on the left of the screen:

    세개의 프로젝트에 대한 정보를 이름과 관련된 파일들로 분류하여 설명합니다. 

    • The "*_hw_platform" contains all of the necessary hardware-specific information for the project. This includes any custom FPGA cores that the project may have. This comes from the Xilinx Platform Studio (XPS) tool. Instructions for using this tool to generate hardware platform information for the SDK is available in the Introduction to XPS exercise.
    • The "*_bsp" is a "Board Support Package" and it contains the software drivers for the peripherals contained in the hardware platform.
    • The "*_example" project is the top-level software project that you will modify to add a print of "Hello World" to the UART.

  10. Click the + button next to the "*_example" project. Then open the "src" folder by clicking the + button next to it. Finally, double click the "*_example.c" file to open it in the editor. At this point, you can look through this source code and see that it will print some messages to the terminal and will count upwards, displaying the current count on the hexadecimal displays on the WARP board and the LEDs.

  11. Right click on the "*_example" software project in the Project Explorer and click "Generate Linker Script." Here, we will assign instruction and data pieces of our code to various pieces of memory in our XPS hardware project. Assign the following:
    • The code sections to "ilmb_cntrl_dlmb_cntlr"
    • The data sections to "xps_bram_if_cntlr_0"
    • The heap and stack to "xps_bram_if_cntlr_1"

  12. Click "Generate" and then "Yes" to the message that says you are going to overwrite an existing linker script. The console will print messages and end with "Finished building: *_example.elf.elfcheck"

  13. Make sure your WARP hardware is powered on (fan should be running). Also make sure the WARP hardware is connected via JTAG (for programming) and connected via micro USB (for terminal communication) to your computer.

  14. Click the "Xilinx Tools" menu item and then "Program FPGA." Then click Program. This will load the hardware design onto the board. It will not load the software project.

  15. Open up a terminal emulator on your computer and configure it to accept your COM port with speed 57600 baud.

  16. The SDK is somewhat sensitive on what project has "focus" when you tell it to do something like load a design onto the board. Make sure the "*_example" project is highlighted. If it is not, click on it so that it will be.

  17. Click the menu item "Run" and then click "Run." A window will pop up asking you to select a way to run your "*_example" program. Click "Launch on Hardware" and then okay.

  18. The project is now running! You should see the LEDs and hexadecimal displays on the board incrementing twice a second. Furthermore, your terminal should be printing.

  19. Try to modify any of the prints in the code with your own custom strings. Click save. The SDK will automatically recompile the project. Download it again through the "run" menu.

  20. Also, find the usleep(250000) line inside the userio_example() function. This line is telling the processor to wait for half a second before incrementing the displays upwards. Replace this with usleep(500000) and you should see the board count half as fast.


Discussion

The purpose of this exercise was to take you through the whole process of writing software for an existing hardware project. In the System Generator Peripheral Export exercise, you will develop a custom FPGA peripheral core and control it via custom software.


Additional Questions and Feedback

If you have any additional questions about this exercise or other feedback, please post to the ​WARP Forums.




원문: http://warpproject.org/trac/wiki/GettingStarted/WARPv3/IntroToTools




WARP v3 Getting Started Exercises

Developing custom applications on WARP requires using design tools from Xilinx. These tools are sophisticated (i.e. they're complicated) and can be daunting to a new user. We've created some simple exercises that introduce the core tools most WARP users will use.


WARP에서 어떠한 사용자정의의 어플리케이션을 개발하기 위해서는 자일링스에서 제공하는 디자인툴을 사용해야 합니다. 이러한 툴은 매우 정교하지만 복잡하지는 않으며, 우리는 몇가지의 간단한 예제들을 제공합니다. 이 예제들은 핵심적인 툴들을 소개하면서 동시에 WARP 유저들이 빈번하게 사용하고 스터디 하게 될 것입니다.



Basic Design Structure


All WARP reference designs are built using the Xilinx Embedded Development Kit (EDK). The EDK enables construction of designs with both a processor, for running custom software, and custom hardware cores for real-time processing and connecting to off-chip hardware.


모든 WARP 레퍼런스 디자인은 자일링사의 내장 개발키드 (EDK)를 통해서 빌드됩니다. EDK는 사용자 정의 소프트웨어의 동작을 위한 절차와 사용자 정의형 하드웨어 기술들(실시간 처리 및 확장 하드웨어 연결) 등을 가능하게 해줍니다. 


그래서 EDK는 2가지의 주요 툴을 포함하는데, 

The EDK includes two primary tools:


- Xilinx Platform Studio (XPS): integrates the hardware cores for a design, including the MicroBlaze processor, memory, peripherals and interfaces for off-chip hardware

- Xilinx Software Development Kit (SDK): a full suite of software compilation and debugging tools for the MicroBlaze processor

자일링스 플랫폼 스튜디오 (XPS) 와 자일링스 소프트웨어 개발 키트 (SDK) 이다. 
XPS는 MCU와 메모리 주변 I/O 디자인을 위한 소트프웨어, SDK는 컴파일 및 디버깅 도구.


The basic structure of WARP reference designs is illustrated below.






WARP 레퍼런스 디자인의 기본적인 구조는 위의 그림과 같다.



The major components of this architecture are:


MicroBlaze soft processor: The MicroBlaze is a processor core implemented in the FPGA fabric and is supplied by Xilinx as part of the EDK. This processor replaces the hard PPC405 core familiar to users of WARP v1 and v2. WARP보드는 Virtex-6 FPGA 보드(마이크로 블레이즈를 사용하는)위에 올라가서 구동된다. 즉 상위 어플레케이션 단은 WARP (FPGA를 제어한다) 지만 실질적인 구현은 FPGA를 통해서 실행된다. 여기선 1세대 2세대 와프의 CPU 코어 패밀리에 대해서 간략히 이야기 한다.


Memories: the Virtex-6 FPGA includes a large number of "block RAMs", or internal RAM blocks which can be interconnected to form arbitrarily sized memory areas accessible to the MicroBlaze. These block RAMs are used for cache, instruction and data storage. 사용되는 메모리는 블락 타입의 램 또는 내부 메모리를 마이크로 블레이즈 CPU를 구동 및 돕기 위해서 사용된다. 블락 메모리는 주로 명령구문 처리와 데이터 저장/캐시 를 위해서 사용된다.


Processor bus: a standard bus connects the MicroBlaze to each core in the system. Current reference designs use a bus called PLB; future designs will migrate to the newer AXI standard. 프로세서 명령어들이 이동하는 통로인 버스는 시스템안에서 각각의 코어와 CPU에 연렬된다. 이러한 버스는 PLB로 불리우며 현재 데이터 및 명령등이 이동하는 통로로 사용된다.


Peripheral cores: a collection of peripheral cores compose every hardware design. Some are provided by Xilinx (like the UART and Ethernet MAC). We have designed others (like the WARP v3 user I/O and radio interface cores).병렬 코어들은 모든 하드웨어를 구성하는 디자인으로 사용됐다. 유아트나 이더넷 맥이 제공되었다.


Off-chip resources: these blocks represent the other hardware on WARP v3 besides the FPGA, like the radio interfaces, FTDI USB-UART transceiver and Marvell Ethernet PHYs Off 칩은 기존의 통합 MCU에서 많이 쓰던 온칩과는 반대로 칩안에 모든 연산 입출력 저장장치가 모두 들어있는 형태가 아니라 따로 구성되어있는 형태를 의미한다. 따라서 이들은 다른 보드에 올려져있고 이는 어떠한 연결된 버스에 의해서 제어되고 해당 버스는 USB형 변환된 유아트나 이더넷등으로 명령어가 이동하여 제어된다.


The MicroBlaze processor and connected cores are all implemented in the FPGA fabric using XPS. The output of the XPS flow is a "bitstream" with the fully synthesized and implemented hardware design. This bitstream integrates the MicroBlaze, the standard peripheral cores, your custom cores, I/O assignments and clock configurations. However the MicroBlaze instruction and data memories are blank in this bitstream.

The XPS-generated bitstream (and its associated hardware specification) is the starting point for an SDK project. The SDK compiles custom code for the MicroBlaze, along with drivers for the various cores included in the XPS hardware design. The output of this process is an "elf" file, the software binary ready for execution by the MicroBlaze. The elf binary is combined with the XPS-generated bitstream to program the FPGA with the final hardware+software design.


지금까지 기본적인 소프트웨어와 와프의 구조 및 제어방식에 대해서 설명하였다, 이제는 실질적인 연습코드를 사용하여 제어를 진행해보자. 앞서 이야기 했듯이 와프의 제어를 위해서는 자일링스에서 제공하는 개발툴이 필요하다. 이것이 자일링스 플랫폼 스튜디오 XPS이고, 이안에 자일링스 SDK가 설치되어서 와프와 연결되어 효과적으로 제어할 수가 있게 된다







원문: http://warpproject.org/trac/wiki/GettingStarted/WARPv3/Tools


본 페이지는, 두번째로 WARP를 잘 사용하기 위한 툴들과 장비들에 대해서 설명한다. 간단히 말하자면 WARP에서 사용되는 여러 칩셋들과 표준 프로토콜을 구동하기 위한 소프트웨어들에 대한 설명이다. 


    OS

We recommend Windows 7, 64-bit for all WARP development. That said, the Xilinx tools also support:

  • Red Hat Enterprise 5 Workstation
  • Red Hat Enterprise 4 Workstation
  • SUSE Linux Enterprise

So, these OS choices should also be okay. However, many of the other tools listed here rely on Windows, so appropriate replacements must be found.

OS는 윈도우 7을 추천한다.


    Xilinx Tools

A full installation of the Xilinx tools (System Edition), fulfilling all Xilinx licensing requirements, is necessary for building custom FPGA designs (i.e. hardware). An SDK-only installation (with less stringent licensing requirements) is also available and can be used if the user only wants to update software designs. For example, this reduced installation would be appropriate for customizing the MAC behavior of our 802.11 Reference Design.

커스톰 FPGA 디자인의 구성을 위해서 자일링스 full 인스톨은 필수적으로 요구된다.

하지만 SDK만을 설치해도 소프트웨어 디자인 업데이트가 가능하다. 예를들면, SDK만 설치해도 

802.11 레퍼런스 디자인의 MAC 동작을 사용자 정의형태로 구성 및 실행이 가능하다.   

    Matlab

Matlab is required for Xilinx System Generator and also for the WARPLab design flow.

매트랩도 자일링스 시스템의 생성을 위해서 요구된다. 



WARPLab은 싱글 또는 다중 안테나의 메세지 전송 및 컨트롤을 위한 빠른 프레임 워크로 사용될수 있다. (확장성을 가지는 장점) WARPLab 레퍼런스 디자인은 많은 통신물리계층의 구현 및 테스트를 가능토록 하는  프레임 워크입니다. 그리고 이 레퍼런스 디자인은 여러대의 WARP 노드를 이더넷 연결을 통하여 매트랩으로 제어 및 신호처리 할수 있도록 도와줍니다. 

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 7 is a complete rewrite of the original WARPLab framework. This rewrite was created and is maintained by engineers at ​Mango Communications.


**WARPLab 7에 대한 포스팅은 방대해서 나중에 따로 추가할 예정**

    TortoiseSVN

Any SVN client can be used, but we recommend TortoiseSVN if the user is using the Windows operating system. Instructions for downloading the WARP SVN repository are available here.

TortoiseSVN 의 사용을 권장합니다.

이 SVN이 무엇인지 알기 원한다면 아래의 링크를 열어보시기를 추천합니다.

https://tortoisesvn.net/about.html

TortoiseSVN은 GPL 기반으로 개발되었습니다. (비상업적 목적의 라이선스; 누구든지 수정 및 배포가능) 자유로운 개발 및 수정/ 업그레이드가 가능합니다. 





    PuTTY ¶

PuTTY is used to communicate with the WARP board via UART. Instructions for setting up PuTTY are here.

PuTTY는 PC-WARP간의 통신을 위해서 사용되는 통신 프로토콜입니다. 자세한 내용은 링크 "here" 를 눌러서 확인하세요. 


    Wireshark

Wireshark is a network protocol analyzer. It will show you, at the Ethernet link level, the packets entering and leaving your PC. This can be very useful for debugging interactions between your computer and a WARP node.

와이어샤크는 매우 유명한 네트워크 프로토콜 분석기이다. WARP는 이더넷 링크를 사용하기 때문에 PC와 WARP간의 디버깅을 위해서 유용하게 사용될 수 있다.

     WinDD

WinDD is a port of Unix's 'dd' command. This is used for writing SD cards with your hardware/software designs for running on WARP v3. This allows a WARP v3 node to load a design without downloading over JTAG (very useful for larger deployments). Details of this process are provided here.

SD카드를 구동하기 위한 소프트웨어.

     FTDI Drivers

WARP v3 uses an FTDI usb chip to provide UART connectivity. These drivers create a virtual COM port on your computer that PuTTY can open. More details are available in the user guide and USB UART howto.

     Visual C++ 2010 Express

The WARPLab design flow currently uses a user-compiled library for Matlab to speak to the boards using UDP. Visual C++ 2010 Express is required by Matlab to compile this library.

     Windows SDK

The Windows SDK is also required for compiling Mex functions in Matlab.



   Recommended Equipment for WARP

When using WARP, there are a couple of pieces of equipment that you may find useful to have in your lab space.

    Computer

  • The Xilinx design tools can be very demanding. Depending on how complex the design is that you are building, Xilinx estimates RAM usage for building for the XC6VLX240T FPGA that is in WARP v3 to be typically 3.7GB and as much as 6.5GB (source). Further discussion of system requirements are available here on page 53.
  • It is very useful to have a computer that contains two Network Interface Cards (NICs). For example, you may want one Ethernet card to accessing your computer network or internet, and another card to communicating to the WARP boards over Ethernet.

    효과적인 실험셋팅을 위하여 PC에 2개의 이더넷 카드가 있다면 "WARP-이더넷(PC)" "인터넷-이더넷(PC)"로 구성하여 인터넷사용과 동시에 WARP 연결이 가능하다. 

     Other Useful Accessories

  • Gigabit Ethernet Switch
  • Ethernet cables
  • Micro USB cables


원문: http://warpproject.org/trac/wiki/GettingStarted/WARPv3/Hardware



WARP는 총 3가지 버전이 존재합니다. 제가 구매한 모듈은 왼쪽의 v3이기에 앞으로 모든 내용은 v3을 따라 가겠습니다.




먼저 The Key Components of the Hardware 를 알아보고,  WARP v3 Hardware Users Guide 를 알아볼 예정입니다. 


The Key Components of the Hardware


Throughout the documentation in this wiki and in theforums, we will refer to different components of the hardware by certain terminology and acronyms. In this section, we list these components along with a high-level description of what each component is responsible for.


실제 제가 가진 WARP v3는 아래와 같이 생겼습니다. 





그리고 각 부분의 명칭은 아래와 같으며, 각 파트에 대한 간략한 설명도 되어있습니다.




  • User I/O: This collection of push buttons, LEDs, hexadecimal displays, dip switches, and debug header pins is used for interacting with the board. Designs can read values from the switches and push buttons and can write values to the displays and LEDs. The debug header can be used for any number of purposes, such as providing a convenient way for one WARP board to trigger the action of another board over a wire.

    입력/출력 포트는 일반적인 MCU와 같이 LED와 16진 디스플레이, 스위치, 디버거핀 등이 존재합니다. 디버거핀은 어떠한 액션을 실행하기 위한 트리거로써 사용되며 이는 아마 다른 문서에 자세한 설명이 존재 할것으로 보입니다.

  • Radio Interfaces A & B: These interfaces provide the radios that allow designs to communicate at the 2.4GHz and 5GHz bands. For each radio interface, digital I and Q values from the FPGA are taken through digital-to-analog converters and are delivered to the transceiver for upconversion (i.e. wireless transmission). Wireless reception follows the reciprocal process where I and Q analog streams are taken from the transceiver through analog-to-digital conversion and are then delivered to the FPGA. The interfaces are labeled "RF A" and "RF B" on the board and in our reference designs.

    WARP는 WLAN에 초점을 맞춘 플랫폼이기때문에, WiFi가 주로 사용하는 2,5 GHz 대역의 주파수를 사용하는 라디오 인터페이스가 있습니다. 기본적인 무선신호의 전송을 위한 기능을 FPGA를 사용하여 수행하며 (디지털->아날로그 변환과 변조) 송수신기를 분리하여 RF A와 B로 명명합니다.

  • SDRAM: This DDR3 SO-DIMM provides extra memory beyond the block RAM inside the FPGA. The WARP v3 kit ships with a pre-tested 2GB SO-DIMM.

    역시 좋은 플랫폼답게, SDRAM 메모리를 가지고 있습니다.

  • Device label: This label shows the FPGA device on the WARP v3 board. This device is used in a number of places during the development process (such as exporting a peripheral core from Xilinx System Generator), so this label is present for convenient lookup.


  • Virtex-6 FPGA: Under the fan, the FPGA serves as the central processing system for the WARP board.

    펜(fan)아래에는 본 FPGA보드의 핵심적인 CPU가 있습니다. 

  • FMC HPC Slot: The FPGA Mezzanine Card High Pin Count slot provides connectivity to an existing ecosystem of hardware as well as future WARP-specific modules.

    FPGA 중이층 핀 포트가 존재하지만, 여기에 대한 설명의 웹페이지가 유실되어서 아직은 본 포트의 존재를 모르겠습니다. 추후 업데이트 하겠습니다.

  • Serial #: This is the unique serial number for the WARP board. This number is also programmed into an EEPROM on the board prior to shipping, allowing software running on the hardware to read this information.

    WARP의 고유번호가 적혀있습니다. 해당번호는 모듈내부의 EEPROM에 새겨져서 배송되기 때문에 제품의 식별번호로 사용됩니다.


  • Ethernet A/B: The two 10/100/1000 Ethernet ports provide high-speed connectivity between the board and a wired network. The ports are labeled "ETH A" and "ETH B" on the WARP v3 board and in our reference designs.

    WARP는 2개의 고속 이더넷 포트를 제공합니다. 포트의 라벨은 ETH A와 V로 표기됩니다.

  • JTAG: The JTAG connector allows direct programming of the Virtex-6 FPGA using a Digilent or Xilinx JTAG cable.

    WARP는 FPGA 프로그래밍을 위한 JTAG 커넥터를 제공합니다.

  • SD Card: An alternative to programming the board over JTAG is to use the SD card. This allows non-volatile storage of programs that will automatically download and execute upon insertion of the SD card.


  • UART: The micro-USB connector on the board allows programs on the board to print messages to a terminal running on a computer.

    마이크로 USB 커넥터의 형태로 (보드-PC간의) UART통신도 사용이 가능합니다.

  • Power Switch: The power switch controls power to the board. The "off" position is where the switch is furthest away from the power jack. The "on" position is where the switch is closest to the power jack.

    파워스우치로 아래의 파워잭과 멀리 떨어진 위치일때가 OFF입니다. 가깝게 토글하면 

  • Power Jack: The power jack is where the 12V power supply that comes with the WARP hardware should be plugged in. Note: the power switch should be in the "off" position whenever the power plug is inserted or removed. This allows the circuitry controlled by the switch to properly sequence the power regulators on the board.

    WARP는 12V 전원 공급장치로 연결되며, 전원잭을 연결할때마다 파워 스위치는 OFF 상태에 위치해야합니다. 주의하십시요. WARP는 프로토타입으로 제공하는 플랫폼이기에 회로 쉽게 손상을 줄수있는 행동을 삼가하고 다룰때 신중해야합니다. 특히 정전기에 취약하기 때문에 접지 손목 스트랩과 같은 정전기 예방 솔루션을 사용하여서 작업하기 바랍니다. 

The Xilinx Virtex-6 FPGA 는 복잡한 프로그램 구동시 상당한 열을 발생하기 때문에 쿨러의 사용이 중요합니다. 아래의 그림과 같이 점퍼가 연결되어있어야 동작합니다.  




Each board will be shipped with this jumper connected. This jumper should not be removed. Verify that it is present before using the board.




Installing an FMC Module


WARP v3 includes a FMC HPC slot which can host an FMC module (a.k.a. FMC daughtercard). The FMC connector requires considerable force to mate and separate boards. It is essential you brace the WARP v3 board when mounting/removing FMC modules, to avoid flexing the PCB and breaking solder joints under the FMC connector and FPGA.


The video below shows the proper technique for connecting an FMC module. Do not simply press the FMC module down. Always prevent flexing the WARP board by pinching the FMC module and the WARP board together.





드디어 위에서 언급한 FMC HPC Slot의 쓰임에 대해서 나왔습니다. 동영상은 FMC 커넥터에 모듈을 연결하는 방법을 알려줍니다. 단순하게 FMC모듈을 눌러서는 안되고 동영상을 참조하여 장착하여 파손을 미리 방지 하기 바랍니다. 또한 FMC 모듈을 제거할때도 아래의 영상을 참조하여 적절한 방법으로 제거하기 바랍니다. 
(즉, 무작정 힘으로 하면 안되고, 보드의 튼튼한 부분 (예를들면 마운트) 을 붙잡고서 탈부착을 해야합니다.)




+ Recent posts