merged everythin into one project
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#define BANKWISEREFRESHMANAGER_H_
|
||||
|
||||
#include "IRefreshManager.h"
|
||||
#include "common/dramExtension.h"
|
||||
#include "../../common/dramExtension.h"
|
||||
#include "RefreshManager.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
@@ -21,7 +21,14 @@ class IRefreshManager
|
||||
public:
|
||||
virtual ~IRefreshManager() {}
|
||||
|
||||
/*
|
||||
*Checks whether a schedule collides with the next planned refresh
|
||||
*/
|
||||
virtual bool hasCollision(const CommandSchedule& schedule) = 0;
|
||||
|
||||
/*
|
||||
*Schedules the next planned refresh if it's start time is not in the past
|
||||
*/
|
||||
virtual void scheduleRefresh(sc_time time) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -12,18 +12,14 @@
|
||||
|
||||
namespace core {
|
||||
|
||||
RefreshManager::RefreshManager(CommandBus& bus, const RefreshTiming& refreshTiming) : bus(bus),
|
||||
refreshTiming(refreshTiming)
|
||||
RefreshManager::RefreshManager(CommandBus& bus, const RefreshTiming& refreshTiming
|
||||
) : bus(bus), refreshTiming(refreshTiming)
|
||||
{
|
||||
setupTransaction(refreshTransaction, Bank(0));
|
||||
nextPlannedRefresh = new ScheduledCommand(refreshTransaction, Refresh, SC_ZERO_TIME,
|
||||
refreshTiming.tRFC);
|
||||
sc_assert(refreshTiming.tRFC > SC_ZERO_TIME);
|
||||
sc_assert(nextPlannedRefresh->getExecutionTime()>SC_ZERO_TIME);
|
||||
|
||||
planNextRefresh(*nextPlannedRefresh);
|
||||
}
|
||||
|
||||
RefreshManager::RefreshManager(CommandBus& bus, const RefreshTiming& refreshTiming,
|
||||
Bank bank) : bus(bus), refreshTiming(refreshTiming)
|
||||
{
|
||||
@@ -58,7 +54,7 @@ bool RefreshManager::hasCollision(const CommandSchedule& schedule)
|
||||
|
||||
void RefreshManager::scheduleRefresh(sc_time time)
|
||||
{
|
||||
if (time <= nextPlannedRefresh->getStart())
|
||||
if (time == nextPlannedRefresh->getStart())
|
||||
scheduleRefresh(*nextPlannedRefresh);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define REFRESHMANAGER_H_
|
||||
|
||||
#include "IRefreshManager.h"
|
||||
#include "common/dramExtension.h"
|
||||
#include "../../common/dramExtension.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user