After putting my current project on halt for a week time, finally I’m back to track to work on my T3ras project. This week I focus mainly on the execute stage in pipeline to execute and manipulate each of the MicroBlaze instruction sets into semantics operation written in Java. Since there are around 90+ instruction sets that need to be taken care of and thus it’s easier to get them sorted out by family first before start writing the source code. Few of the main family on instruction sets are for example arithmetic, logic, shifting. branching, return, break, save and load, multiplication and etc.. There are details need to be taken care of especially dealing with 16 bit immediate operand-imm  which needed to be implement to 32 bit signed extend, shifting  dealing with carry bit  that require me to mask out the bit [29] from MSR and also unconditional and conditional branching.

After weeks of source codes writing and also all the source code getting extended from class to class, I failed to keep track on the data flow in my source codes which get me writing the wrong codes until my supervisor notified my mistakes several times. This takes me quite a lot of time to sorted and debug them. My supervisor also advice me to change all the number involved to hexadecimal numbering so that other user can easily understand my code. Besides, he also advise me to simplify my code so that those cases (I’m using switch case) that implement the same condition can be group together although switching on different cases to minimize human mistakes.

For the moment, execute stage were implemented with almost 90% of the all the instruction sets except instruction imm and compare. These 2 instruction will be implement after I have tested the current execute stage code is working. An assembler codes contains simple arithmetic operation is created and converted to hex file format so that I could test run my current codes. Syntax code $mb-objdump -d a.out is used in git to shows the assembler codes written to compare whether the output shown in Eclipse is the same after compile. I will continue on writing simple codes to test run my current execute codes and hope that it works in order to continue to implement more on memory access and write back stage and finish before Raya holiday.


Leave a Reply

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