A Process Model of Developing Micro- code for a Network Processor

advertisement
A Process Model of Developing Microcode for a Network Processor
18.10.2005 Jani Koski
Author: Jani Koski
Supervisor: Prof. Raimo Kantola
Instructor: M.Sc Marko Lohjala
1
© NOKIA
18-10-2005
Contents
• Introduction to the study
•
•
•
Network device
Network Processor (NP)
Micro code for NP
• Why research was made
• Research problem
•
•
How to make micro code?
Micro code SW process?
• Research method
•
•
Search best SW model from literature
Let’s take to account the nature of Micro code, environment, etc
=> case study
• Case study
•
•
•
•
2
© NOKIA
Project analysis
NP analysis
Micro code analysis
The result
18-10-2005
Network device
Switching fabric
Packet processing
Quenue
Fast
Ethernet
STM-1
NP
Giga
Ethernet
Compressing/Encryption
Host
processing
Modification
Lookup/classification
Parcing/framing
PHY
Transmission medium
Network Processor (NP)
3
© NOKIA
18-10-2005
Processing
(slow path)
Network Processor (NP)
Fast
Ethernet
NP
Packets
arrive
Packets
sent
Classifier
Traffic Mgnt and shaping
State machine
Policing results
Micro code
4
© NOKIA
18-10-2005
Output
Giga
Ethernet
Input
STM-1
Why research was made
• Previously micro code was done by Agere Systems
• But also the Nokia had knowledge to produce the
micro code
• Faster SW integration if Nokia produce the micro
code it selves?
• Nokia did not have any process for producing
APP550 specific micro code
5
© NOKIA
18-10-2005
Research problem
Q In what level “micro code SW process” should be investigated?
Q Schedule of micro code SW process? When to implement
micro code?
Q How to implement micro code to support HW-test?
Q The nature of micro code? How does it differ from traditional
coding?
Q How do we test micro code? What tools do we have?
Q Can we reuse some generic SW process models using
literature?
6
© NOKIA
18-10-2005
Answers (Q1)
Q In what level should question “micro code SW process?” be investigated?
A The level is Generic micro code SW process model.
A It means that we will find different generic SW process models (e.g. Spiral
model, Water Fall model) from literature and approach our question from
academic point of view.
A We avoid “copy-paste” method and existing Nokia SW process models are
not used
A To choose best model from literature we need information about nature of
Micro code.
7
© NOKIA
18-10-2005
Answers (Q2)
Q Schedule of micro code SW process? When to implement micro code?
Somewhere middle of HW and SW schedule?
A HW must get some preliminary version from micro code to make their HW
tests (HW MT). Without micro code it is not possible.
A Schedule is most likely following:
SW
OS
HW
Time/t
Micro code
Test version to
support HW test
Test board (e.g. Hydra)
simulation
8
© NOKIA
18-10-2005
Final version
Answers (Q2) cont.
Q How to map the micro code SW process to our HW milestone?
A We have different kind of SW to be integrated:
• OS, SW, Micro code
A For micro code at least four different “versions” can be identified:
1. Preliminary micro code version 1 test with simulator
2. Preliminary micro code version 2 test with test board
3. Preliminary micro code version 3 to support HW test
4. Final micro code version 4 with all feature support
SW
OS
HW
Time/t
Micro code
Test version to
support HW test
Test board (e.g. Hydra)
simulation
9
© NOKIA
18-10-2005
Final version
Answers (Q3)
Q How to implement micro code to support HW-test?
A We need some input from HW group to make sufficient first version from
micro code to HW group.
A After knowing requirements we can implements micro code.
Main branch
/main/dev1/
SW_v0.1 1
SW_v0.2 2
SW_v1.0
Rel 1.0 3
10
© NOKIA
18-10-2005
”HW test” branch
/main/test/
1
SW_v2.1
2
SW_v2.2
Merge HW test
code to final code
Answers (Q4)
Q The nature of Micro code? How does it differ from traditional coding (like C,
C++, Java) or does it differ at all?
A Yes, micro code differs from traditional coding. If we compare e.g. to C
language and SW done with that, micro code is:
o Usually less code lines than in C
=> no big resources needed
o Available memory is usually small
 Big micro code software not possible
 Available memory can not be used as in C (we have no pointers).
