diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2011-02-25 17:54:56 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2011-02-25 17:54:56 -0600 |
commit | e7edd270aabd3705f025e10f3f496723230b01ae (patch) | |
tree | 7e5ae99fe97507ac5ba97b09a1117f1242f218fb /src/mem/ruby/storebuffer | |
parent | 6bf7153104637c18133fa36c02ca6a4a9b015799 (diff) | |
download | gem5-e7edd270aabd3705f025e10f3f496723230b01ae.tar.xz |
Ruby: Remove libruby
This patch removes libruby_internal.hh, libruby.hh and libruby.cc. It moves
the contents to libruby.hh to RubyRequest.hh and RubyRequest.cc files.
Diffstat (limited to 'src/mem/ruby/storebuffer')
-rw-r--r-- | src/mem/ruby/storebuffer/storebuffer.cc | 48 | ||||
-rw-r--r-- | src/mem/ruby/storebuffer/storebuffer.hh | 2 |
2 files changed, 1 insertions, 49 deletions
diff --git a/src/mem/ruby/storebuffer/storebuffer.cc b/src/mem/ruby/storebuffer/storebuffer.cc index 0486c6510..0accf138d 100644 --- a/src/mem/ruby/storebuffer/storebuffer.cc +++ b/src/mem/ruby/storebuffer/storebuffer.cc @@ -59,7 +59,6 @@ StoreBuffer::StoreBuffer(uint32 id, uint32 block_bits, int storebuffer_size) char name [] = "Sequencer_"; char port_name [13]; sprintf(port_name, "%s%d", name, id); - m_port = libruby_get_port(port_name, hit); m_hit_callback = NULL; assert(storebuffer_size >= 0); m_storebuffer_size = storebuffer_size; @@ -67,13 +66,9 @@ StoreBuffer::StoreBuffer(uint32 id, uint32 block_bits, int storebuffer_size) m_block_size = 1 << block_bits; m_block_mask = ~(m_block_size - 1); m_buffer_size = 0; - m_use_storebuffer = false; m_storebuffer_full = false; m_storebuffer_flushing = false; m_stalled_issue = true; - if (m_storebuffer_size > 0){ - m_use_storebuffer = true; - } } StoreBuffer::~StoreBuffer() @@ -91,19 +86,6 @@ StoreBuffer::registerHitCallback(void (*hit_callback)(int64_t request_id)) void StoreBuffer::addToStoreBuffer(RubyRequest request) { - if (!m_use_storebuffer) { - // make request to libruby - uint64_t id = libruby_issue_request(m_port, request); - if (request_map.find(id) != request_map.end()) { - panic("Request ID: %d is already in the map\n", id); - } else { - request_map.insert(make_pair(id, this)); - outstanding_requests.insert(make_pair(id, request)); - } - return; - } - - buffer.push_front(SBEntry(request, NULL)); m_buffer_size++; @@ -128,28 +110,12 @@ StoreBuffer::addToStoreBuffer(RubyRequest request) int64_t StoreBuffer::handleLoad(RubyRequest request) { - if (!m_use_storebuffer) { - // make a request to ruby - return libruby_issue_request(m_port, request); - } - load_match match = checkForLoadHit(request); if (match == FULL_MATCH) { // fill data returnMatchedData(request); iseq++; return -2; - } else if (match == NO_MATCH) { - // make request to libruby and return the id - uint64_t id = libruby_issue_request(m_port, request); - if (request_map.find(id) != request_map.end()) { - panic("Request ID: %d is already in the map\n", id); - } else { - request_map.insert(make_pair(id, this)); - outstanding_requests.insert(make_pair(id, request)); - } - iseq++; - return id; } else { // partial match return -3; } @@ -159,12 +125,6 @@ StoreBuffer::handleLoad(RubyRequest request) load_match StoreBuffer::checkForLoadHit(RubyRequest request) { - if (!m_use_storebuffer) { - // this function should never be called if we are not using a - // store buffer - panic("checkForLoadHit called while write buffer is not in use\n"); - } - physical_address_t physical_address = request.paddr; int len = request.len; @@ -270,14 +230,6 @@ StoreBuffer::flushStoreBuffer() void StoreBuffer::issueNextStore() { - SBEntry request = buffer.back(); - uint64_t id = libruby_issue_request(m_port, request.m_request); - if (request_map.find(id) != request_map.end()) { - assert(0); - } else { - request_map.insert(make_pair(id, this)); - outstanding_requests.insert(make_pair(id, request.m_request)); - } } void diff --git a/src/mem/ruby/storebuffer/storebuffer.hh b/src/mem/ruby/storebuffer/storebuffer.hh index 6d476706b..b2b8483fd 100644 --- a/src/mem/ruby/storebuffer/storebuffer.hh +++ b/src/mem/ruby/storebuffer/storebuffer.hh @@ -33,7 +33,7 @@ #include <map> #include "mem/ruby/common/TypeDefines.hh" -#include "mem/ruby/libruby.hh" +#include "mem/ruby/slicc_interface/RubyRequest.hh" /** * Status for write buffer accesses. The Write buffer can hit in |