Sunday, January 17, 2010

Object-Oriented Development

After spending time in understanding syntax of OOPS languages, it becomes imperative to enter the real world and understand how efficiently problems are mapped to behavior of OOPS objects. At many workstations, this is achieved via a language platform UML.

UML stands for unified modelling language, which via pictorial representations tries to resolve the possible states of the process.To appreciate this language more, lets have a quick recap of some important terms:

1. Abstract Class: No implementation method defined for an operation

2. Actor: Role taken by user while invoking a use case

3. Classifier: A category of UML elements that have some common features

4. Containment by Value: An object contains another object

5. Containment by Reference: An object contains a pointer to another object

6. Join: A point in an activity diagram where several concurrent flows synchronize, waiting until all are complete before continuing with a single flow

7. Namespace : A context in which an identifier exists

8. Package: Grouping of classes with related functionality

9. Template: A class that accepts a compile-time parameter defining the type to be used within the class

Links for reference:


1. Discuss the interacting objects while writing SW for a telephone answering machine.

2. Will this technique be helpful for dynamic or digital models?

Saturday, January 16, 2010

Delphi Development Environment

Delphi, an extension of pascal has proved to be a great object oriented language used for building powerful GUI. Dragging and droping the components automatically adds the appropriate code to the program which makes programming more simple and efficient. The quickest way to select a group of components is to drag a bounding rectangle around them.

Visual Objects can be manipulated at design time. Only visual componens can be seen at design time.The objects placed by designer on the windows form are called components, .dpr (project file), .pas and .dfm file types are needed to build an application in Delphi.

When one component owns another, the memory for the owned component is freed, when its owner's memory is freed. When a form is destroyed, all the components on a form are destroyed.

Delphi vocabulary consists of following terms:

1. Frame Object: It is designed as kind of a template for a part of a form.All windows of a delphi application are based on TForm object.

2. TMenu: To build the menu structure.

3. Pop up Menu: Windows that appear on right clicking

4. Labels: To label items on a form.

5. Edit Boxes: For entering editable user information.

6. Memo Boxes: For displaying single string as multi line wrapped text display.

7. Buttons: For providing user mechanism to choose 1 of the given options. if a button is disabled, its text is grayed out.

8. Check Boxes: For letting user enter a Yes/No choice.

9. List Boxes: To provide selectable names.

10. Scroll Bar: For providing horizontal/vertical scrolling option. If autoscroll is true, the scroll bar appears automatically when necessary.

11. Radio Group Panels: For providing user multiple choice options.Components such as group box, panel and page control can contain other components.

12. Code Reuse: Associating an event with an existing event handler in Delphi is used in purpose of code reuse.

13. Container: The idea of a conainer is that all the components will behave as one at the design time, the child components move with the parent inside a container.

14. DLL: Dynamic linked library called from executable programs leading to effective code reuse.

15. Object Inspector: Located on the left side of the screen for modifying component's properties and events.

16. Event Handler: A section of code invoked in an application in response to an event.
17. Set: A collection of values of one type, e.g. a set of font types.
18: Dynamic Allocation: Memory required for an object is allocated from the heap; heap refers to computer's virtual memory.
19. Self: A pointer to the instance of the class in memory. This pointer should be never modified.

Delhi 5,6,7 editions also provide spell check for 18 languages using 26 dictionaries.

Well, need not say Delphi development interface looks quite different and enriching for OOPS enthusiasts!

Links For Reference:


1. In Delphi, every project has atleast how many windows?
2. How can a button and menu item be handled to do the same task?

3. Ignoring the OOPS front, Delhi city is located in which country?

4. Is Delphi case sensitive; what about the case senstivity of its ancestor Pascal?

5. What is the easiest way to place multiple components of the same type on a form?

6. Can three components share the same event handler, what about 10?

7. Can the name and width property of a component be changed at run time? Will it be a good idea to do so?

8. What is a cursor's hot spot?
9. By default class in Delphi is public or private?

Friday, January 15, 2010

Network Processors - C1

Network Processors seems to have lot of demand and supply these days. After working on 3 processors (Texas DSP TMS320C6416, Atmel ARM AT 91 and Intel NP IXP2350) in my 6 years+ professional experience, it is interesting to understand how network processors differ from the other processors.

The best way to understanding NP is in terms of a router used for processing voics/SMS packets over a digital telecom network in order of nano/micro seconds. The real trick in programming and using the network processor the most efficient way lies in making full benefit of the money paid to the selling entity by tapping its most specific features.

Lets also try to understand how network processors differ form other specialized processors e.g. viterbi coprocessors.Network processors in general work on the logic of efficient parallel processing which inevitably leads to less code space for each sub-module but the amount of data that can be processed is comparatively higher. Again try to visualize the amount of traffic crossing a router of a VOIP based network every second.

Viterbi Coprocessor (VCP) decodes convolutional codes during channel de-coding of voce/data call.VCP also decodes a series of frames in a most efficient manner. Here again VCP related effort is to maximize its processing power, and minimize the wait period for input/output operations.

So this helps in developing an understanding that VCP is specialized for 1 particular operation whereas each sub-module of NP is specialized for a partiular sub-operation. To put in other words, the key feature of a network processor is its parallel processing capacity dealing with huge number of network packets at a very fast pace.

Local memory caching is another concept widely used in NP to reduce the access time of information more frequently required by that particular thread of micro engine running in network processor. Figure below captures main blocks of IXP2400 and IXP1200 processors:

NP vocabulary mainly highlights following terms:

1. MSF: media switch fabric
2. QDR SRAM controller
3. ME: Micro Engine
4. PCI: Peripheral Component Interconnect
5.CAM: Content Addressable Memory
6. XFER: Transfer Register
7. GPR: General Purpose Register

Links for reference:


1. What disadvantages do high level languages impose if used on Network processors other than their translation time?

2. What will happen if input packet speed is more than than the data rate supported by NP; also think of scenario where packet speed is less.

3. Buffer management and data compression/decompression pose what kind of challenges to Network processors.

4. Out of TCP and UDP protocol stack, which is more apt to be supported on Motorola C5 NP?