o Instruction set smaller than in C
o Same code editors can be used (emacs, UltraEdit)
o Micro code can be simulated with simulator (SPA if APP is used)
o Note that there are different versions of APP and simulators!
o Debugging is different (and difficult) in micro code (printf(“Hello
world”); is not possible).
11
© NOKIA
18-10-2005
Answers (Q4) cont.
Q The nature of Micro code? How does it differ from traditional coding (like C,
C++, Java) or does it differ at all?
A Yes, micro code differs from traditional coding. If we compare e.g. to C
language and SW done with that, micro code is (APP):
o Real time programming
o In micro code we have only very limited time to use per received cell
or PDU
o In micro code we may have dynamic changing code (using searching
trees). Trees are usually modified by some host processor.
o Micro code compiler gives similar kind of warning and error than e.g.
gcc.
12
© NOKIA
18-10-2005
Answers (Q5)
Q How do we test micro code? What tools do we have?
A HW can not be ready if it is not verified by HW MT (HardWare Module
Testing). HW MT needs some preliminary micro code for testing. But how
do we create micro code if we can not test that in some HW?
 Chicken-Egg problem
A Because we do not have HW ready for testing we need simulator. Usually
manufacturer can offer a simulator for their NP (e.g. SPA for APP). But
simulator may have some SW bugs and we can not be 100% sure that
micro code is really working.
 We could use also “test boards” that include the real NP (delivered by
manufacturer). E.g Agere’s Hydra.
A When our HW is ready we will continue testing with that.
 Testing equipment needed! (e.g. packet generator etc.)
 Simulator can be still used.
13
© NOKIA
18-10-2005
Answers (Q6)
Q Can we reuse some generic SW process models using literature?
A Generic SW process models from literature
A Other SW process models.
A Agility methods in SW process models.
14
© NOKIA
18-10-2005
Choosing the SW process
A Generic SW process models from literature :
1. Water fall model is too heavy process model for micro
code. It produce lot of documentation and it’s applicable
for big process
2. Evolution model is a good model for producing complex
SW. SW is produced iterative but that will cause lot of
updates to documentation. The biggest disadvantage is
poor SW architecture caused by this model.
3. Component model uses old SW as much as possible. This
leads SW design where SW components are very generic.
However, the result is usually big SW because code is not
optimized.
15
© NOKIA
18-10-2005
Choosing the SW process
A Other SW process models:
1. Prototyping is very useful model for example finding out
critical capacity questions
2. RUP (Rational Unified Process) is a combination of Water
fall, Evolution Component models
3. Formal models is based on mathematical forms
4. 4 GT models are higher level tools for generating code
5. “Code and fix” –model is a poor model
6. Spiral model is a model for minimizing risks
16
© NOKIA
18-10-2005
Choosing the SW process
A Agility methods in SW process models:
1. XP (Extreme Programming) was used as a main model for
micro code
2. RAD (Rapid Application Development) is developed from 4
GT models
17
© NOKIA
18-10-2005
XP-model
• Based on iteration
• Pair programming
• For small projects (e.g. about 2-12 programmers)
• Promotes team work
• Stresses customer satisfaction (e.g. other project)
• Customer is part of the process
• Developers, managers and customers are working together
• Design unit test case before coding
• Automatic testing
18
© NOKIA
18-10-2005
The Micro code SW process
Host processor
interface specification
Micro code design documentation
HW test specification
Feature
priorisation
Micro code requirement documentation
Product requirement specification
Feature
requirements
documentation DB
Choosing
next feature
Component
analyze
Feature design,
coding, testing
System testing
19
© NOKIA
18-10-2005
Detailed micro code SW process
Feature
requirements
Feature
priorisation
Choosing next feature
Choosing
next feature
Component analyze
Component
analyze
Feature analyze
Feature design,
coding, testing
System testing
Design of FPLprogram test
FPL-program
coding
FPL-program
testing
Design of C-NP program test
C-NP -program
coding
C-NP -program
testing
Feature design, coding, testing
Micro code
testing
System testing
20
© NOKIA
18-10-2005
Conclusion
• Feature IP QoS was implemented by using the micro code SW
process
• Micro code SW process works but is it efficient?
• Requires measurements later (out of this thesis)
• Component model was used but XP model is dominating
• Pair programming in XP model may face some problems. E.g
cultural and behavioural problems
21
© NOKIA
18-10-2005
Questions?
Comments?
Any new ideas?
Thank you!
22
© NOKIA
18-10-2005
Download