diff --git a/README.md b/README.md index 380335ae06..7ab4cb757c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ # Quick Getting Started +More information regarding the build system and other subsystem of +QFlex can be found in the `docs`. + ## Install packages The following packages should be installed to build QEMU and FLEXUS -- GNU Compiler (gcc/g++) (with C++14 support) [Which GNU Compiler support which standard](https://gcc.gnu.org/projects/cxx-status.html) +- GNU Compiler (gcc/g++) 13 (with C++14 support) [Which GNU Compiler support which standard](https://gcc.gnu.org/projects/cxx-status.html) - [cmake](https://cmake.org) -- (conan)[https://conan.io) -- (meson)[https://mesonbuild.com] -- GNU Lib C (min 2.35) _Run `ldd --version` to know about_ +- [conan](https://conan.io) +- [meson](https://mesonbuild.com) +- GNU Lib C (min 2.35) _`ldd --version` to check_ - GNOME Lib C (min 2.72) No requirements for old/outdated Linux distributions. Just use latest ones. @@ -22,24 +25,13 @@ rm -rf ./qemu/middleware git clone -b feat/qemu-8.2 https://github.com/parsa-epfl/libqflex qemu/middleware ``` -## Building `prod` or `dev` version -Both QEMU and Flexus can be build both for production or developement. -The developement version enable the maximum debug compilation for GCC, and -add the address sanitizer (ASAN) with the flag `-fsanitize=address`, while also intoducing the frame pointer with `-fno-omit-frame-pointer`. - -To do so, use the debug flag (release|debug) when appropriate. - -```sh -./build [receipt] [(release|debug)] -``` - ## Building QEMU ```sh ./build cq ``` -## Building FLEXUS +## Building Flexus ```sh conan profile detect #One time only ./build keenkraken @@ -51,13 +43,13 @@ To do so, use the debug flag (release|debug) when appropriate. ln -s qemu/build/aarch64-softmmu/qemu-system-aarch64 qemu-aarch64 ``` -## Add Image +## Add Images -[Download a simple image](https://github.com/parsa-epfl/qflex/releases/download/2024.03/images.tar.xz) and place it the +[Download a simple image](https://github.com/parsa-epfl/qflex/releases/download/2024.05/images.tar.xz) and place it the repository root location. ```sh -wget https://github.com/parsa-epfl/qflex/releases/download/2024.03/images.tar.xz +wget https://github.com/parsa-epfl/qflex/releases/download/2024.05/images.tar.xz tar -xvf images.tar.xz ``` @@ -73,17 +65,12 @@ images/ └── rootfs.qcow2 ``` -# Run - -## Normal QEMU - +## Run ```sh -./runq images/busybox +./runq images/bb-trace # run keenkraken release version +./runq images/bb-timing-dev # run knottykraken debug version ``` - The filesystem now contains basic tools provided by `/bin/busybox` like `ls`, `cd`, etc. -You can modify any command line arguments passed to QEMU in the `emu` file, which just writes those arguments in a prettier format. - -# Notes +## Notes These repos are updated frequently, so please also pull them frequently. \ No newline at end of file diff --git a/docs/01-BUILD-FLEXUS.md b/docs/01-BUILD-FLEXUS.md index d6c33fd736..0b4e10ef78 100644 --- a/docs/01-BUILD-FLEXUS.md +++ b/docs/01-BUILD-FLEXUS.md @@ -2,13 +2,15 @@ BUILD FLEXUS ============ Installing QFlex require building both QEMU and Flexus (the uArch simulators). -This part focus on building *Flexus* +This part focus on building __Flexus__ ## Flexus -Flexus buildsystem has tow main parts. -First, the dependencies are managed by (Conan)[https://docs.conan.io/2.0/index.html]. This will download (and/or build) the required depedencies to build -Flexus. (Have look at this page to install conan)[https://docs.conan.io/2.0/installation.html] +Before anything make sure you have the + +Flexus buildsystem has tow main parts. +First, the dependencies are managed by [Conan](https://docs.conan.io/2.0/index.html). This will download (and/or build) the required depedencies to build +Flexus. [Have look at this page to install conan](https://docs.conan.io/2.0/installation.html) All the informations for this part is contained in the `conanfile.py`. Secondly, the compilations options and linking options are handled by CMake, and the @@ -24,7 +26,6 @@ conan profile detect ### Build Flexus - User mode This is aimed toward people who mainly need to use QFlex. - Then call the build script using the one of the following options. ```bash ./build [keenkraken/knottykraken] @@ -32,17 +33,28 @@ Then call the build script using the one of the following options. This will produce a directory called `out` in your current working directory. +#### Building `release` or `debug` version +Both QEMU and Flexus can be build both for production or developement. +The developement version enable the maximum debug compilation for GCC, and +add the address sanitizer (ASAN) with the flag `-fsanitize=address`, while also intoducing the frame pointer with `-fno-omit-frame-pointer`. + +To do so, use the debug flag (release|debug) when appropriate. + +```bash +./build [receipt] [(release|debug)] +``` + ### Build Flexus - Developer mode For those who will frequently build any of the Flexus simulators, here is the description of the CLI input to have the maximum understanding of the build process. -**Understanding the profile** +#### Understanding the profile [Profiles Doc](https://docs.conan.io/2.0/reference/config_files/profiles.html) The profile in flexus `target/_profile` directory are used to modified the behaviour of the dependency, compiler version, and standard version, or the build type in this case wether `Release`or `Debug`. These also have an influence on the verbosity of the output while building. -*Installing the dependencies* +#### Installing the dependencies The command install the dependencies for a given simulator and a given profile The name is required otherwise nothing will be built. The profile are recommended otherwise @@ -51,14 +63,14 @@ the output might not be conform nor buildable. conan install [dir with conanfile.py] -pr [profile] --name=[keenkraken/knottykraken] -of [output dir] -b missing ``` -*Building Flexus* +#### Building Flexus Building will also install the depdencies if they are not installed anyway. After installing the dependencies if any, this command will trigger CMake which will actually compile Flexus source code. ```bash conan build [dir with conanfile.py] -pr [profile] --name=[keenkraken/knottykraken] -of [output dir] -b missing ``` -*Exporting FLexus* +#### Exporting FLexus Used as a commodity, the following commands copy the output of the previous build to a more convinient location. As for now it is the top most location in the output directory. This will be hardly used by anyone developping because this require calling this command after every build. diff --git a/timing.cfg b/timing.cfg index 05a6435de7..bd43ac44f6 100644 --- a/timing.cfg +++ b/timing.cfg @@ -187,4 +187,4 @@ flexus.set "-magic-break:ckpt_cycle_name" "0" # "Base cy flexus.set "-mmu:cores" "0" # "Number of cores" (Cores) flexus.set "-mmu:itlbsize" "64" # "Size of the Instruction TLB" (iTLBSize) flexus.set "-mmu:dtlbsize" "64" # "Size of the Data TLB" (dTLBSize) -flexus.set "-mmu:perfect" "1" # "TLB never misses" (PerfectTLB) (1=true, 0=false) +flexus.set "-mmu:perfect" "0" # "TLB never misses" (PerfectTLB) (1=true, 0=false) \ No newline at end of file