Structural Way of Programming...

In the Name of Allah (swt), the most gracious, the most wonderful...

Assalaamu Alaikum (varah),

May peace and blessings of Almighty be upon you all...

Structural Way of Programming: 

One common question amongst students is, 

1. Complex designs must be programmed using Structural way of Modeling. Is that correct?

         To a certain extent, yes. But not always, it depends on the circumstances and designer’s abilities. For instance, let us assume that we are trying to implement a fulladder design.

A) One way of designing is, we know that, a fulladder design contains two ‘halfadders’ and one ‘or’ gate. Now you write a program for halfadder and call the corresponding entity two times in the main project and write a program for ‘or’ gate and call it once in the main program. The end result, within three steps inside the architecture we finish the project.

B) The other way is, what will happen if the designer doesn’t able to visualize fulladder into two ‘halfadders’ and one ‘or’ gate. In that case, he designs the full adder circuit with two ‘xor’ gates and two ‘and’ gates and one ‘or’ gate (or in any other way). To do this in structural way, he writes the program for ‘xor’ gate, ‘and’ gate, ‘or’gate and calls these programs in the main project. The end result, it takes five steps inside the architecture to finish the project. 

If he designs the same project in data flow method, he still needs to write five steps to finish the project and in addition to that he has saved some time in writing programs for ‘xor’,’and’ and ‘or’.

Hence if the designer has the expertise to visualize a complex circuit as blocks (like halfadders in fulladder circuit) then structural way of programming will be of immense use. Or else it is better to hold on with Data flow way of modeling. 

May the Almighty keep us in the right path always...aamin

Thanks and take care...

Aashiq Ahamed A


Post a Comment