원문: 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/HardwareUsersGuides/WARPv3/TemplateProjects



유저가이드에 대한 내용들은 subsection 4에서 자세히 다룰예정입니다.



WARP v3 User Guide: Template Projects

The following template projects demonstrate how to use the various peripherals on the WARP v3 board and are good starting points for your custom designs.


The projects are grouped by the version of Xilinx ISE used. We will update this page as we port the template projects to newer releases of ISE.


Important: in order to use these projects you must have a local copy of the WARP peripheral cores (pcores) and associated drivers. See http://warpproject.org/trac/wiki/edk_user_repository setup for instructions. Always update your local copy of the WARP edk_user_repository to use new template projects.


템플릿 프로젝트는 앞으로 사용자가 디자인하고자 하는 프로그램작성을 위한 좋은 스터디 예제입니다. 자일링스 뿐만 아니라 WARP 프로젝트팀은 수시로 WARP 사용을 위한 예시와 레퍼런스 디자인들을 업데이트 하기 때문에 수시로 웹페이지에 들어가서 확인해보길 권장합니다.


어쨌든 본 템플릿 프로젝트를 실행하기 위하여 먼저 WARP peripheral cores 의 복사본과 드라이버 복사본을 미리 백업해놓길 바랍니다. 관련내용은 edk_user_repository  를 참조하세요. 




Xilinx ISE 14.4 and Later


On Board Peripherals Template Project




템플릿 프로젝터는 아래의 여러 인터페이스들을 실행하는 예제입니다. 몇가지 버전들도 존재하며 최신버전은 아래의 링크에서 다운로드가 가능합니다. 각각의 버전의 릴리즈 노트를 참조해주세요.


This is an XPS/SDK project which implements peripheral cores to interface with every peripheral on the WARP v3 board, including:


  • MicroBlaze soft processor (big-endian, PLB-based design)
  • Block RAM for instruction/data memory
  • User I/O (LEDs, buttons, UART)
  • Dual Ethernet interfaces
  • MPMC for DDR3 SO-DIMM access
  • Peripherals for RF interface control
  • Timer peripheral for user code

Version information:

Project VersionISE VersionArchEDK Project Download
1.414.4MB/PLBw3_TemplateProject_OnBoardPeriphs_v1p4.zip

We recommend downloading the latest version of this project that matches the version of the ISE tools you have installed.


  • v1.4 (Mar 2014):
    • Updated project for XPS/SDK 14.4 and later (works through 14.7, the latest and last ISE release)
  • v1.3 (Feb 2013):
    • Updated w3_clock_controller to v3.01b
      • New at_boot_clock_in_valid port delays at_boot config until 200MHz clock is stable
      • CM-MMCX switches must both be 0 (down) to select off-board sampling clock source
    • Removed duplicate LOC constraints from UCF
  • v1.2 (Jan 2013):
    • Updated WARP v3 pcores to latest versions (ad_controller, clock_controller, radio_controller, ad_bridge)
    • Added support for CM-MMCX clock module and config-time clock source selection via switch
    • Renamed EEPROM controller instance to w3_iic_eeprom_onBoard, to disambiguate when another instance is used for FMC EEPROM
    • Routed 200MHz clk to w3_clock_controller "at boot" logic, to select master clock source before MMCMs attempt lock
    • Added constraints for unused bi-directional I/O for radio_controller RFC/RFD SPI SDIO (XPS forces these to pins, even when unsed)
  • v1.1 (Nov 2012)
    • Swapped LSB/MSB for DIP switch, so LSB is right-most switch
    • Updated Ethernet constraints for ETH_A MDIO signals
    • Disabled MicroBlaze hardware divider by default (C_USE_DIV = 0)
  • v1.0 (Aug 2012)
    • Initial release of template project



ISE 13.4

Please see TemplateProjects/13p4 for previous release of the template projects for XPS/SDK 13.4.

Other Projects

The XPS/SDK projects for the latest 802.11 Reference DesignWARPLab Reference Design, and OFDM Reference Design are also available. These are all more complex than the template project above but use the same tools and design flows.




그밖의 프로젝트들이 위와 같이 많이 존재하지만, 후에 우리는 802.11 레퍼런스 디자인에 대해서 집중적으로 분석해볼 예정입니다. 






+ Recent posts