IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM

Page created by Guy Meyer
 
CONTINUE READING
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084              Volume-2, Issue-7, July-2014

      IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY
     INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT
                           SYSTEM
       1
           MANJUNATH P S, 2DEBASHIS JENA, 3HEMANTH S J, 4CHETAN R, 5RAHUL LALMANI
     1,2,3,4
            Dept. of Telecommunication Engineering, BMS College of Engineering, 5Scientist, LRDE, DRDO, Bangalore
                                          E-mail: manjunathps.tce@bmsce.ac.in

Abstract- The paper benevolences interfacing application program between Radar controller and Display in Nios II IDE.
NIOS II IDE uses NicheStack TCP/IP stack which is to be implemented and to be analyzed for data rate and communication
overhead which provides immediate access to a stack for Ethernet connectivity for the Nios II processor. Signal Processor
Controller uses Nios II processor for sending and receiving data via Ethernet. The focus of the NicheStack TCP/IP Stack
implementation is to reduce resource usage while providing a full-featured TCP/IP stack. Nios II is Altera’s Second
Generation Soft-Core 32 Bit RISC Microprocessorwhich provides flexibility to add features to enhance performance or
conversely eliminate processor features and peripherals to fit the design in a smaller, low-cost device. The implementation of
Nichestack is carried out using the software Nios II software build tools for eclipse and Quartus II provided by Altera.
Successful transfer of real time radar data is demonstrated between the NIOS II acting as the radar controller (client) and a
Host PC acting as display (server) and the data rate is analysed.

Keywords- NIOS II IDE, NicheStack TCP/IP, RISC, Quartus II

I.    INTRODUCTION

NIOS IIis a 32-bit embedded-processor architecture
designed specifically forAltera family of FPGAs
which incorporates many enhancements over the
original Nios architecture, making it more suitable for
a wider range of embedded computing applications,
from DSP to system-control. A Nios II processor
system is equivalent to a microcontroller or
“computer on a chip” that includes a processor and a
combination of peripherals and memory on a single
chip. Nios II processor systems use a consistent
instruction set and programming model.                                                 Fig. 1 Nios II Processor System
Getting started with the Nios II processor is similar to
any other microcontroller family. The easiest way to                   The processor peripherals can be classified into t
start designing effectively is to purchase a                           Standard      peripherals      and     other     Custom
development kit from Altera that includes a ready-                     peripherals.Standard peripherals are timers, serial
made evaluation board and the Nios II Embedded                         communication interfaces, general purpose I/O and
Design Suite (EDS) containing all the software                         other memory interfaces. Custom peripherals are
development tools necessary to write Nios II                           created to integrate with Nios II processor. This
software.                                                              approach offers a double performance benefit, the
                                                                       hardware implementation is faster than software; and
The Nios II EDS includes two closely-related                           the processor is free to perform other functions in
software development tool flows:                                       parallel while the custom peripheral operates on data.
                                                                       Nios II architecture supports a flat register file,
     The Nios II SBT
                                                                       consisting of thirty two 32-bit general-purpose integer
     The Nios II SBT for Eclipse
                                                                       registers, and up to thirty two 32-bit control registers.
                                                                       Arithmetic Logic Unit (ALU) operates on data stored
Nios II SBT provides a command line interface
                                                                       in general-purpose registers. ALU operations take
andNios II SBT for Eclipse provides a familiar and
                                                                       one or two inputs from registers, and store a result
established environment for software development.
                                                                       back in a register. The flexible nature of the Nios II
Using the Nios II hardware, reference designs can
                                                                       memory and I/O organization are the most notable
prototype an application running on a board before
                                                                       difference between Nios II processor systems and
building a custom hardware platform. Figure 1shows
                                                                       traditional microcontrollers. The Nios II architecture
an example of a Nios II processor reference design
                                                                       hides the hardware details from the programmer, so
available in an Altera Nios II development kit.
                                                                       programmers can develop Nios II applications

               Implementation of Radar Controller and Display Interface using Nichestack and Nios Ii Development System

                                                                  29
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084             Volume-2, Issue-7, July-2014

without specific         knowledge       of    the    hardware
implementation.

II.     NIOS II - STARTIX II EDITION

The Stratix® II FPGA family is based on a 1.2-V, 90-
nm, all-layer copper SRAM process and features a
new logic structure that maximizes performance, and
enables        device       densities       approaching
180,000equivalent logic elements (LEs) offering up
to 9 Mbits of on-chip, TriMatrix™ memory for
demanding, memory intensive applications and has
up to 96 DSP blocks with up to 384 (18-bit × 18-bit)
multipliers for efficient implementation of high
performance filters and other DSP functions. Stratix
                                                                                       Fig. 2 Niosdevelopment board
