Commit Graph

20288 Commits

Author SHA1 Message Date
Matthew Poremba
6b020ed033 arch-x86: Move CPUID values to python (#113)
arch-x86: Move CPUID values to python

CPUID values for X86 are currently hard-coded in the C++ source file.
This makes it difficult to configure the bits if needed. Move these to
python instead. This will provide a few benefits:

1. We can enable features for certain configurations, for example AVX
can be enabled when the KVM CPU is used, but otherwise should not be
enabled as gem5 does not have full AVX support.
2. We can more accurately communicate things like cache/TLB sizes based
on the actual gem5 configuration. The CPUID values are can be used by
some libraries, e.g., MPI, to query system topology.
3. Enabling some bits breaks things in certain configurations and this
can be prevented by configuring in python. For example, enabling AVX
seems to currently be breaking SMP, meaning gem5 can only boot one CPU
in that configuration.
2023-07-28 14:52:13 -07:00
Bobby R. Bruce
31230025e9 misc: Sync CONTRIBUTING.md with website (#130)
This change syncs the repo's contributing documentation with that of the
website's contributing documentation:
https://www.gem5.org/contributing

From now on we'll attempt to keep the repo's CONTRIBUTING.md
documentation in sync with that on the website.

Change-Id: I2c91e6dd5cd7a9b642377878b007d7da3f0ee2ad
2023-07-28 09:42:28 -07:00
Matthew Poremba
9acfc5a751 configs: Enable AVX2 for GPUFS+KVM
AVX is a requirement for some ROCm libraries, such as rocBLAS, which are
themselves requirements for libraries higher up the stack like PyTorch.
This patch sets the necessary CPUID bits in the GPUFS config to enable
AVX, AVX2, and various SSE features so that applications using these
libraries do not cause an illegal instruction trap.

Change-Id: Id22f543fb2a06b268271725a54075ee6a9a1f041
2023-07-28 11:34:04 -05:00
Matthew Poremba
7c3c2b05f3 arch-x86: Add extended state CPUID function
The extended state CPUID function is used to set the values of the XCR0
register as well as specify the size of storage for context switching
storage for x87 and AVX+. This function is iterative and therefore
requires (1) marking it as such in the hsaSignificantIndex function (2)
setting multiple sets of 4-tuples for the default CPUID values where the
last 4-tuple ends with all zeros.

Change-Id: Ib6a43925afb1cae75f61d8acff52a3cc26ce17c8
2023-07-28 11:34:04 -05:00
Matthew Poremba
3584c3126c arch-x86: Expose CR4.osxsave bit
Related to the recent changes with moving CPUID values to python, this
value is needed to enable AVX and needs a way to be exposed to python as
well in order to set the bit and the corresponding CPUID values at the
same time.

Change-Id: I3cadb0fe61ff4ebf6de903018a8d8a411bfdb4e0
2023-07-28 11:34:04 -05:00
Matthew Poremba
3946f7ba2c arch-x86: Support CPUID functions with indexes
Various CPUID functions will return different values depending on the
value of ECX when executing the CPUID instruction. Add support for this
in the X86 KVM CPU. A subsequent patch will add a CPUID function which
requires iterating through multiple ECX values.

Change-Id: Ib44a52be52ea632d5e2cee3fb2ca390b60a7202a
2023-07-28 11:34:04 -05:00
Matthew Poremba
63d98018ea arch-x86: Move CPUID values to python
CPUID values for X86 are currently hard-coded in the C++ source file.
This makes it difficult to configure the bits if needed. Move these to
python instead. This will provide a few benefits:

1. We can enable features for certain configurations, for example AVX
can be enabled when the KVM CPU is used, but otherwise should not be
enabled as gem5 does not have full AVX support.
2. We can more accurately communicate things like cache/TLB sizes based
on the actual gem5 configuration. The CPUID values are can be used by
some libraries, e.g., MPI, to query system topology.
3. Enabling some bits breaks things in certain configurations and this
can be prevented by configuring in python. For example, enabling AVX
seems to currently be breaking SMP, meaning gem5 can only boot one CPU
in that configuration.

Change-Id: Ib3866f39c86d61374b9451e60b119a3155575884
2023-07-28 11:34:04 -05:00
Bobby R. Bruce
dcf3c4ba98 misc: Sync CONTRIBUTING.md with website
This change syncs the repo's contributing documentation with that of the
website's contributing documentation:
https://www.gem5.org/contributing

From now on we'll attempt to keep the repo's CONTRIBUTING.md
documentation in sync with that on the website.

Change-Id: I2c91e6dd5cd7a9b642377878b007d7da3f0ee2ad
2023-07-27 10:11:46 -07:00
Bobby R. Bruce
65b99fffc9 util: Ignore line length check for #include pragma in C/C++ files (#134)
The length of the path of #include pragmas can be more than
79-character long. The length of the path of a #include pragma
can be outside of user's control.
2023-07-27 09:39:18 -07:00
Bobby R. Bruce
42b65cad68 misc: Add missing dependency to daily tests (#136)
The refactoring to the daily tests was missing the dependency on the
'name-artifacts' job, which is necessary for downloading all the gem5
artifacts. This adds it in so the tests run as expected.

Change-Id: I0d71ab147395f41c881f2b24597bc07006e1f9c0
2023-07-27 09:38:23 -07:00
Bobby R. Bruce
5aa955212f learning-gem5: Add a missing override (#135) 2023-07-27 09:37:52 -07:00
Jason Lowe-Power
ea18c2f417 cpu: Set SLC bit for GPU tester (#133)
This fixes issue #131 by reverting to the old behavior of performing all
atomics at the system level. To do this the SLC bit needs to be set for
all atomic requests.

Change-Id: I63f4e449be1b02c933832d09700237f8c8026f4c
2023-07-27 07:37:52 -07:00
Melissa Jost
415a6eb9d4 misc: Add missing dependency to daily tests
The refactoring to the daily tests was missing the dependency
on the 'name-artifacts' job, which is necessary for downloading
all the gem5 artifacts.  This adds it in so the tests run as
expected.

Change-Id: I0d71ab147395f41c881f2b24597bc07006e1f9c0
2023-07-26 23:49:39 -07:00
Hoa Nguyen
f19945e9cb ext: Remove the test
Change-Id: I5c174ad388f63e7846dab5d9497ab2faa73ca6f7
Signed-off-by: Hoa Nguyen <hn@hnpl.org>
2023-07-26 21:29:00 -07:00
Bobby R. Bruce
5888ea68a3 misc: Split up tests in daily-tests.yaml (#105)
This splits up the gem5 library example tests by Suite UID, as right now
running them together uses the runner for a long period of time. It is
important to note that doing this means additional tests from this
directory will need to be manually added, such as the kvm tests.

Change-Id: Ib2a0aca08f9b51b60e9dd0528324372cf2d98c05
2023-07-26 21:04:18 -07:00
Hoa Nguyen
bd82e6f1a7 learning-gem5: Add a missing override
Change-Id: I9acebe6f3096b499fa2c69b6d757373431f63c71
Signed-off-by: Hoa Nguyen <hn@hnpl.org>
2023-07-26 20:01:37 -07:00
Hoa Nguyen
9ec7a1c14a util: Ignore line length check for #include pragma in C/C++ files
The length of the path of the #include pragma can be more than
79-character long.

Change-Id: Id72250c166370c7f456bd1f7d05589a49c14c33d
Signed-off-by: Hoa Nguyen <hn@hnpl.org>
2023-07-26 19:41:04 -07:00
Matthew Poremba
ff7e67ee93 cpu: Set SLC bit for GPU tester
This fixes #131 by reverting to the old behavior of performing all
atomics at the system level. To do this the SLC bit needs to be set for
all atomic requests.

Change-Id: I63f4e449be1b02c933832d09700237f8c8026f4c
2023-07-26 21:18:26 -05:00
Jason Lowe-Power
21b4ad609f mem: Make functional request a response when satisfied by queue (#124)
In the memory controller, MemCtrl::MemoryPort::recvFunctional, when the
functional request is satisfied by the ctrl-response queue, correctly
make the packet a response.

This change mirrors AbstractMemory::functionalAccess, which uses
Packet::makeResponse() after satisfying the request.

Note:
bool trySatisfyFunctional(..) functions return true or false based on
whether the request was satisfied.
void recvFunctional(..) functions modify the packet to indicate
successful request satisfaction.
2023-07-26 17:03:16 -07:00
Bobby R. Bruce
6a503d52cd misc: Updating TESTING.md (#121)
This updates the TESTING.md to reflect the current state of the tests in
the gem5 repository and how they interact with the GitHub Actions
infrastructure.
2023-07-26 16:24:56 -07:00
Bobby R. Bruce
c056ef07a5 tests: Deprecate Gerrit/Jenkins testing scripts (#126)
These testing scripts are no longer used since moving to GitHub. The
Nightly (now refered to as "Daily" tests), the Weekly Tests, Compiler
Tests and the CI (Kokoro, pre-commit) tests are run via the GitHub
Actions infrastructure. Their setup is described via Workflow files in
".github/workflows". To run tests locally please consult the
"TESTING.md" file.

These scripts may still be useful to reference and are therefore being
moved into a deprecated state.

Change-Id: Ie75c2f4f1179eb73d0f45ba0b259e8d79aa02ace
2023-07-26 16:24:41 -07:00
Melissa Jost
7371dd51b9 misc: Move gem5 library example tests into a matrix
This moves the gem5 library example tests into a separate matrix,
so they can run on separate runners

Change-Id: Ie9f51b5bae9e7e424d1c98b545b4cf92b481a2fb
2023-07-26 16:19:12 -07:00
Melissa Jost
62df5ae35f misc: Refactor daily-tests.yaml
This changes the daily tests to use a matrix in order to run
tests.  It also includes forces the cleaning step to run
regardless of success or failure.  With this refactoring, now
all builds of gem5 must finish before any tests run, and all
tests download all artifacts from all the build runs.

Change-Id: I16e1bc9acaf619feb85fba53eb6129e7df3fe409
2023-07-26 16:19:11 -07:00
Bobby R. Bruce
ce8e1b6aaa tests: Deprecate Gerrit/Jenkins testing scripts
These testing scripts are no longer used since moving to GitHub. The
Nightly (now refered to as "Daily" tests), the Weekly Tests, Compiler
Tests and the CI (Kokoro, pre-commit) tests are run via the GitHub
Actions infrastructure. Their setup is described via Workflow files
in ".github/workflows". To run tests locally please consult the
"TESTING.md" file.

These scripts may still be useful to reference and are therefore being
moved into a deprecated state.

Change-Id: Ie75c2f4f1179eb73d0f45ba0b259e8d79aa02ace
2023-07-26 10:54:57 -07:00
Atri Bhattacharyya
256729a40c mem: Make functional request a response when satisfied by queue
In the memory controller, MemCtrl::MemoryPort::recvFunctional,
when the functional request is satisfied by the ctrl-response queue,
correctly make the packet a response.

This change mirrors AbstractMemory::functionalAccess, which uses
Packet::makeResponse() after satisfying the request.

Change-Id: I47917062d3270915a97eed2c9fade66ba17019eb
2023-07-26 17:34:24 +02:00
Bobby R. Bruce
949119b5bb misc: Add Pyunit Test info to TESTING.md
Change-Id: Ibff77963653600ac7c9d706edca882d95e5c47df
2023-07-25 20:42:02 -07:00
Bobby R. Bruce
56a9bec602 misc: Update GitHub Actions text in TESTING.md
This change simplifies the explanation of how GitHub actions works.

Change-Id: Ia1540008463b8584f172c40ca7b4826cbbf95eb7
2023-07-25 20:22:00 -07:00
Bobby R. Bruce
cb98715514 misc: Add 'testing resources' sec to TESTING.md
Change-Id: Ie8a9c9200461d4f9e272dea75de1755b1b18aceb
2023-07-25 20:04:43 -07:00
Bobby R. Bruce
2846df946a misc: Remove test binary sections from TESTING.md
These sections are very out-of-date and confusing.

Change-Id: I61aae0686f38671e46412e27ea516a5e06f4e6f2
2023-07-25 19:50:17 -07:00
Bobby R. Bruce
00b2846109 misc: Update TESTING.md for subset selection
This change:

1. Removes the 'Specifying a subset of tests to run' section. This
   section is no longer useful since tests are no longer divided up so
   neatly by tags as they once were.
2. Adds a section outlining the 'quick', 'long' and 'very-long' tests
   and how they may be selected and run.

Change-Id: I61370dd80cc925a15d1a22755faa7d62e810862f
2023-07-25 19:43:24 -07:00
Bobby R. Bruce
7601fcfba6 cpu-minor: Check pc valid before printing (#107)
In https://gem5-review.googlesource.com/c/public/gem5/+/52047 inst.pc
was changed from an object to a pointer. It is possible that this
pointer is null (e.g., if there is an interrupt and there is a bubble).
Make sure to check that it's not null before printing.

I believe that other places this pointer is dereferenced without an
explicit null check are safe, but I'm not certain.

Should fix #97 

Change-Id: Idbe246cfdb62d4d75416d41b451fb3c076233bbc
2023-07-25 17:14:38 -07:00
Melissa Jost
556c9154dd base: Add maybe_unused to findLsbSetFallback (#109)
When compiling with clang-14 I received the following error:

```
src/base/bitfield.hh:328:1: error: function 'findLsbSetFallback' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
```

This function was introduced in PR #76.
This fixes this compiler warning/error by using `[[maybe_unused]]`.

Change-Id: I0b99eab0a9e42ee1687e7a0594a5a7bf9588b422
2023-07-25 10:41:59 -07:00
Giacomo Travaglini
189d514f2f arch-arm: Hook TLBIOS instructions to the TlbiShareable obj (#114)
FEAT_TLBIOS has been introduced by a recent patch [1] which was however
missing to include the outer shareable case in the Msr disambiguation
switch. Which meant the TLBIOS instructions were decoded as normal MSR
instructions, with no effect whatsoever on the TLBs

[1]: https://gem5-review.googlesource.com/c/public/gem5/+/70567

Change-Id: I41665a4634fbe0ee8cc30dbc5d88d63103082ae9
2023-07-25 11:57:50 +02:00
Bobby R. Bruce
78849ac4fb Merge branch 'develop' into fix-bitfield-unused 2023-07-24 11:05:05 -07:00
Bobby R. Bruce
9f56bbd7dd misc: Update ci-tests.yaml to always clean runner (#111)
Adds line to make sure the runners are always cleaned whether or not the
previous tests pass

Change-Id: I980c0232305999fb3548464ea1b6eaeca7bcdbd6
2023-07-24 11:02:18 -07:00
Giacomo Travaglini
7dba30209a arch-arm: Hook TLBIOS instructions to the TlbiShareable obj
FEAT_TLBIOS has been introduced by a recent patch [1] which
was however missing to include the outer shareable case in the
Msr disambiguation switch. Which meant the TLBIOS instructions
were decoded as normal MSR instructions, with no effect whatsoever
on the TLBs

[1]: https://gem5-review.googlesource.com/c/public/gem5/+/70567

Change-Id: I41665a4634fbe0ee8cc30dbc5d88d63103082ae9
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2023-07-24 09:05:01 +01:00
Daniel Kouchekinia
984499329d mem-ruby,configs: Add GLC Atomic Latency VIPER Parameter (#110)
Added a GLC atomic latency parameter (glc-atomic-latency) used when
enqueueing response messages regarding atomics directly performed in
the TCC. This latency is added in addition to the L2 response latency
(TCC_latency). This represents the latency of performing an atomic
within the L2.

With this change, the TCC response queue will receive enqueues with
varying latencies as GLC atomic responses will have this added GLC
atomic latency while data responses will not. To accommodate this in
light of the queue having strict FIFO ordering (which would be violated
here), this change also adds an optional parameter bypassStrictFIFO to
the SLICC enqueue function which allows overriding strict FIFO
requirements for individual messages on a case-by-case basis. This
parameter is only being used in the TCC's atomic response enqueue call.

Change-Id: Iabd52cbd2c0cc385c1fb3fe7bcd0cc64bdb40aac
2023-07-23 15:57:06 -05:00
Melissa Jost
6a360bd1bb misc: Update ci-tests.yaml to always clean runner
Adds line to make sure the runners are always cleaned whether
or not the previous tests pass

Change-Id: I980c0232305999fb3548464ea1b6eaeca7bcdbd6
2023-07-21 15:53:12 -07:00
Jason Lowe-Power
0dd4334622 misc: Add workflow to close stale issues (#96)
Create a new workflow file that will hold jobs that are for managing the
repository, issues, prs, etc. This changeset then adds a job to close
issues that have been open for 30 days without a response someone marks
the issue as "needs details."

Change-Id: I23b9b6aa5fa67f205e116c88d5449cb69f53b6f9

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-21 12:36:24 -07:00
Gabriel Busnot
75b6fa5ad1 base: Ostream helpers (iterable, tuple, pair, enum, pointers, optional) (#77)
* base: Enable stl_helpers::operator<< in _formatString

The string format (%s) eventually relies on bare operator<< to
display any type T. This gives the opportunity to use the helpers in
stl_helpers. This patch enables printing enums, pairs, tuples,
vectors, maps and others in a PRINTF debug macro without any extra
manual operation.

Change-Id: I8ac85133ebadcb95354598c1cfe687d8fffb89e2

* base: Add Printer util class to force use of operator<< helpers

Wrapping any value in a Printer instance before using operator<< will
force the use of stl_helpers::operator<<.

Change-Id: I7b505194eeabc3e0721effd9b5ce98f9e151b807

* base: Fix typo in ostream_helpers.hh

Change-Id: I283a5414f3add4f18649b77153dcbcc8661bc81e

* base: Disambiguate null optional representation in ostream helper

Change-Id: I5b093555688566cc405248d3a448a8f3efa67888

* base: Add unit test for std::optional ostream helper

Change-Id: I6fb9ced5e6461de5685638a162b5534e10710e20

* base: Ostream helpers Printer unit test

Change-Id: I11db89e85fd40c12bceecb41cadee78b8e871d7b

* base: Unit test for ostream helpers for pointers and smart ptr

Change-Id: Ifa87e8b69fdd9a4869250ab40311f352e8f54ed9

* base: Coding style fix in ostream_helpers.test.cc

Change-Id: I095c7048fad35e63f979aa601bfc8cde65c9077b

* base: Test shared_ptr in ostream_helpers.test.cc

Change-Id: I553df0614f1dd6eef2061c4dc1794af8c543b78f

---------

Co-authored-by: Gabriel Busnot <gabriel.busnot@arteris.com>
2023-07-21 11:11:09 -07:00
Jason Lowe-Power
27cfe4cc1b Merge branch 'develop' into fix-invalid-pc-on-bubble 2023-07-21 08:10:03 -07:00
Bobby R. Bruce
01623fac68 stdlib,configs,tests: Remove deprecated Resource classes usage (#102)
* stdlib,configs,tests: Remove `Resource` class use

This class is deprecated, but was still used in various example
configuration scriots and tests. This patch replaces it with the
`obtain_resource` function.

Change-Id: I0c89bf17783ccaaafc18072aaeefb5d1e207bc55

* configs: Remove `CustomDiskImageResource` use

The class is deprecated but was still used in the SPEC example scripts.
This patch replaces it with the `DiskImageResource` class.

Change-Id: Ie0697fe59a3d737b05eb45ff3bc964f42b0387e0

* configs,tests: Remove `CustomResource` use

This class is deprecated but was still used in example scripts and
mentioned, incorrectly, in comments in the pyunit tests. This patch
removes these.

Change-Id: Icb6d02f47a5b72cd58551e5dcd59cc72d6a91a01

* stdlib: Remove '\' in Workload docstring example

This example shows how to use the Workload. The backslash is not correct Python and would fail if used in this way.

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>

---------

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-20 23:08:39 -07:00
Bobby R. Bruce
573573b5ba base: Add maybe_unused to findLsbSetFallback
When compiling with clang-14 I received the following error:

```
src/base/bitfield.hh:328:1: error: function 'findLsbSetFallback' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
```

This function was introduced in PR #76.
This fixes this compiler warning/error by using `[[maybe_unused]]`.

Change-Id: I0b99eab0a9e42ee1687e7a0594a5a7bf9588b422
2023-07-20 15:04:06 -07:00
Adwaith R Krishna
427b4d596e mem-garnet: Fix packet_id val in flit (#72)
Change-Id: I163b5a32972783bf2e99f3383b9f86776577b727

Co-authored-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2023-07-20 13:56:31 -07:00
Jason Lowe-Power
29832849f7 cpu-minor: Check pc valid before printing
In https://gem5-review.googlesource.com/c/public/gem5/+/52047 inst.pc
was changed from an object to a pointer. It is possible that this
pointer is null (e.g., if there is an interrupt and there is a bubble).
Make sure to check that it's not null before printing.

I believe that other places this pointer is dereferenced without an
explicit null check are safe, but I'm not certain.

Change-Id: Idbe246cfdb62d4d75416d41b451fb3c076233bbc
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-20 13:23:16 -07:00
Kunal Pai
3c6563d6f7 stdlib: Change resource compatibility warning (#91)
* stdlib: Change resource compatibility warning

If the gem5 version is "develop", the warning will not
be thrown.

Change-Id: Id2be1c4323c6ca06c5503c2885c1608f8d119420

* stdlib: Change resource compatibility warning

If the gem5 version is "develop", the warning will not
be thrown.

Change-Id: Id2be1c4323c6ca06c5503c2885c1608f8d119420

* tests: Edit obtain_resources warning test

Since we are editing the warning message for
the develop branch, the test removes the
warning message as well.

Change-Id: I90882340188360bb3435344cdc14b324412c6c0e

---------

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-20 12:00:49 -07:00
Melissa Jost
2a6d39aa88 misc: Split up tests in daily-tests.yaml
This splits up the gem5 library example tests by Suite UID, as
right now running them together uses the runner for a long
period of time.  It is important to note that doing this means
additional tests from this directory will need to be
manually added, such as the kvm tests.

Change-Id: Ib2a0aca08f9b51b60e9dd0528324372cf2d98c05
2023-07-20 10:43:32 -07:00
Hoa Nguyen
f7da973f34 cpu-kvm: Make using perf when using KVM CPU optional (#95)
* cpu-kvm: Add a variable signifying whether we are using perf

Change-Id: Iaa081e364f85c863f781723b5524d267724ed0e4
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* cpu-kvm: Making it clear the functionalities are specific to KVM

Change-Id: I982426f294d90655227dc15337bf73c42a260ded
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* cpu-kvm: Make perf optional

Change-Id: I8973c2a96575383976cea7ca3fda478f83e95c3f
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* configs: Add an example config of using KVM without perf

Change-Id: Ic69fa7dac4f1a2c8fe23712b0fa77b5b22c5f2df
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* Apply suggestions from code review

Co-authored-by: Jason Lowe-Power <jason@lowepower.com>

* misc: Add an example to the panic

Change-Id: Ic1fdfb955e5d8b9ad1d4f0a2bf30fa8050deba70
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* misc: Add warning of not using perf when using KVM CPU

Change-Id: I96c0832fb48c63a79773665ca6228da778ef0497
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* misc: Fix stuff

Change-Id: Ib407ae7407955b695f0e0f2718324f41bb0d768f
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

* misc: style fix

Change-Id: I7275942e43f46140fdd52c975f76abb3c81b8b0a
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>

---------

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Co-authored-by: Jason Lowe-Power <jason@lowepower.com>
2023-07-20 10:34:44 -07:00
Daniel Kouchekinia
1705853b12 mem-ruby: Added support for non-system-scope atomics in VIPER (#101)
Added support for performing non-SLC-set atomics in the TCC.
Previously, all atomics were being passed on by the TCC to the
directory. With this change, atomics will only be passed on if the SLC
bit is set or if the line isn't present or available in the TCC.

If a non-SLC atomic is passed on to the directory because it is not
present in the TCC, the atomic will be performed on the return path on
the Data event. To accommodate the directory not performing the atomic
in this case, this change also passes the SLC bit on to the directory.

The previously-named "Atomic" action has been renamed to
"AtomicPassOn", with the new "Atomic" corresponding to an atomic
performed directly in the TCC.

Change-Id: Ibf92f71ddceb38bd1b0da70b0a786cc4c3cf2669
2023-07-20 11:48:08 -05:00
rogerchang23424
566308dad9 scons: Add extra parent dir to CPPPATH if --no-duplicate-sources (#104)
In the previous version of gem5, the source files of extra directories
will copy to build directory for compilation. It will not be a problem
if the extra directories include *.h(*.hh) from the other extra
directories.

After the patch applied from the change
(https://gem5-review.googlesource.com/c/public/gem5/+/68758). The
source files of extra directories will not copy to the build directory
unless the user compiles gem5 with "--duplicate-sources". It will
cause the compilation error if the code includes a header file from
other repositories.

For example, assume we want to compile gem5 with "foo/bar1" and
"foo/bar2" repositories and they are gem5-independent. There are some
header files in "foo/bar1/a.h" "foo/bar1/b.h" and "foo/bar2/d.h". If
the code "foo/bar1/sample.c" tries to include the file "foo/bar2/d.h".
They usually include the file by declare "#include bar2/d.h" in
foo/bar1/sample.c. It can work if --duplicate-sources is specified in
gem5 build because they will copy to <builddir>/bar1 and
<builddir>/bar2 respectively, and -I<builddir> is specified by default
whether duplicate_sources or not. It will raise the compilation error
if the user does not specify it.

The change is aimed to let the situation work without
duplicate-sources specified by adding parent extra directory, and
adding them before the extra directories. If the --duplicate-sources
specified, it will not add parent extra directories to avoid repeat
include paths.

Change-Id: I461e1dcb8266d785f1f38eeff77f9d515d47c03d
2023-07-20 09:35:45 -07:00