Added: PrechargeChecker, ActivateChecker, ReadChecker, WriteChecker

Implemented: ActivateChecker
Added functionality to Bus (InternalScheduler)
This commit is contained in:
Janik Schlemminger
2014-03-13 15:46:19 -07:00
parent aa2eb43126
commit 011e1a99ea
42 changed files with 767 additions and 133 deletions

View File

@@ -8,12 +8,17 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "core/refresh/RefreshManager.h"
#include "testUtils.h"
using ::testing::_;
using ::testing::AtLeast;
using ::testing::Expectation;
using namespace testing;
#include <limits.h>
const double lowest_double = -DBL_MAX;
constexpr unsigned int numberOfBanks = 8;
namespace controller {
@@ -33,10 +38,12 @@ public:
Configuration config;
MockInternalScheduler internalScheduler;
std::shared_ptr<tlm::tlm_generic_payload> transaction;
CommandSchedule getCollidingWithFirstRefresh()
{
tlm::tlm_generic_payload transaction;
CommandSchedule colliding(transaction);
transaction = createDummyPayload();
CommandSchedule colliding(*transaction.get());
sc_time tREFI = config.Timings.refreshTimings.at(0).tREFI;
sc_time clk = config.Timings.clk;
@@ -46,8 +53,8 @@ public:
CommandSchedule getNonCollidingWithFirstRefresh()
{
tlm::tlm_generic_payload transaction;
CommandSchedule non_colliding(transaction);
transaction = createDummyPayload();
CommandSchedule non_colliding(*transaction.get());
sc_time tREFI = config.Timings.refreshTimings.at(0).tREFI;
sc_time clk = config.Timings.clk;
@@ -59,7 +66,6 @@ public:
TEST_F(RefreshManagerTest, RefreshIsScheduledAfterStartup)
{
EXPECT_CALL(internalScheduler, scheduleTrigger(Trigger::RefreshTrigger, _)).Times(2);
EXPECT_CALL(internalScheduler, scheduleCommand(_));