![]() Loop through the entire Branch History Table and make sure all cells are set to 0. Int count //Used to clear out the Branch History Table Int bht //Integer array that holds the Branch History Table It is a group of flip-flops with a clock signal applied. Counter is the widest application of flip-flops. A digital circuit which is used for a counting pulses is known counter. Int numEntries //Number of entries as determined by bit index Operation Truth table Synchronous counters 2-bit Synchronous up counter Types Logical diagram Operation Digital sequential circuits Counter is a sequential circuit. Int bitIndex = atoi(argv) //The argument entered by the user, defines bit index My code for the 2-bit saturating counter program is here: #include How can I implement my 2-bit saturating counter to make a table of multiple 2-bit saturating counters to populate a Pattern History Table? This is my first time asking a question on here so I hope I am following the correct format. I have been working on/thinking about this for hours and perhaps I am just overthinking it. Each entry in the Pattern History Table contains its own 2-bit saturating counter that is used to give a prediction. The BHSR, by my understanding, contains the last n number of occurences and is used to index into a Pattern History Table. However, I am having trouble wrapping my head around the concept of the gshare simulator, which in my case uses a BHSR (Branch History Shift Register) that consists of a variable bit index XORed with that number of bits that come from the least significant bits of the instruction address. up/down:This indicates if the counter will be counting up or counting down. I understand the logic behind a 2-bit saturating counter. input:A 2-bit number that will be used to load a value into the counter. When EN 1, thecircuit count proceeds normally when EN 0, the counter stays in the. The 2-bit saturating counter program I wrote correctly calculates the number of mispredicts as well as the misprediction rate. The counterhas two external inputs, EN(enable) and DIR (direction). Meaning, my input looks something like this: The 8421 designation refers to the binary weight of the four digits or bits used. It actually counts the number of clock pulses up to three (2 2 -13), and on the fourth pulse, it recycles to its original state ( Q 0 0, Q 10). ![]() The problem I am currently working on is to write a gshare simulator that takes in branch instruction addresses and taken/untaken instructions for a 2-bit saturating counter. Binary-coded-decimal code is an 8421 code consisting of four binary digits. Summary Since it goes through a binary sequence, the counter in Figure 1 (a) is a binary counter. Asynchronous Counter In asynchronous counter we don’t use universal clock, only first flip flop is driven by main clock and the clock input of rest of the following flip flop is driven by output of previous flip flops. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |