Commit Graph

22289 Commits

Author SHA1 Message Date
2channelkrt
f799d91309 ruby-chi: fix wrong ruby-CHI base class name (#1817)
fix ruby-CHI base class name so it actually runs

previously was combined with PR #1797
2024-12-04 15:47:44 -08:00
Giacomo Travaglini
8a9f61c546 misc: Add CHI section to the RELEASE-NOTES.md (#1833)
Change-Id: I2f01dd9c7a45c5f6baf57e4aad0f171417a6efb1

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-03 00:47:08 -08:00
Bobby R. Bruce
59ca5600ec misc: Update version info for v24.1 2024-12-02 11:10:28 -08:00
Giacomo Travaglini
c64a807f94 misc: Add ArmISA section to the RELEASE-NOTES.md file (#1822) 2024-12-02 09:38:02 -08:00
Junshi Wang
0a22e63467 arch-arm: Fix bug in VQRSHL.
If shiftAmt is 0, bits raise assert, causing core dump.

Change-Id: Ic4285f51a866ffc017645655e98674ca69a15a40
2024-12-02 08:46:57 -08:00
Erin (Jianghua) Le
1e5021c2e3 tests: modify gem5/learning-gem5 ref file to fix failure (#1795)
The test `ruby_test_test-ALL-x86_64-opt-MatchStdout` is currently
failing because the reference file doesn't match the actual output. This
PR changes the reference file to match.
2024-12-02 08:46:10 -08:00
Nicholas Mosier
25523e73a4 arch-x86, sim-se: move mmap end downward in case of large stacks (#1810)
Fix #1809. Shift the mmap end to a lower address in case the process has
a large max stack size, to avoid overlapping the stack with the mmap
memory range.

Change-Id: Idae343dbbe851a7510463ff141c03f1847e36328
2024-12-02 08:44:54 -08:00
Giacomo Travaglini
1b16697029 mem-ruby: Fix conflict between 117 and 1084
This is fixing the conflict between the multi-ruby [1] and the CHI-TLM
[2] PRs

[1]: https://github.com/gem5/gem5/pull/117
[2]: https://github.com/gem5/gem5/pull/1084

Change-Id: Ie9c6381c361ac344e22984d8a53ed03c387b0b43
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-02 08:43:58 -08:00
Harshil Patel
e51bc00dc7 misc: revert riscvmatched-fs.py due to a bug
- link to issue https://github.com/gem5/gem5/issues/1554

Change-Id: Ic9cf6e5166eeee2226b6022e6f7c971d4e7caaeb
2024-12-02 08:41:58 -08:00
Erin (Jianghua) Le
e221a70355 Add ExitEvent import to arm-ubuntu-run.py 2024-12-02 08:41:58 -08:00
Harshil Patel
630173a845 misc: update fs examples to use ubuntu 24.04 boot workloads
Change-Id: I7e16f69eff3a7ff0ab16c18e6d35e846d07ac829
2024-12-02 08:41:55 -08:00
Roger Chang
40ccb8b171 arch-riscv: Use getValidAddr to get zero-extend address in RV32 mode
Previous PR #1758 implements the generic getValidAddr to get pure
vaddr without any tags or sign-extend bits.

In RISC-V implementation, the getValidAddr will zero-extend
address in RV32 mode and use it to do TLB translation. Use
getValidAddr to get zero-extend vaddr can reduce zero-extend
repetition

Change-Id: I2273ce48bccb873790103ba0fcdb0b48de9ced4c
2024-12-02 08:33:15 -08:00
studyztp
3a2cfb2dee cpu: fix looppoint anaylsis param python string spacing
Change-Id: I98fe434f1066f12b975425e49baca6e6a6087dab
2024-12-02 08:33:14 -08:00
studyztp
0f0a6a7851 cpu: fix pc count pair helper function return type
Change the helper function's return type from int to uint64_t

Change-Id: I34b6b563a6333bbf8516a16d2ad4b76b7c16bfe4
2024-12-02 08:33:14 -08:00
studyztp
4ce0f20436 cpu: make PcCountPair use 64 bit unsigned int for count
In PcCountPair param, change the type for "count" from 32 bit int to
64 bit unsigned int.

Change-Id: I2dc1bb2692914f06eaaae9bd5bbfb061bcbbfb8b
2024-12-02 08:33:14 -08:00
studyztp
6a9db637ae cpu: add function to get inst map of each basic block
Change-Id: I147d8c90cdfc7bf795d1c6a6daf96e11fa1c0858
2024-12-02 08:33:14 -08:00
studyztp
7ffa3646bd cpu: fix the incorrect debug message
Change-Id: I062e359e8c9205a9a993a33865434922c1f540b8
2024-12-02 08:33:14 -08:00
studyztp
1410c29147 cpu: modified after review feedback
src/cpu/simple/probes/LooppointAnalysis.py:
- remove default values for bb_valid_addr_range and
marker_valid_addr_range
- add more comments to explain parameter behaviors
- add citation to the LoopPoint paper

src/cpu/simple/probes/looppoint_analysis.cc:
- fix the incorrect styles
- remove updateBackwardBranch() function call
- match the style of checking if listeners vector is empty
- change the way of stopListening() to remove the listeners through the
manager instead of through the ProbeListener object's destructor.

src/cpu/simple/probes/looppoint_analysis.hh:
- removed backwardBranchPC and use the backwardBranchCounter to replace
its functionaility. Therefore, also removed updateBackwardBranch
function.

Change-Id: Id2430e2f04e61f72d5c4f1aad5cfd4d24a0fbc45
2024-12-02 08:33:14 -08:00
studyztp
89717eca3c cpu: add more debug flags
Change-Id: I4edd8f383294f76d3e76895d3a631cba21a45f90
2024-12-02 08:33:14 -08:00
studyztp
753d9971d2 cpu: add more comments to looppoint_analysis.cc
Change-Id: I027db66ffed0cd5957bae2a9a36286ca1c73c313
2024-12-02 08:33:14 -08:00
studyztp
a1072357c1 cpu: fix a issue
Change-Id: Iab621e294c84c7f5c704882b0c681f950ad08f9c
2024-12-02 08:33:13 -08:00
studyztp
abc8a4a483 cpu: fix a wrong file path
Change-Id: I93343f4053c7a6d1bd4b6972a1e7c3dbc073c979
2024-12-02 08:33:13 -08:00
studyztp
cd29b199ce cpu: add the python class
Add the python classes for the LooppointAnalysis and the
LooppointAnalysis Manager.

Change-Id: I0a882bc1a9ef03b7b482e871a7160e7c33f9ac08
2024-12-02 08:33:13 -08:00
studyztp
e10fff4876 cpu: add looppoint_analysis.cc content
Add LooppointAnalysis and LooppointAnalysisManager function definitions

Change-Id: I1c05072ebf1b744ee102a82f8de2b93bab4a056f
2024-12-02 08:33:13 -08:00
studyztp
fff6c895fe cpu: add comments and improve naming in looppoint_analysis.hh
Add comments to most variables and functions.
Change the naming of some variables and functions to improve the
clearness.

Change-Id: Idb557ec84698b4344ed4683f5de87b1a3c2fd66d
2024-12-02 08:33:13 -08:00
studyztp
3c7c7b8b54 cpu: add looppoint_analysis.hh content and licenses
In looppoint_analysis.hh, added LooppointAnalysis and
LooppointAnalysisManager classes.
Added all functions and variables for the classes.
Comments needed.

Change-Id: Ia7425b672ef092a68c99b702136850bfa1fcf0a2
2024-12-02 08:33:13 -08:00
studyztp
157d89e255 cpu: add basic files for LoopPoint analysis
Because the LoopPoint analysis will be done with ATOMIC CPU, so all
files related to the LoopPoint analysis object will be under
/src/cpu/simple/probes.

Change-Id: Icbdb0742b712a23dc8f6a19f4c1c827a1f5bf288
2024-12-02 08:33:13 -08:00
Matthew Poremba
9fe8c7cd74 stdlib: Updates to VIPER board after all protocols PR 2024-12-02 08:33:13 -08:00
Jason Lowe-Power
6cf5a46f68 stdlib: Update names for GPU children
This change updates the names for the GPU children in a better way than
overriding the parent. Now it looks something like

```text
board.gpus.shader.CUs00
board.gpus.gpu_caches.ruby_gpu.controllers02
board.gpus.memory.mem_ctrl0
```

Note that it is "gpus" with an "s" because the board accepts more than 1
GPU, optionally.

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-12-02 08:33:12 -08:00
Jason Lowe-Power
c75c267e34 stdlib: Remove debug prints
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-12-02 08:33:12 -08:00
Jason Lowe-Power
e93f498aac stdlib: Add get_devices to abstract board
This function returns the GPUs (for now, possibly other devices in the
future). It needs to be in the abstract board so the GPU-specific cache
hierarchies can be used with non-GPU boards.

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-12-02 08:33:12 -08:00
Jason Lowe-Power
bec9ae77e6 stdlib: Override the readfile contents in GPU board
This prepends loading the GPU drivers to anything passed in via the
readfile_contents. Note that if the user sets a specific readfile via a
file they will be responsible for loading the driver

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
2024-12-02 08:33:12 -08:00
Mahyar Samani
2fca39cec7 dev-amdgpu: Separating gpu_memory from gpu_cache.
This change separates the instantiation of gpu memory from
instantiatiing the gpu cache. Prior to this change, the gpu
cache instantiated the memories for the gpu by receiving number
of channels as a parameter. With this change, the gpu memory
should be constructed outside the gpu, without being added as a
child to any other object, and passed to the constructor of
the gpu.
2024-12-02 08:33:12 -08:00
Mahyar Samani
1948155fb2 stdlib: AbstractMemorySystem.get_mem_interfaces.
This change adds a new method to AbstractMemorySystem to allow
getting its objects of the class MemInterface. This is useful
when certain other classes require a list of MemInterface objects
to create physical memory. In addition, ChanneledMemory and
HighBandwidthMemory implement this function.
2024-12-02 08:33:12 -08:00
Maryam Babaie
c0c0955178 dev-amdgpu: Adding support for avs extended states and features. 2024-12-02 08:33:12 -08:00
Matthew Poremba
2105dc47a9 stdlib: Add viper board, viper cache, and gpu components
Adds GPU_VIPER protocol related caches to stdlib components: CorePair
cache, TCP, SQC, TCC, Directory, and DMA controllers. Adds GPU related
components in a new components/devices/gpus/ directory. Adds prebuilt
GPU and CPU cache hierarchies, GPU and CPU network classes, and a board
overriding the X86Board to provide helper methods for disk image root,
the complex kernel parameter list, and method to provide functionality
to the current GPUFS scripts to load in applications and handle loading
the GPU driver.

The new GPU components can be used as follows:
 - Create a GPU device *before* the CPU cache hierarchy is created.
 - Add the GPU's CPU-side DMA controllers to the list of CPU cache
   controllers.
 - Use GPU device method to connect to an AbstractBoard.

Each GPU components has it's own RubySystem, PCI device ID, and address
ranges for VBIOS and legacy PCI BARs. Therefore, in theory, multiple
GPUs can be created. This requires PR #1453 .

An example of using this board is added to configs/example/gem5_library
under x86-mi300x-gpu.py. It is designed to work with the disk image,
kernel, and applications provided in the gem5-resources repository.

Change-Id: Ie65ffcfee5e311d9492de935d6d0631260645cd3
2024-12-02 08:33:12 -08:00
Giacomo Travaglini
44b8f5f422 tests: Write unit-tests for ruby using the CHI-TLM library
This commit is adding two python files:

* ruby_mem_test.py is the canonical gem5 configuration script,
and it is an adaptation of the existing ruby_mem_test.py [1].
The main difference is the use of the TlmController as a
cache controller, and the use of TlmGenerator instead of
the MemTest memory tester. The config is minimally setting up
the system. The extent of the testing is specified in the second
python file:

* read_shared_unit.py: "unit-test" for the CHI ReadShared request
The file should be passed to the ruby_mem_test.py as cmdline
argument:

build/ARM/gem5.opt <>/ruby_mem_test.py <>/read_shared_unit.py

This is a simple testing file. We should ideally generate separate
test files for separate transactions/scenarios.
The test file can have whatever for inside, it only needs to comply
to the minimal interface required by the ruby_mem_test.py, which is
to define the following function:

def test_all(generator):

[1]: https://github.com/gem5/gem5/blob/stable/\
    configs/example/ruby_mem_test.py

Change-Id: I767ede9b8572f3eafe677c84da45fd904d77e319
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-02 08:33:11 -08:00
Giacomo Travaglini
706cb4195f mem-ruby: Add a CHI-TLM transaction Generator for testing
This commit is building over the CHI-TLM wrapping introduced
by the previous commit and it is adding a CHI traffic generator
as a SimObject.
This will get the python objects as input and it will forward
them to the TlmController to convert them into ruby CHI
messages

Change-Id: Ia67094c9bb880e37b24184313df546ecbaa3289f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-02 08:33:11 -08:00
Giacomo Travaglini
786e539fa4 mem-ruby: Wrap the CHI-TLM library with pybind11
This commit is wrapping the external AMBA CHI-TLM with pybind11
so that it will be possible to use its data structures/functions
from python.

More specifically we will be able to instantiate a ARM::CHI::Payload
and ARM::CHI::Phase from a gem5 config, with the end goal of being
able to configure a CHI transaction from python

Change-Id: I9587b445c21df44161fa3d9e09fc2651541b38bd
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-02 08:33:11 -08:00
Giacomo Travaglini
b795d28ee8 mem-ruby: Add a CHI-TLM CacheController
This commit is extending the previously defined CHIGenericController
to implement a CacheController which acts as a bridge between the
AMBA TLM 2.0 implementation of CHI [1][2] with the gem5 (ruby) one.

In other words it translates AMBA CHI transactions into ruby
messages (which are then forwarded to the MessageQueues)
and viceversa.

ARM::CHI::Payload,         CHIRequestMsg
                     <-->  CHIDataMsg
ARM::CHI::Phase            CHIResponseMsg
                           CHIDataMsg

[1]: https://developer.arm.com/documentation/101459/latest
[2]: https://developer.arm.com/Architectures/AMBA#Downloads

Change-Id: I6f35e7b4ade4d0de1b5e5d2dbf73ce796a9f9fb6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-02 08:33:11 -08:00
Giacomo Travaglini
76541929c9 configs: Instantiate RNFs and MN via callbacks
This commit allows top level configs making use of the Ruby module
to define node generation callbacks.
The config_ruby function will check the system object for two
factory methods

1) _rnf_gen, if defined, will be called to generate RNFs
2) _mn_gen, if defined, will be called to generate MNs

Change-Id: I9daeece646e7cdb2d3bfefa761a9650562f8eb4b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-12-02 08:33:11 -08:00
Tiago Mück
390c2b67e4 mem-ruby: Implement a CHI generic controller
Component implementing a generic controller that allow classic caches
interaction with Ruby/CHI.
The CHIGenericController provides an interface to send/receive CHI
messages to/from the interconnect. This is implement in C++ rather then
SLICC. This controller is seen as a MachineType:Cache by the CHI
implementation in SLICC.

Change-Id: I3afc4363f4290095c2f7428c8487bccd932e0300
2024-12-02 08:33:11 -08:00
Tiago Mück
488c6fc246 mem-ruby: add CHI missing valid SnpRespData type
Change-Id: I49c24e8b99932f8ae88511bb7a08a94f59ce7d29
2024-12-02 08:33:11 -08:00
Tiago Mück
bc52d886a8 mem-ruby: add CHI SnpRespData_SD_Fwded_SC message
This snoop reponse is not generated internally by the SLICC
implementation, but is required for compatibility with classic caches
which may remain in SD state while returning SC data upon receiving
a converted SnpShared.

Change-Id: I5270b29c8863c7afd8abc39b3c7978b95330c183
2024-12-02 08:33:10 -08:00
Tiago Mück
f37dfc090d mem-ruby: sequencer prints panic pkts
Change-Id: I9cd780597c4680513d9cbeb8dda2e13f2a1faf56
2024-12-02 08:33:09 -08:00
Bobby R. Bruce
85c00a2ebc misc: Fix types in RELEASE_NOTES.md 2024-11-19 15:28:40 -08:00
Bobby R. Bruce
2d8a2eab70 misc: Revert bad merge
Merge 78db0e2 was bad and cause problems. This commit reverts it.
2024-11-19 15:02:02 -08:00
Saúl
c54132bdd9 arch-riscv: fix reg dep autoref on vslide with vcpy micro (#1782)
Vector slide instructions can have the same register group as source and
destination.
Because we are pinning the destination this will provoke an
auto-reference in the dependency graph.

The solution is to use the `vcpy` micro. This way we use the `vtmp`
register group as source and pin the destination without issues.
2024-11-19 11:18:45 -08:00
Erin (Jianghua) Le
75c4003a7e python: modify comment for ExitEvent.WORKEND (#1790)
This PR modifies the documentation for ExitEvent.WORKEND in simulator.py
so it is more consistent.
2024-11-19 11:17:59 -08:00
Bobby R. Bruce
5f01a03bde arch-arm,misc: Fix build errors (#1789)
1. Add missing override to `print` function.
2. Change `TlbEntry` to struct in `ArmISA` class.

This was found attempting to compile gem5 on MacOS (Apple Silicon) with
clang v19.
2024-11-19 11:14:54 -08:00