II devices are also the industry’s first FPGAs with the
ability to decrypt a configuration bit stream using the
Advanced Encryption Standard (AES) algorithm to                        III.     MICROC/OS-II REAL-TIME OS
protect designs. The Nios development board, Stratix
II Edition, provides a hardware platform for                           MicroC/OS-II is a popular real-time kernel produced
developing embedded systems based on Altera Stratix                    by MicriumIncwhich is a portable, ROMable,
II devices.                                                            scalable, pre-emptive, real-time, multitasking kernel
                                                                       which provides services like Tasks (threads), Event
                                                                       flags,Message passing, Memory& Time management,
 Basic components of the NIOS II Startix board
                                                                       Semaphores.
include Ethernet MAC/PHY (U4):Is a mixed signal
analog/digital device that implements protocols at 10
                                                                       MicroC/OS-II development for the Nios II processor
Mbps and 100 Mbps.
                                                                       allows programs to port to other Nios II hardware
                                                                       systems.
Individual LEDs (D0 - D7): connected to general
purpose I/O pins on the Stratix II device. When the
Stratix II pin drives logic 1, corresponding LED turns                 3.1 Software Architecture
on. Seven-Segment LEDs (U8 & U9): U8 and U9 are
connected to the Stratix II device so that each                        The onion diagram in Figure 3 shows the
segment is individually controlled by a general-                       architectural layers of a Nios II MicroC/OS-II
purpose I/O pin. When the Stratix II pin drives logic                  software application.
0, the corresponding LED turns on.

SRAM Memory (U35 & U36): Are IDT
IDT71V416S, 512 Kbyte x 16-bit asynchronous
SRAM devices used as general-purpose memory. The
two 16-bit devices can be used in parallel to
implement a 32-bit wide memory subsystem. The
SRAM devices share address and data connections
with the flash memory and the Ethernet MAC/PHY
device.
Flash Memory (U5):is a 16 Mbyte AMD
AM29LV128M flash memory device connected to                                            Fig. 3 Layered Software Model
the Stratix II device.
                                                                       Each layer encapsulates the specific implementation
Configuration & Reset Buttons: The Nios                                details of that layer, abstracting the data for the next
development board uses dedicated switches SW8 for                      outer layer. The list describes each layer:
reset for CPU, SW9 re configurethe Stratix II device
with the factory configuration and SW10 for the                        Nios II processor system hardware - The core of the
power-on reset button.                                                 onion diagram represents the Nios II soft-core
                                                                       processor and hardware peripherals implemented in
JTAG Connectors (J24 & J5): Each JTAG header                           the FPGA.
connects to one Altera device and forms a single-
device JTAG chain. J24 connects to the Stratix II                      Software device drivers - Contains the software
device (U60), and J5 connects to the EPM7128AE                         functions that manipulate the Ethernet and hardware
device (U3).                                                           peripherals. These drivers know the physical details

               Implementation of Radar Controller and Display Interface using Nichestack and Nios Ii Development System

                                                                  30
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084             Volume-2, Issue-7, July-2014

of the peripheral devices, abstracting those details                   IV.      NICHESTACKTCP/IP STACK
from the outer layers.
                                                                       The NicheStack® TCP/IP Stack - Nios® II Edition is
HAL API - The Altera Hardware Abstraction Layer                        a small-footprint implementation of the TCP/IP suite
(HAL) application programming interface (API)                          which is to reduce resource usage while providing a
provides a standardized interface to the software                      full-featured TCP/IP stack. Altera provides the
device drivers, presenting a POSIX-like API to the                     NicheStack TCP/IP Stack as a software package that
outer layers.                                                          is added to board support package (BSP), available
                                                                       through the Nios II Software Build Tools (SBT).
MicroC/OS-II - The MicroC/OS-II RTOS layer
provides multitasking and intertask communication                      The NicheStack TCP/IP Stack includes many features
services to the NicheStackTCP/IP Networking Stack                      like Internet Protocol (IP) including packet
and the Nios II Simple Socket Server.                                  forwarding over multiple network interfacesInternet
                                                                       control message protocol (ICMP) for network
