The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

Application Note ability update firmware over Ethernet common fea


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



Remote Configuration Over Ethernet with Nios Processor
Application Note
ability update firmware over Ethernet common feature today's embedded systems. classic embedded systems (comprised discrete microprocessor devices controlled), word "firmware" applied update software image that microprocessor running. FPGAs embedded remote update possibilities increase. This especially true systems that contain Nios® soft processor, because upgrade both Nios processor part FPGA image) software that runs remote configuration session. This application note presents methodology implementing remote configuration Nios II-based systems. TFTP (Trivial File Transfer Protocol) used upload images (software, hardware, binary data) system trigger reconfiguration.
Prerequisites
This document targets systems engineer wants design system remote configuration. also provides simple application that uses Nios software implement basic remote configuration features.
Knowledge Requirements
This discussion remote configuration assumes that have following:
Knowledge network programming (preferably sockets-based). Knowledge TFTP protocol plus, though brief description remote configuration example works will given. working knowledge Nios subsystems tools necessary build them.
These systems tools include Quartus® software, SOPC Builder, Nios Embedded Design Suite (EDS).
Altera Corporation AN-429-1.0
Preliminary
Remote Configuration Over Ethernet with Nios Processor
Knowledge Altera configuration methodologies.
Refer 346: Using Nios Development Board Configuration Controller Reference Designs information relevant this application note. particular, attention section remote Ethernet updating.
Experience using Nios flash programmer either through command line interface.
Refer Nios Flash Programmer User Guide further details.
Requirements Software Example
software example described this application note, must have following:
Nios development kits.
1C12 Nios Evaluation supported.
computer with TFTP client installed. (The TFTP client found using Internet search.) Windows, there multiple TFTP clients available. convenience, such client included with this application note. Linux UNIX, there multiple TFTP clients that freely available. TFTP client command lines this document provided example purposes only. Your client require different command line proper operation. file an429_rc_collateral.zip, which contains necessary collateral: ReadMe.txt-describes files tftp.exe-the TFTP client Windows remote_config.zip-the software example referenced later this document Sample flash images (hardware, software, binary) upload.
Preliminary
Altera Corporation
High-Level Description
remainder this document discusses following topics:
"High-Level Description" page "Software Example Explanation" page "Software Example Walkthrough" page "Useful Information" page "Conclusion" page
High-Level Description
Nios subsystem, remote configuration consists four steps: Preparing images Uploading images Programming images flash Triggering reconfiguration
following sections discuss methods chosen, they were chosen, present possible alternatives.
Preparing Images
have programmed flash your design, probably already have files necessary remotely update your design images. fact, software images automatically created every time build your project Nios IDE. Before programming flash, Nios flash programmer creates flash files using three commands:
elf2flash (software images) bin2flash (binary images) sof2flash (FPGA configuration images)
Here sample command create software flash image: elf2flash --base=<base flash address> -end=<end flash address> -reset=<Nios reset address> -input=<project>.elf -output=<flash name>.flash -boot=<path boot copier srec>
other commands have similar options. details, refer Nios Flash Programmer User Guide.
Altera Corporation
Preliminary
Remote Configuration Over Ethernet with Nios Processor
flash file format uses Motorola's S-Record format. addressing relative base address destination flash device. target side, only need know which flash target programming. also concatenate multiple flash images (software, binary, SOF/FPGA configuration) then remotely update them once, provided that they destined same flash. When your system configured boot from EPCS device, following requirements apply:
Reset Address, SOPC Builder, must base address EPCS controller component. hardware software flash images must concatenated prior remotely updating images.
this case, update hardware software separately, because hardware software images share same sector, with provided EPCS boot scheme.
Uploading Images
TFTP accepted standard remotely updating embedded systems over Ethernet. TFTP lightweight protocol that commonly implemented (User Datagram Protocol). Extending this common methodology provide remote configuration update capabilities straightforward. sample command line from host computer follows: tftp <target hostname address> ext_flash.flash This command causes target (Nios system software) receive file program flash. This operation covered more detail "Updating Images Remotely" page
Programming Images Flash
Nios Embedded Design Suite includes Hardware Abstraction Layer (HAL), which gives layer abstraction task flash programming. Using flash routines, programming algorithm becomes four-step task, including optional step: Gather data want program into buffer. (optional) Determine data that already flash identical. skip programming. Determine flash block needs erased.
Preliminary
Altera Corporation
Software Example Explanation
Programming writing flash only change bits from Erasing flash sector/block sets bits that value then programmed.
Write program flash. low-level actions different each type flash (CFI EPCS), consolidates this into single command: alt_write_flash_block().
Triggering Reconfiguration
Triggering reconfiguration event necessary force system reconfigure reboot after successfully uploading hardware, software, binary data images. TFTP request file with name reconfig, following example: tftp <target hostname address> reconfig Issue this request start sequence events that initiates reconfiguration. Most Altera Nios development boards contain that acts configuration controller. Both standard full-featured reference designs (shipped part Nios EDS) contain parallel input/output (PIO) named reconfig_request_pio that connected PLD. Drive this force reset. specifics this done covered "Triggering Reconfiguration" page this example software causes reconfiguration.
Software Example Explanation
This section describes technical details what happens target Nios II-based design, response host TFTP client commands.
Updating Images Remotely
When TFTP command "PUT" upload flash file given, following process takes place: target software receives TFTP (write request) packet. target software validates that file .flash extension.
file extension other than .flash, (file found) error message sent process ends.
target sends (acknowledgement) packet back host.
Altera Corporation
Preliminary
Remote Configuration Over Ethernet with Nios Processor
host responds this sending first DATA packet (512-byte payload). receipt this DATA packet, target performs following steps: Copies payload into buffer. Parses this S-Record buffer programs data line-by-line flash. Returns completion.
host target cycle through steps until host sends DATA packet that less than 512-bytes. This standard TFTP method terminating DATA transmission. target completes parsing programming this last buffer prints message stating programming been completed.
Triggering Reconfiguration
When TFTP command issued "GET" file named reconfig, following events take place: target software receives TFTP (read request) packet. target software looks reconfig filename. other filename causes error. reconfig file requested, target starts reconfiguration process Writing reconfig_request_pio's base address (this data register). Writing reconfig_request_pio's direction register.
This tells bidir drive reconfig_request_pio's output. This PIO's output connected PLD's reconfig request line, which starts reconfiguration process when driven LOW.
Preliminary
Altera Corporation
Software Example Explanation
Understanding Software Example Files
brief description software example's files their functions follows:
ReadMe.txt-Description accompanying software example. alt_error_handler.c, alt_error_handler.h-Contains error handling LWIP, uC-OSII, Remote Configuration Application portions this software example. flash_utilities.c, flash_utilities.h-ProgFlash() GetFlashName() flash programming functions. header file flash_utilities.h contains DEFAULT_FLASH_TYPE. should edit this variable necessary your system. default value CFI. also have modify GetFlashName() function match flash name(s) your system.
lwip_init.c, network_utilities.c-Contains LWIP Ethernet device initialization, address routines, address acquisition routine. These functions similar routines provided Simple Socket Server example, which included Nios Embedded Design Suite. Refer this software example further explanation.
remote_config.c, remote_config.h-Contains TFTP server handler these files. TFTP commands controlled tftp_fsm() function. srec_utilities.c-Contains S-Record parsing routines, ParseSRECBuf() ParseAndProgramLine().
further details code operates, please refer comments source code ReadMe.txt file.
Altera Corporation
Preliminary
Remote Configuration Over Ethernet with Nios Processor
Software Example Walkthrough
this example, functionality this remote configuration implementation contained within associated software example, remote_config.zip. This file available
Ethernet Considerations
Because provided software example based industry standard sockets interface style network programming, code portable between Ethernet hardware TCP/IP network stacks. general, your network stack functional, should have problems getting this application work. following configuration tested with this example: Hardware SMSC LAN91C111 MAC/PHY TCP/IP Stack LWIP implemented uC-OSII
Programming Your Device Running Code
following steps allow remotely configure your Nios development board. board's Ethernet port must connected your computer's network order this application work. Unzip file remote_config.zip your software examples directory. This action adds "Remote Configuration" another C/C++ template Nios IDE. Quartus software, open standard full_featured reference design your board. Program your board with design selected.
Refer Quartus Help details about programming your board.
Tools menu, click SOPC Builder. Click System Generation tab. Click Nios IDE.
Preliminary
Altera Corporation
Software Example Walkthrough
Create "Remote Configuration" C/C++ application from within IDE.
Refer Nios Help information about creating applications.
Build project. ext_flash.flash file created that will used later.
Program project (and FPGA configuration) flash. Tools menu, click Flash Programmer.
Refer Nios Flash Programmer User Guide more details about program flash.
Download application your board using Nios press Reset Config button your development board. choose latter, must nios2-terminal from within Nios command shell target's responses.
Observe your running application. Here output from successful session: TFTP-based Remote Configuration starting Your Ethernet address 00:07:ed:ff:8f:10 Using DHCP find Address Assigned Address 192.168.1.41
Updating Images Remotely
Using either provided TFTP client your TFTP client, upload file (flash image) target. target receives image programs flash. this example, upload ext_flash.flash file that created step Before running tftp command, change directories Release directory your remote configuration project IDE. sample session follows: Host-side input: tftp 192.168.1.41 ext_flash.flash
Altera Corporation
Preliminary
Remote Configuration Over Ethernet with Nios Processor
Target-side response: Receiving flash file. Flash Name /dev/ext_flash. Block size 65536 bytes. Programming Flash. Flash Block 0x00000000: 0x00002000: 0x00004000: 0x00006000: 0x00008000: 0x0000A000: 0x0000C000: 0x0000E000: Flash Block 0x00010000: 0x00012000: 0x00014000: 0x00016000: 0x00018000: 0x0001A000: 0x0001C000: 0x0001E000: Flash Block 0x00020000: 0x00022000: 0x00024000: 0x00026000: 0x00028000: 0x0002A000: 0x0002C000: Finished Programming. Follow same steps other images want update. also update hardware image (standard.flash full_featured.flash) with this procedure.
Preliminary
Altera Corporation
Software Example Walkthrough
Triggering Reconfiguration
After have updated your images, following TFTP command line reconfigure FPGA device. command resets restarts your software. Host-side input response: tftp 192.168.1.41 reconfig Error server Nios Based System will reconfigure!!! error intentional. application using TFTP error packet send reconfiguration message back host. Target-side response: This stream characters result resetting reconfiguring system while connected nios2-terminal. this stream characters from within IDE, click Stop. this from command shell, perform CTRL-C terminate connection. Reconnecting your board with nios2-terminal displays following output: TFTP-based Remote Configuration starting Your Ethernet address 00:07:ed:ff:8f:10 Using DHCP find Address Assigned Address 192.168.1.41 This message indicates that have successfully updated reconfigured your system remotely.
Altera Corporation
Preliminary
Remote Configuration Over Ethernet with Nios Processor
Useful Information
following sections contain information several related topics.
Flash Image Locations
must define flash's base address remote configuration application know where your flash located. Perform following steps define this base address: Modify DEFAULT_FLASH_TYPE flash_utilities.h. Modify GetFlashName() function match your flash name SOPC Builder.
example, your flash device compliant named my_flash your SOPC Builder system, could DEFAULT_FLASH_TYPE variable flash_utilities.h follows: #define DEFAULT_FLASH_TYPE Your GetFlashName() function would contain: static GetFlashName(char line[30], flash_type) (flash_type CFI) strcpy(line, "/dev/my_flash\0"); else (flash_type EPCS) strcpy(line, "/dev/epcs_controller\0"); return only need this once your custom system.
Simple Configuration Options
Though Altera Nios development boards additional configuration controller board, this necessity reconfiguration. should able design board with following elements configuration/reconfiguration purposes:
Ethernet MAC/PHY) Ethernet access EPCS device (for configuration) Your FPGA Other design-specific components
Preliminary
Altera Corporation
Conclusion
your FPGA, wire nCONFIG reconfig_request such your SOPC Builder system. Pulsing this initiates reconfiguration. code accompanying software example used starting point your remote configuration software. After reading this application note studying accompanying software example, should able modify your existing code support this feature. There three main components code software example:
TFTP Server S-Record Parsing Flash Programming
TFTP Server tightly integrated with TCP/IP stack. S-Record Parsing flash programming accessed through following functions:
S-Record Parsing ParseSRECBuf( char* buf, buf_size
Flash Programming ProgFlash( flash_type, target_addr, char* data, data_len
Data Consistency Verification
software example provided checks that data being received correct calculating verifying S-Record checksum dynamically). However, does verify image after been written flash. TFTP server functionality extended support image verification perhaps, checksum calculation. This very similar what already being done trigger reconfiguration.
Conclusion
This application note provided with enough information implement your Nios II-based remote configuration system. Because Nios processor softcore processor, updating processor, entire subsystem, custom logic just matter updating FPGA's hardware image re-configuring. Remote configuration enables perform network-based updates massive scale extends your product's life cycle allowing change both hardware software field.
Altera Corporation
Preliminary
Remote Configuration Over Ethernet with Nios Processor
Innovation Drive Jose, 95134 (408) 544-7000 www.altera.com Applications Hotline: (800) 800-EPLD Literature Services: literature@altera.com
Copyright 2006 Altera Corporation. rights reserved. Altera, Programmable Solutions Company, stylized Altera logo, specific device designations, other words logos that identified trademarks and/or service marks are, unless noted otherwise, trademarks service marks Altera Corporation U.S. other countries. other product service names property their respective holders. Altera products protected under numerous U.S. foreign patents pending applications, maskwork rights, copyrights. Altera warrants performance semiconductor products current specifications accordance with Altera's standard warranty, reserves right make changes products services time without notice. Altera assumes responsibility liability arising application information, product, service described herein except expressly agreed writing Altera Corporation. Altera customers advised obtain latest version device specifications before relying published information before placing orders products services.
Preliminary
Altera Corporation

Other recent searches


WP000905-0308 - WP000905-0308   WP000905-0308 Datasheet
TMS320VC5507 - TMS320VC5507   TMS320VC5507 Datasheet
5509 - 5509   5509 Datasheet
RUE110 - RUE110   RUE110 Datasheet
ICS8530I-01 - ICS8530I-01   ICS8530I-01 Datasheet
APTGF50X60E2 - APTGF50X60E2   APTGF50X60E2 Datasheet
APTGF50X60P2 - APTGF50X60P2   APTGF50X60P2 Datasheet
2SK315 - 2SK315   2SK315 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive