<commit_before>/* FILE INFORMATION
File:     rob.cpp
Authors:  <NAME> <<EMAIL>>
          <NAME> <<EMAIL>>
Description: Contains the ROB class, which simulates the operation of a Reorder Buffer.
*/

#include "rob.h"

ROB::ROB();

ROB::~ROB();

//Display the contents of the ROB
//Each row is cycle#, opcode of the contained sta
void ROB::display(){

}

//Initialize the ROB to empty state
void ROB::initialize(){

}

//Remove head from ROB and
//call registers' commit function,
//updating backend table and free list
void ROB::commit(Registers &reg){
	std::string pReg;
	pReg = this->reorder_buffer.front().operands.at(0);
	reg.commit(pReg);
}

//Add a Stage instance to ROB
void ROB::addStage(Stage &stage){
	if (this->reorder_buffer.size() < this.max_size){
		this->reorder_buffer.push(stage);
	}
}

//Given a cycle value gets cycle value of current head
//and returns if they are equal (==)
bool ROB::headMatch(int cycle){
	int size = 0;
	int headCycle = 0;
<commit_msg>ROB display and initialize functions<commit_after>/* FILE INFORMATION
File:     rob.cpp
Authors:  <NAME> <<EMAIL>>
          <NAME> <<EMAIL>>
Description: Contains the ROB class, which simulates the operation of a Reorder Buffer.
*/

#include "rob.h"

ROB::ROB();

ROB::~ROB();

//Display the contents of the ROB
//Each row is cycle#, opcode of the contained sta
void ROB::display(){
	std::cout << "Cycle : Opcode"
	for (auto e : reorder_buffer){
		std::cout << e.c << " : " << e.opcode << endl;
	}
}

//Initialize the ROB to empty state
void ROB::initialize(){
	reorder_buffer.clear();
}

//Remove head from ROB and
//call registers' commit function,
//updating backend table and free list
void ROB::commit(Registers &reg){
	std::string pReg;
	pReg = this->reorder_buffer.front().operands.at(0);
	reg.commit(pReg);
}

//Add a Stage instance to ROB
void ROB::addStage(Stage &stage){
	if (this->reorder_buffer.size() < this.max_size){
		this->reorder_buffer.push(stage);
	}
}

//Given a cycle value gets cycle value of current head
//and returns if they are equal (==)
bool ROB::headMatch(int cycle){
	int size = 0;
	int headCycle = 0;

{'fraction_non_alphanumeric': 0.14414414414414414, 'fraction_numerical': 0.002844950213371266, 'mean_word_length': 4.059952038369304, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6383996', 'n_tokens_mistral': 736, 'n_tokens_neox': 705, 'n_words': 242}