This week was really different!! Usually at the beginning of each week we used to be aware of the specific task that we have to achieve but in this week, things were different!! Issues were being opened on daily basis and as soon as you close one you get three in return (Buy one and get three free ) that definitely made opening your Gmail account a NIGHTMARE . And because the past claws its way out… All the issue you once hide intentionally or unintentionally… All the bad code you once wrote will find its way back to YOU.
So basically the things I’ll talk about in this blog are not so much related to each other, some were regarding solving code bugs or.. Getting some enhancement to specific part of the code and so on.

Wrappers classes and modules:

This was basically my first official task of this week, I had to build some wrappers modules and classes for our generic and integrated modules. Building wrappers classes was straight forward. The key point is to just figure out the parameters that this class should have. Building the wrappers module was a bit more challenging especially for the integrated modules. Because this required knowing the protocol the module used (I2C , Uart ..) and the usage of the rest of its pins and so on. But once you know that the rest of the process is not that complicated as all you have to do is to instantiate the lower required module (I2c , gpio.. etc) and then get their connection right specially if more than one module are needed (In this case a multiplexer is needed to select between the lower modules)

Overcoming misconception

Well, due to my faulty understanding of some of the compilation aspects I did a task all wrong twice. Although that may sound silly but what I was missing basically was when we use certain functions that is defined in other C++ file inside our code I thought that the functions definition must be accessible during the compiling but apparently I was totally wrong as just declaring those functions at the beginning of the file will be enough to shut the compiler up and tell her that the full function definition will be available during the linking time. This really pissed me off because what I found out later was that this what I have been doing during building my C++ code so far. Any way getting the correct understanding is what matters. !!
So after getting the right understanding I modified my current code and adjusted so the user code now has no main function. He’ll write his own code inside two other functions and then the final object file will be linked with the object file that has the main () function on it.

Multiple BMM files:

Plus working on all of that I had to work on adding a functionality to the code so the numbers of BRAMS used in the system (size of RAM, both data and instruction) varies based on the user needs. The user needs are defined by the size of both the instruction (.text) section and the data (.data, .bss) sections in the user elf file (the executable code). To get this done three files should be modified so only the necessary numbers of brams are used. The top module file where the memory module is instantiated, the ucf file which tells the Xilinx tool to place the BRAMS at the requested location and finally the BMM file that is used by data2mem tool. So the algorithms is simple: after getting the elf section sizesย  the system should select the right ucf and bmm file that meets the need of the user. And adjust the top module so the same number of BRAM will inferred later by the XST tool.
I’m still working on getting this done.

Next week will be no much different except that Dr.Shawn will be around. New issues will be opened , some will be closed and opening my Gmail account will still be a nightmare.
Keep me in your prayers and selamate hari raya to you all ๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ™‚

Categories: Experiential

0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.