# cas **Repository Path**: dorence/cas ## Basic Information - **Project Name**: cas - **Description**: CAche Simulator - **Primary Language**: C++ - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-24 - **Last Updated**: 2023-05-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CAS CAche Simulator, version `0.1.2`. ## Build System Dependencies, - [gcc](https://gcc.gnu.org) : required `>=6.1` (c++14), recommend `>=9.3` - [meson](https://mesonbuild.com) : required `>=0.59.0`, recommend `latest` - [ninja](https://ninja-build.org) : required `>=1.8.2`, recommend `latest` Installing `meson` & `ninja` with package management tools like `pip` or `conda`, ```sh # for pypi sudo pip3 install meson ninja # for conda sudo conda install meson ninja # for Alpine apk add meson ninja-build # for Debian/Ubuntu sudo apt-get install meson ninja-build # for Fedora/RedHat/CentOS sudo yum install meson ninja-build ``` Configure and run, `cas` is a *bash* shellscript wrapper for `meson`, ```sh # give executable permission chmod +x cas tools/* # configure meson project ./cas # or equivalently ./cas setup # use reconfigure when build option changes, or add new cpp/hpp files ./cas reconfigure # compile source codes, default with 6 concurrent jobs ./cas compile # recompile codes, with 8 concurrent jobs ./cas compile --clean -j8 # any file in `examples/` or `scratch/` folder, without '.cpp' suffix ./cas run scratch/example # or equivalently ./cas exec scratch/example ``` The workflow is basically `setup` (only once, as `cmake .`) -> `compile` (as `make`) -> `run`/`exec`. The `cas` will detect whether a scratch is executable, and compile if not, so fell free to directly use `run`/`exec`. We alse provide an **auto completion** (tab suggestion) for `./cas`, ```sh . tools/cas-prompt-sh.sh ``` ## Scratches Writing See `scratch/example.cpp` as a template. You can create `c++` source file in `scratch/` folder, `cas` will automatically detect all source files in `scratch/` and take them as compiling targets. ### FIU traces test Support onekey scripts. ```sh # Run all traces ./scripts/fiu/batchall.py # For individual scenario ./scripts/fiu/moodle.py # ./scripts/fiu/*.py # Plot result, need matplotlib and numpy cd scripts/plot ./compare.py ``` ### MSR traces test ```sh # Run all traces ./scripts/batch_all_msr.sh # For individual scenario ./scripts/mithril_web1.sh # ./scripts/mithril_*.sh ``` ## Generating Documents Install `doxygen` and graphviz(`dot`), ```sh # for Debian/Ubuntu sudo apt-get install doxygen graphviz # for Fedora/RedHat/CentOS sudo yum install doxygen graphviz ``` Run `doxygen` command, output to `build/docs/html/index.html` and a shortcut at `build/doc.html`. ```sh ./cas doxygen ``` Dot diagrams in doxygen need `Helvetica` font. ## Contrib - [qtoml](https://github.com/alethiophile/qtoml) Python MIT - [toml11](https://github.com/ToruNiina/toml11) C++ MIT