![Page 1: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/1.jpg)
Web Server Implementation On DE2
Final Presentation Performed by:
Ariel MoraliNadav Malki
Supervised by:Ina Rivkin
![Page 2: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/2.jpg)
Project GoalsProject Goals
• Assemble a SOPC system, using Nios II processor and an Ethernet Peripheral on Altera’s DE2 board.
• Implement Micrium’s µC OS-II.• Implement Nichestack TCP/IP Stack.• Build a webserver and a website that
demonstrates the system’s abilities.
![Page 3: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/3.jpg)
Project SchemeProject SchemeE
ther
net
Cab
leE
ther
net
Cab
le
![Page 4: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/4.jpg)
The SOPCThe SOPC
• The SOPC includes: Nios II Processor Ethernet Controller External SDRAM Memory UART PLL PIOs (Seven-Segments & LEDs)
![Page 5: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/5.jpg)
Micrium’s µC OS-IIMicrium’s µC OS-II• Mainly for embedded systems• Main features:
• Scalable (5-24KB)• Real time• Pre-emptive multitasking• Priority based• Limited (but big enough) number of tasks
• Supply OS services:• Semaphores and mutexes• Message mailboxes and queues• Timer and memory management
![Page 6: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/6.jpg)
Nichestack TCP/IP stackNichestack TCP/IP stack• NicheStack is an Embedded TCP/IP protocol stack.• NicheStack IPv4 combines small size, extreme portability and
high performance.• NicheStack uses the µC OS Multiprogramming feature.• The DE2 board has a Davicom DM9000A Ethernet controller,
that is not supported by the Nichestack.
![Page 7: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/7.jpg)
The SoftwareThe Software• The software includes:
Micrium’s µC OS-II System Libraries Nichestack TCP/IP Stack Read Only zip File-System Webserver implementation HTML website
• The website demonstrates the system capabilities: Remote controlling the DE2 board Monitoring the board’s status Running several processes in parallel Remote Using the SOPC processor to perform simple
computations
![Page 8: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/8.jpg)
System OverviewSystem Overview
![Page 9: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/9.jpg)
Block DiagramBlock Diagram
The following diagram describes the System:
![Page 10: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/10.jpg)
Quartos Screen ShotQuartos Screen Shot
![Page 11: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/11.jpg)
SOPC Builder Screen ShotSOPC Builder Screen Shot
![Page 12: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/12.jpg)
Ethernet Controller & NichestackEthernet Controller & Nichestack
• The DE2 board has a Davicom DM9000A Ethernet controller.
• In order to use the TCP/IP protocol we planed to use the Nichestack TCP/IP stack.
• DM9000A is not supported by the Nichestack.• A group from Columbia University modified the
original DM9000A Driver to work with the Nichestack.
• We successfully managed to take the driver and use it in our project.
![Page 13: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/13.jpg)
Website & ServerWebsite & Server
![Page 14: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/14.jpg)
Webserver Main ProcessesWebserver Main Processes
1) Webserver main task – Manage the TCP/IP and HTTP protocols.
2) Nichestack tasks.3) Two board Control tasks – Handling the data from
the web site.4) Board status task – Monitors the Board status and
creates an appropriate html page.5) Two “sweep leds” tasks.
![Page 15: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/15.jpg)
Site Main ScreenSite Main Screen
Two Board Control Tasks Running in parallel
![Page 16: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/16.jpg)
Site Board Over-View ScreenSite Board Over-View Screen
Switches Status
Seven Segment Status
![Page 17: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/17.jpg)
What Happens When you press the Button What Happens When you press the Button
1) The Browser ends the form to the webserver. Wireshark screenshot:
2) The webserver detects a POST request. The POST request is being sent when a client needs to send data to the server (according to the HTTP protocol).
Computer IP
DE2IP
HTTPPORT
Form Data
![Page 18: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/18.jpg)
What Happens When you press the Button What Happens When you press the Button Continue…Continue…
2) The webserver process wakes up one of the board control processes, by sending it a message. The message contains information about the operation needed to be performed.
3) The board control process handles the message and performs the requested operation. Then the board control process waits for new message.
![Page 19: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/19.jpg)
Skills AcquiredSkills Acquired• Multiprogramming with µC OS-II Multiprogramming with µC OS-II
creating and maintaining several processescreating and maintaining several processes Synchronization - sending messagesSynchronization - sending messages And more…And more…
• Nichestack on DE2 implemantation.Nichestack on DE2 implemantation.• TCP/IP socket programming with Nichestack.TCP/IP socket programming with Nichestack.
open, close, listen, connect, send, …open, close, listen, connect, send, …• HTTP ProtocolHTTP Protocol
WireShark Helped a lot.WireShark Helped a lot.• Read Only ZIP File System (stores our html pages).Read Only ZIP File System (stores our html pages).• Html programmingHtml programming• And more…………And more…………
![Page 20: Web Server Implementation On DE2 Final Presentation](https://reader035.vdocument.in/reader035/viewer/2022062321/56812b62550346895d8f8389/html5/thumbnails/20.jpg)
Thank YouThank You