NicheStack TCP/IP Stack software component -                           maintenance and debugging User datagram protocol
provides networking services to the application layer                  (UDP)Transmission Control Protocol (TCP) with
and application-specific system initialization layer via               congestion control, round trip time(RTT) estimation,
the sockets API. Application-specific system                           and fast recovery and retransmitDynamic host
initialization - The application-specific system                       configuration protocol (DHCP)Address resolution
initialization layer includes the MicroC/OS-II and                     protocol (ARP) for EthernetStandard sockets
NicheStack TCP/IP Stack software component                             application program interface (API) The NicheStack
initialization functions invoked from main(), as well                  TCP/IP Stack provides immediate access to a stack
as creates all application tasks, and all of the                       for Ethernet connectivity for the Nios II processor
semaphores, queue, and event flag RTOS inter-task                      and uses the MicroC/OS-II RTOS multithreaded
communication resources.                                               environment.

Application- The outermost application layer contains                  V.     NIOS II SOFTWARE DEVELOPMENT
the Nios II Simple Socket Server task and LED
management tasks. Socket: Sockets provide an                           Before we can start building a software project in
interface for programming networks at the transport                    NIOS II SBT for Eclipse we create the hardware for
layer. It is an interface between an application                       the system using the Quartus II and SOPC Builder
process and transport layer. The application process                   software.
can send/receive messages to/from another
application process (local or remote) via a socket.                    The main output produced by generating the
                                                                       hardware for the system is the SRAM Object File
3.2 Client/Server Communication                                        (.sof), which is the hardware image of the system, and
Generally, programs running on client machines                         the SOPC Information File (.sopcinfo), which
make requests to a program (often called as server                     describes the hardware components and connections.
program) running on a server machine. The most                         This software generation tools use the (.sopcinfo) file
widely used programming interfaces for TCP/IP                          to create a BSP project.
protocols are sockets.Servers and clients have
different behaviors therefore the process of creating                  The BSP project is a collection of C source, header
them is different. What follows is the general model                   and initialization files, and a makefile for building a
for creating a streaming TCP/IP server and client.                     custom library for the hardware in the system. The
The steps in creating (and difference between) server                  NIOS IIsoftware development flow is shown in figure
and client sockets is shown in figure 4.                               5.

                                                                       6.2 The NIOS II Software Build Tool (SBT) for
                                                                       Eclipse: Is an easy-to-use GUI (Graphical User
                                                                       Interface) that automates, build and make file
                                                                       management and integrates Nios II flash programmer
                                                                       and the Quartus II Programmer.

                                                                       We use the Nios II SBT for Eclipse to compile a
                                                                       simple C language program for Client to run on the
                                                                       Nios II standard system configured in the FPGA on
                                                                       your development board. We create a new software
                                                                       project, build it, and run it on the target hardware and
                                                                       also edit the project, re-build it, and set up a
              Fig 4. Flow in Client Server Model
                                                                       debugging session.

               Implementation of Radar Controller and Display Interface using Nichestack and Nios Ii Development System

                                                                  31
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084             Volume-2, Issue-7, July-2014

                                                                       After creating a new project, the Nios II SBT for
                                                                       Eclipse creates the following new projects in the
                                                                       Project Explorer view:

                                                                       Client is the application project. Client_bspis the
                                                                       board support package (BSP) for our Nios II system
                                                                       hardware. The BSP includes following details:

                                                                       Component device drivers for the Nios II hardware
                                                                       system, Nios II hardware abstraction layer (HAL),
                                                                       NicheStack TCP/IP Network Stack, Nios II Edition,
          Fig. 5 NIOS II Software Development Flow                     Nios II host file system, Nios II read-only zip files
                                                                       system, Micrium’s MicroC/OS-II real-time operating
VI.       IMPLEMENTATION
                                                                       system (RTOS), system.h which is a header file that
                                                                       encapsulates your hardware system alt_sys_init.c
The implementation of the project is considered as a
                                                                       which is an initialization file that initializes the
block diagram as shown in figure 6.
                                                                       devices in the system, linker.h which is a header file
                                                                       that contains information about the linker memory
                                                                       layout.

                                                                       6.2 Building and Running the Nios II Simple
                                                                       Socket Client Project
                                                                       In this section we build the application, configure the
                                                                       development board with a hardware design, and
                                                                       download the executable software file to the FPGA
                                                                       on the board. To build and run the application,
                                                                       perform the following steps:

                 Fig. 6 Project block diagram                          Configure the FPGA on the development board by
                                                                       performing the following steps:
