Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
meetesh06 committed Oct 6, 2023
1 parent f58a1f4 commit d629e6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 212 deletions.
73 changes: 1 addition & 72 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1 @@
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-24ddc0f5d75046c5622901739e7c5dd533143b0c8e959d652212380cedb1ea36.svg)](https://classroom.github.com/a/b79484lS)
<p align="center">
<h1 align="center"> ChampSim </h1>
<p> ChampSim is a trace-based simulator for a microarchitecture study. If you have questions about how to use ChampSim, we encourage you to search the threads in the Discussions tab or start your own thread. If you are aware of a bug or have a feature request, open a new Issue. <p>
</p>

# TODO>

> Task 1: Generate plots for **prefetcher/ip_stride/ip_stride.cc**.
> __mee__: I will run and upload the results sometime.
> Task 2: Implement stream prefetcher
> Task 3: Implement prefetch throttling

# Using ChampSim

ChampSim is the result of academic research. To support its continued growth, please cite our work when you publish results that use ChampSim by clicking "Cite this Repository" in the sidebar.

# Compile

ChampSim takes a JSON configuration script. Examine `champsim_config.json` for a fully-specified example. All options described in this file are optional and will be replaced with defaults if not specified. The configuration scrip can also be run without input, in which case an empty file is assumed.
```
$ ./config.sh <configuration file>
$ make
```

# Run simulation

Execute the binary directly.
```
$ bin/champsim --warmup_instructions 200000000 --simulation_instructions 500000000 ~/path/to/traces/600.perlbench_s-210B.champsimtrace.xz
```

The number of warmup and simulation instructions given will be the number of instructions retired. Note that the statistics printed at the end of the simulation include only the simulation phase.

# Add your own branch predictor, data prefetchers, and replacement policy
**Copy an empty template**
```
$ mkdir prefetcher/mypref
$ cp prefetcher/no_l2c/no.cc prefetcher/mypref/mypref.cc
```

**Work on your algorithms with your favorite text editor**
```
$ vim prefetcher/mypref/mypref.cc
```

**Compile and test**
Add your prefetcher to the configuration file.
```
{
"L2C": {
"prefetcher": "mypref"
}
}
```
Note that the example prefetcher is an L2 prefetcher. You might design a prefetcher for a different level.

```
$ ./config.sh <configuration file>
$ make
$ bin/champsim --warmup_instructions 200000000 --simulation_instructions 500000000 600.perlbench_s-210B.champsimtrace.xz
```

# Evaluate Simulation

ChampSim measures the IPC (Instruction Per Cycle) value as a performance metric. <br>
There are some other useful metrics printed out at the end of simulation. <br>

Good luck and be a champion! <br>
# These are the traces for my impementation for various configurations
139 changes: 0 additions & 139 deletions examples/logg_test.csv

This file was deleted.

5 changes: 4 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
import { styled } from '@mui/material/styles';
import Paper from '@mui/material/Paper';
import Grid from '@mui/material/Grid';
import { AppBar, Divider, IconButton, TextField, Toolbar, Tooltip, Typography } from '@mui/material';
import { AppBar, Divider, IconButton, Link, TextField, Toolbar, Tooltip, Typography } from '@mui/material';

import LinearProgress from '@mui/material/LinearProgress';
import Slider from '@mui/material/Slider';
Expand Down Expand Up @@ -314,6 +314,9 @@ function App() {
<Divider style={{ marginTop: 15, marginBottom: 15 }} />
</div>
}
<Link href="https://github.com/meetesh06/CS683-ChampSimPrefetcherViz/tree/main/examples">
Example traces
</Link>
{
mainData.ADDR &&
<div style={{ textAlign: 'left' }}>
Expand Down

0 comments on commit d629e6a

Please sign in to comment.