dram_ctrl.cc (10489:99d59caa4c8f) dram_ctrl.cc (10492:59f9f18aae0c)
1/*
2 * Copyright (c) 2010-2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 903 unchanged lines hidden (view full) ---

912 // 1) bank group architecture is not supportted
913 // 2) bank is in a different bank group
914 banks[rank][i].actAllowedAt = std::max(act_tick + tRRD,
915 banks[rank][i].actAllowedAt);
916 }
917 }
918
919 // next, we deal with tXAW, if the activation limit is disabled
1/*
2 * Copyright (c) 2010-2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 903 unchanged lines hidden (view full) ---

912 // 1) bank group architecture is not supportted
913 // 2) bank is in a different bank group
914 banks[rank][i].actAllowedAt = std::max(act_tick + tRRD,
915 banks[rank][i].actAllowedAt);
916 }
917 }
918
919 // next, we deal with tXAW, if the activation limit is disabled
920 // then we are done
921 if (actTicks[rank].empty())
922 return;
920 // then we directly schedule an activate power event
921 if (!actTicks[rank].empty()) {
922 // sanity check
923 if (actTicks[rank].back() &&
924 (act_tick - actTicks[rank].back()) < tXAW) {
925 panic("Got %d activates in window %d (%llu - %llu) which "
926 "is smaller than %llu\n", activationLimit, act_tick -
927 actTicks[rank].back(), act_tick, actTicks[rank].back(),
928 tXAW);
929 }
923
930
924 // sanity check
925 if (actTicks[rank].back() && (act_tick - actTicks[rank].back()) < tXAW) {
926 panic("Got %d activates in window %d (%llu - %llu) which is smaller "
927 "than %llu\n", activationLimit, act_tick - actTicks[rank].back(),
928 act_tick, actTicks[rank].back(), tXAW);
929 }
931 // shift the times used for the book keeping, the last element
932 // (highest index) is the oldest one and hence the lowest value
933 actTicks[rank].pop_back();
930
934
931 // shift the times used for the book keeping, the last element
932 // (highest index) is the oldest one and hence the lowest value
933 actTicks[rank].pop_back();
935 // record an new activation (in the future)
936 actTicks[rank].push_front(act_tick);
934
937
935 // record an new activation (in the future)
936 actTicks[rank].push_front(act_tick);
937
938 // cannot activate more than X times in time window tXAW, push the
939 // next one (the X + 1'st activate) to be tXAW away from the
940 // oldest in our window of X
941 if (actTicks[rank].back() && (act_tick - actTicks[rank].back()) < tXAW) {
942 DPRINTF(DRAM, "Enforcing tXAW with X = %d, next activate no earlier "
943 "than %llu\n", activationLimit, actTicks[rank].back() + tXAW);
938 // cannot activate more than X times in time window tXAW, push the
939 // next one (the X + 1'st activate) to be tXAW away from the
940 // oldest in our window of X
941 if (actTicks[rank].back() &&
942 (act_tick - actTicks[rank].back()) < tXAW) {
943 DPRINTF(DRAM, "Enforcing tXAW with X = %d, next activate "
944 "no earlier than %llu\n", activationLimit,
945 actTicks[rank].back() + tXAW);
944 for(int j = 0; j < banksPerRank; j++)
945 // next activate must not happen before end of window
946 banks[rank][j].actAllowedAt =
947 std::max(actTicks[rank].back() + tXAW,
948 banks[rank][j].actAllowedAt);
946 for(int j = 0; j < banksPerRank; j++)
947 // next activate must not happen before end of window
948 banks[rank][j].actAllowedAt =
949 std::max(actTicks[rank].back() + tXAW,
950 banks[rank][j].actAllowedAt);
951 }
949 }
950
951 // at the point when this activate takes place, make sure we
952 // transition to the active power state
953 if (!activateEvent.scheduled())
954 schedule(activateEvent, act_tick);
955 else if (activateEvent.when() > act_tick)
956 // move it sooner in time

--- 1183 unchanged lines hidden ---
952 }
953
954 // at the point when this activate takes place, make sure we
955 // transition to the active power state
956 if (!activateEvent.scheduled())
957 schedule(activateEvent, act_tick);
958 else if (activateEvent.when() > act_tick)
959 // move it sooner in time

--- 1183 unchanged lines hidden ---