6.1 Nios II SBT for Eclipse Flow
Creating Project Client                                                On the Nios II menu, click Quartus II Programmer.
Open the application software NIOS II SBT for                          In the Quartus II Programmer dialog box, Click on
Eclipse from the installed directory.                                  Add File and Browse .sof file. Information for the file
On the blank SBT window click File > New >Nios II                      appears in the Quartus II Programmer dialog box.
Application and BSP from Template.                                     Verify Program/Configure is on. Click Start to
The Nios II Application and BSP from Template                          configure the FPGA on the development board.
wizard appears. For SOPC Information File name,
browse to and open the SOPC                         On the File menu, click Exit to close the Quartus II
Information File (.sopcinfo) for the design.                           Programmer and return to the Nios II SBT for
                                                                       Eclipse. If you receive a message that asks if you
                                                                       want to save the changes to the chain1.cdf file, click
                                                                       No.

                 Fig. 7. Creating Project Client
                                                                                   Fig. 8 Verify Program/Configure is on
In the Project name box, type Client.
Click Finish. The Nios II SBT for Eclipse creates the                  To build the program, right-click the Client project in
project and returns to the Nios II perspective.                        the Project Explorer view, and click Build Project.
               Implementation of Radar Controller and Display Interface using Nichestack and Nios Ii Development System

                                                                  32
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084                Volume-2, Issue-7, July-2014

The Build Project dialog box appears and the Nios II                   VII.        RESULTS
SBT for Eclipse begins compiling the project. When
compilation completes, the message “Build                              After running both the client and server programs
completed” appears in the Console view. The                            data could be successfully transferred. Figure 12 and
completion time varies depending on your system.                       Figure 13 below shows the output windows on
                                                                       compilation and running of client and server
                                                                       programs.

     Fig. 9 To build a program and complete compilation
                                                                                    Fig. 12. Output window on compilation
To run the program, right-click Client, point to Run
As, and click Nios II Hardware. The Nios II SBT for
Eclipse downloads the program to the FPGA on the
target board and executes the code.

                                                                              Fig. 13. Output window running of client and server
                                                                                                  programs.

       Fig. 10. To run the program and execute the code                CONCLUSION AND FUTURE SCOPE
The work is carried out to implement interfacing                       The interface developed provides full duplex
application program between Radar controller and                       communication at high data rate between client and
Display in Nios II IDE that uses NicheStack TCP/IP.                    server. There is seamless communication between
The NicheStack TCP/IP Stack provides immediate                         client and server. The processor used provides
access to a stack for Ethernet connectivity for the                    flexibility to its users. The protocol used provides
Nios II processor. Signal Processor Controller uses                    greater advantages to embedded systems with
Nios II processor for sending and receiving data via                   minimal resources. The use of Nichestack reduces
Ethernet. NicheStack is used for Ethernet                              resource usage of the embedded system. The protocol
connectivity. We have successfully demonstrated the                    facilitates embedded systems to use the Ethernet. The
transfer of data from a client which is run on the                     interface developed is used presently in electronic
NIOS II processor and a server run on Microsoft                        war-fare systems and in other general applications of
Visual C++ on a host PC. Figure 11 shows the basic                     embedded systems. Mainly it is implemented in
working of our project.                                                sending and receiving data to and from radar
                                                                       controller to the display. Many challenges have been
                                                                       investigated in the past few years to make network
                                                                       communications more reliable, scalable, standardized
                                                                       and higher performance. As it is new concept there is
                                                                       a lot of scope in future to enhance network
                                                                       performance by using Nichestack TCP/IP protocol.

                                                                       REFERENCES

                                                                        [1]    Altera’s Nios II Processor Reference Handbook.
                    Fig. 11. Working Model                              [2]    Altera’s Nios II software Developer’s Handbook.

               Implementation of Radar Controller and Display Interface using Nichestack and Nios Ii Development System

                                                                  33
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
International Journal of Electrical, Electronics and Data Communication, ISSN: 2320-2084             Volume-2, Issue-7, July-2014
 [3]   MicroC/OS-II, The Real-Time Kernel textbook by Jean J.           [6]   www.tenouk.com/Winsock
       Labrosse.
                                                                        [7]   Key Engineering Materials ;Vol 464,20Jan2011;PP: 237-
 [4]   Beej’s Guide to Network Programming. Let Us C by                       240Xiao Fei Wang; Bo Quan Li;
       YashwantKanetkar.
                                                                        [8]   Hai Bin PanDesign of Signal Processing System for
 [5]   www.altera.com                                                         Doppler Speed Radar Based on Sopc.

                                                                

               Implementation of Radar Controller and Display Interface using Nichestack and Nios Ii Development System

                                                                  34
IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM IMPLEMENTATION OF RADAR CONTROLLER AND DISPLAY INTERFACE USING NICHESTACK AND NIOS II DEVELOPMENT SYSTEM
You can also read