cpu: HTM Implementation for O3CPU

JIRA: https://gem5.atlassian.net/browse/GEM5-587

Change-Id: I83787f4594963a15d856b81ad283b4f032d1c007
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30328
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Timothy Hayes
2020-09-02 11:28:33 +01:00
committed by Giacomo Travaglini
parent 79df434187
commit 46d7fdf1b6
15 changed files with 684 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2012, 2014 ARM Limited
* Copyright (c) 2010-2012, 2014, 2019 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -205,6 +205,12 @@ class DefaultCommit
/** Deschedules a thread from scheduling */
void deactivateThread(ThreadID tid);
/** Is the CPU currently processing a HTM transaction? */
bool executingHtmTransaction(ThreadID) const;
/* Reset HTM tracking, e.g. after an abort */
void resetHtmStartsStops(ThreadID);
/** Ticks the commit stage, which tries to commit instructions. */
void tick();
@@ -473,6 +479,11 @@ class DefaultCommit
/** Updates commit stats based on this instruction. */
void updateComInstStats(const DynInstPtr &inst);
// HTM
int htmStarts[Impl::MaxThreads];
int htmStops[Impl::MaxThreads];
/** Stat for the total number of squashed instructions discarded by commit.
*/
Stats::Scalar commitSquashedInsts;