From abad038b9f038711697b16eb08a6d005b0f976ec Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Mon, 8 Jul 2024 11:18:18 +0200 Subject: [PATCH 01/21] cfg: modify config to accomodate SplitDestinationMapper --- 2x3-mesh.topology | 42 ++++++++++++++++++++++++++++++++++++++++++ timing.cfg | 8 ++++---- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 2x3-mesh.topology diff --git a/2x3-mesh.topology b/2x3-mesh.topology new file mode 100644 index 0000000000..472bd0af9d --- /dev/null +++ b/2x3-mesh.topology @@ -0,0 +1,42 @@ +# Boilerplate stuff +ChannelLatency 1 +ChannelLatencyData 4 +ChannelLatencyControl 1 +LocalChannelLatencyDivider 4 +SwitchInputBuffers 1 +SwitchOutputBuffers 1 +SwitchInternalBuffersPerVC 1 + +# Basic Switch/Node connections +NumNodes 6 +NumSwitches 2 +SwitchPorts 7 +SwitchBandwidth 4 + +Top Node 0 -> Switch 0:0 +Top Node 1 -> Switch 1:0 +Top Node 2 -> Switch 0:1 +Top Node 3 -> Switch 1:1 +Top Node 4 -> Switch 0:2 +Top Node 5 -> Switch 1:2 + +# Topology for a 6 node MESH with 3 nodes per router +Top Switch 0:5 -> Switch 1:3 + +# Deadlock-free routing tables + +# Switch 0 -> * +Route Switch 0 -> 0 { 0:0 } +Route Switch 0 -> 1 { 5:0 } +Route Switch 0 -> 2 { 1:0 } +Route Switch 0 -> 3 { 5:0 } +Route Switch 0 -> 4 { 2:0 } +Route Switch 0 -> 5 { 5:0 } + +# Switch 1 -> * +Route Switch 1 -> 0 { 3:0 } +Route Switch 1 -> 1 { 0:0 } +Route Switch 1 -> 2 { 3:0 } +Route Switch 1 -> 3 { 1:0 } +Route Switch 1 -> 4 { 3:0 } +Route Switch 1 -> 5 { 2:0 } diff --git a/timing.cfg b/timing.cfg index dc40ef4758..1088ede390 100644 --- a/timing.cfg +++ b/timing.cfg @@ -14,7 +14,7 @@ flexus.set "-ufetch:iline" "64" # "Icache flexus.set "-ufetch:size" "16384" # "ICache size in bytes" (Size) flexus.set "-ufetch:associativity" "4" # "ICache associativity" (Associativity) #flexus.set "-ufetch:miss_queue_size" "4" # "Maximum size of the fetch miss queue" (MissQueueSize) -#flexus.set "-ufetch:threads" "1" # "Number of threads under control of this uFetch" (Threads) +flexus.set "-ufetch:threads" "1" # "Number of threads under control of this uFetch" (Threads) #flexus.set "-ufetch:send_acks" "1" # "Send acknowledgements when we received data" (SendAcks) #flexus.set "-ufetch:use_reply_channel" "1" # "Send replies on Reply Channel and only Evicts on Snoop Channel" (UseReplyChannel) #flexus.set "-ufetch:evict_on_snoop" "0" # "Send evicts on Snoop Channel (otherwise use Request Channel)" (EvictOnSnoop) @@ -136,14 +136,14 @@ flexus.set "-nic:send-capacity" "4" # "Send Qu # network: MemoryNetwork flexus.set "-network:nodes" "0" # "Number of Nodes" (NumNodes) -flexus.set "-network:topology-file" "1x3-mesh.topology" # "Network topology file" (NetworkTopologyFile) +flexus.set "-network:topology-file" "2x3-mesh.topology" # "Network topology file" (NetworkTopologyFile) flexus.set "-network:virtual-channels" "3" # "Number of virtual channels" (VChannels) # net-mapper: SplitDestinationMapper flexus.set "-net-mapper:Cores" "0" # "Number of cores" (Cores) flexus.set "-net-mapper:MemControllers" "1" # "Number of memory controllers" (MemControllers) -flexus.set "-net-mapper:Directories" "1" # "Number of directories" (Directories) -flexus.set "-net-mapper:Banks" "1" # "Number of banks" (Banks) +flexus.set "-net-mapper:Directories" "0" # "Number of directories" (Directories) +flexus.set "-net-mapper:Banks" "0" # "Number of banks" (Banks) flexus.set "-net-mapper:DirInterleaving" "64" # "Interleaving between directories (in bytes)" (DirInterleaving) flexus.set "-net-mapper:MemInterleaving" "64" # "Interleaving between memory controllers (in bytes)" (MemInterleaving) flexus.set "-net-mapper:DirXORShift" "-1" # "XOR high order bits after shifting this many bits when calculating directory index" (DirXORShift) From 5548d3ae563857ba43c9d7affb0858740b42405c Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Tue, 9 Jul 2024 11:38:43 +0200 Subject: [PATCH 02/21] cfg: update timing configuration This configuration allows to run at least 10000 cycles Also it comments out all unneeded cache configuration --- timing.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timing.cfg b/timing.cfg index 1088ede390..14f27840d0 100644 --- a/timing.cfg +++ b/timing.cfg @@ -8,7 +8,7 @@ flexus.set "-fag:threads" "1" # "Number #flexus.set "-ufetch:flines" "2" # "Max i-cache lines fetched per cycle" (MaxFetchLines) #flexus.set "-ufetch:finst" "3" # "Max instructions fetched per cycle" (MaxFetchInstructions) flexus.set "-ufetch:iline" "64" # "Icache line size in bytes" (ICacheLineSize) -#flexus.set "-ufetch:perfect" "0" # "Use a perfect ICache" (PerfectICache) +flexus.set "-ufetch:perfect" "0" # "Use a perfect ICache" (PerfectICache) #flexus.set "-ufetch:prefetch" "1" # "Enable Next-line Prefetcher" (PrefetchEnabled) #flexus.set "-ufetch:clean_evict" "1" # "Enable eviction messages" (CleanEvict) flexus.set "-ufetch:size" "16384" # "ICache size in bytes" (Size) From 911bccb9d7e634eecec95e4ef907b01bb3c7cc77 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Tue, 9 Jul 2024 11:41:32 +0200 Subject: [PATCH 03/21] module: update QEMU and FLEXUS Fault free version that can at least run 10.000 cycles on BusyBox. Has TAGE Update Nic network topology --- .gitmodules | 2 +- flexus | 2 +- qemu | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6935ffd08e..fa72ffa220 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "flexus"] path = flexus url = git@github.com:parsa-epfl/flexus.git - branch = master + branch = maintainer/bryan [submodule "qemu"] path = qemu url = git@github.com:parsa-epfl/qemu.git diff --git a/flexus b/flexus index f0e14cfee9..1634bd1dbd 160000 --- a/flexus +++ b/flexus @@ -1 +1 @@ -Subproject commit f0e14cfee9899d0d968c4bb49eae661f6ce37a70 +Subproject commit 1634bd1dbddc3d398f7f24e23f3f5585a577c865 diff --git a/qemu b/qemu index efd0b5779c..3b1ee0b9d9 160000 --- a/qemu +++ b/qemu @@ -1 +1 @@ -Subproject commit efd0b5779ccc594874d2eced2d196f6348e99665 +Subproject commit 3b1ee0b9d9c02c612799ade28beeffce519ba370 From cf417e8cdea141d2171f79e2f251053baf56cf7a Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Thu, 11 Jul 2024 14:24:27 +0200 Subject: [PATCH 04/21] chores: remove uneeded config Delete 'emu' file Scale compilation to system core --- README.md | 2 +- build | 4 ++-- emu | 65 ------------------------------------------------------- runq | 1 - 4 files changed, 3 insertions(+), 69 deletions(-) delete mode 100644 emu diff --git a/README.md b/README.md index 814f10ab0a..c49438c613 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ ln -s qemu/build/aarch64-softmmu/qemu-system-aarch64 qemu-aarch64 repository root location. ```sh -wget https://github.com/parsa-epfl/qflex/releases/download/2024.05/images.tar.xz +wget https://github.com/parsa-epfl/qflex/releases/download/2024.07-next/images.tar.xz tar -xvf images.tar.xz ``` diff --git a/build b/build index e5c203d2ea..b7f86bba48 100755 --- a/build +++ b/build @@ -40,10 +40,10 @@ case $SIM in fi popd - make -C qemu -j4 + make -C qemu -j ;; [Qq]) - make -C qemu -j4 + make -C qemu -j ;; *) echo "Never heard of '${SIM}'" diff --git a/emu b/emu deleted file mode 100644 index f2375667a4..0000000000 --- a/emu +++ /dev/null @@ -1,65 +0,0 @@ -nographic -savevm-external - -machine - virt - gic-version max - virtualization on - -cpu - max - pauth-impdef on - -bios - ${BIOS} - -parallel - none - -smp - ${SMP} - -m - 2G - -rtc - clock vm - - -drive - file ${ROOT}/images/base.qcow2 - format qcow2 - if virtio - - -IF snap -loadvm-external - ${snap} - -singlestep - -d - nochain - -icount - shift 0 - sleep on - align off - -qflex - -IF trace - lib-path ${root}/KeenKraken/libKeenKraken.so - cfg-path ${root}/trace.cfg -ENDIF - -IF timing - timing - lib-path ${root}/KnottyKraken/libKnottyKraken.so - cfg-path ${root}/timing.cfg - debug vverb -ENDIF - - cycles 1000000000 - cycles-mask 1 -ENDIF \ No newline at end of file diff --git a/runq b/runq index ba7bb6a3fc..24edc4db19 100755 --- a/runq +++ b/runq @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - """ # # ___ From ddfab72fd7e8cd4c8928866aa63e0c28d6a587b9 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Thu, 11 Jul 2024 16:07:23 +0200 Subject: [PATCH 05/21] docs: add runq documentation --- docs/02-RUNQ.md | 109 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 docs/02-RUNQ.md diff --git a/docs/02-RUNQ.md b/docs/02-RUNQ.md new file mode 100644 index 0000000000..de7fecec3c --- /dev/null +++ b/docs/02-RUNQ.md @@ -0,0 +1,109 @@ +RUNQ +==== + +This document shows all about how to run any of the uArch simulators (KeenKraken & KnottyKraken). + +## Config File +QFlex uses two differents type configuration files. + +The first is a custom file version of a QEMU invokation arguments. The file type can have any name and any extension. + +The second, `trace.cfg` and `timing.cfg` are used to configure KeenKraken or KnottyKraken. They are written in a specific structure only parsable by Flexus. The file type can have any name and any extension. + +### QEMU Config + +The config file is pure text, and shall follow the following standard. +- Top level options should be written without any dash (-) nor any whitespaces prepended +- 2nd level options needs to be indented with the same amount of whitespace along the file. + +All key-value arguments whether top or second level, needs a space between their key and their valu. + + +```txt + +nographic + +machine + virt + gic-version max + virtualization on + +cpu + max + pauth-impdef on + +parallel + none +m + 4G + +rtc + clock vm +``` + +The config contains three variables defined by `runQ`. +- ROOT: Give the location where the `runQ` executable is located +- SMP: The number of core to use for the next run, default=1 +- EXTRA: Arbitry command passed by the command line, usually used to add uArch simulator specific arguments + +```txt + +kernel + ${ROOT}/Busybox/Image +smp + ${SMP} + +drive + file ${ROOT}/Busybox/rootfs.qcow2 + format qcow2 + if virtio + +libqflex + mode trace + lib-path ${ROOT}/../out/keenkraken/Debug/libkeenkraken.so + cfg-path ${ROOT}/../trace.cfg + debug vverb + ${EXTRA} +``` + +### uArch Config +`trace.cfg` and `timing.cfg` files contains variables definition that will overload the default ones. The best way to change the configuration is to rely on the file themselves and their documentation. + +## runQ +This utility is written in pure Python. There is no requirement on the python verison; 3.11.9 is version known to work. + +Before using `runQ` you may want to make the file executable using `chmod +x runq`. `runQ` have an information page accessible using `./runq -h`. + +### Basic + +`runQ` must take a configuration file as input. + +```bash +./runq my_dir/my_config +``` + +The number of cores can be changed easily using `--smp`. + +```bash +./runq my_dir/my_config --smp 64 +``` + +### Debug + +`runQ` contains debug options: +- `-d`,`--dry` : Print QEMU start command instead of executing it +- `-b`,`--binary` : Set a custom binary to uses instead of looking in the current working directory +- `--gdb` : Start a GDB instance an execute the command in it + +### Simulator + +The extra flags `-e`, or `--extra` can be used to add arguments to an existing configuration file. The argument will be set in place of the ${EXTRA} placeholder. + +```txt +libqflex + mode trace + lib-path ${ROOT}/../out/keenkraken/Debug/libkeenkraken.so + cfg-path ${ROOT}/../trace.cfg + debug vverb + ${EXTRA} +``` \ No newline at end of file From c5f8b09e263054bba08d5d75c6ce69190350a656 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Thu, 11 Jul 2024 17:57:29 +0200 Subject: [PATCH 06/21] ci: fix recursive module for CI --- .github/workflows/00-build.yaml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/00-build.yaml b/.github/workflows/00-build.yaml index fd0bb585f2..f5eb2e4f1a 100644 --- a/.github/workflows/00-build.yaml +++ b/.github/workflows/00-build.yaml @@ -1,5 +1,3 @@ - - name: Build Binaries run-name: '[${{ github.event_name }}] ${{ github.ref_name }}' @@ -18,19 +16,14 @@ on: - 'docs/**' - '*.md' - #TODO: Once 'main' is replaced - # schedule: - # # Every Wednesday at midnight - # - cron: '0 0 * * 3' - # Full concurrent concurrency: group: ${{ github.workflow }} cancel-in-progress: true -# Develop build only for weekly build +# Maight be set dynamically env: - debug: ${{ (github.event_name == 'schedule') && 'debug' || 'release' }} + debug: release jobs: # Scan the working directory to trigger build based on @@ -58,7 +51,7 @@ jobs: build_simulator: name: Build Simulators needs: paths-filter - if: ${{ (needs.paths-filter.outputs.flexus == 'true') || github.event_name == 'schedule' }} + if: ${{ (needs.paths-filter.outputs.flexus == 'true') }} env: CC: gcc-13 CXX: g++-13 @@ -75,7 +68,7 @@ jobs: - name: Checkout QFlex uses: actions/checkout@v4 with: - submodules: true + submodules: recursive - uses: actions/setup-python@v5 with: @@ -94,7 +87,7 @@ jobs: build_qemu: name: Build Qemu needs: paths-filter - if: ${{ (needs.paths-filter.outputs.qemu == 'true') || github.event_name == 'schedule' }} + if: ${{ (needs.paths-filter.outputs.qemu == 'true') }} runs-on: ubuntu-latest container: @@ -104,7 +97,7 @@ jobs: - name: Checkout QFlex uses: actions/checkout@v4 with: - submodules: true + submodules: recursive - name: Build run: ./build cq ${{ env.debug }} \ No newline at end of file From 8b8e38d136ab67fa70453377f51dff440bb4b986 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Mon, 22 Jul 2024 18:49:48 +0200 Subject: [PATCH 07/21] module: update QEMU and FLEXUS QEMU: - add multiple API for timing FLEXUS - add JSON ckpt - add TAGE - add Decoder --- .gitmodules | 2 +- flexus | 2 +- qemu | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index fa72ffa220..6935ce4b32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,4 +5,4 @@ [submodule "qemu"] path = qemu url = git@github.com:parsa-epfl/qemu.git - branch = master \ No newline at end of file + branch = next \ No newline at end of file diff --git a/flexus b/flexus index 1634bd1dbd..629b9847b6 160000 --- a/flexus +++ b/flexus @@ -1 +1 @@ -Subproject commit 1634bd1dbddc3d398f7f24e23f3f5585a577c865 +Subproject commit 629b9847b6b523bace8a49b90e6d89ea4f25e98b diff --git a/qemu b/qemu index 3b1ee0b9d9..e3f980acb8 160000 --- a/qemu +++ b/qemu @@ -1 +1 @@ -Subproject commit 3b1ee0b9d9c02c612799ade28beeffce519ba370 +Subproject commit e3f980acb84cffe8909f9f743bfa94c2ccbece51 From f905d40be7356ecf992d69122c7fadc835520469 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Wed, 31 Jul 2024 12:24:23 +0200 Subject: [PATCH 08/21] cfg: add .editorconfig --- .editorconfig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..277a859170 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,27 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = false + +# Unix-style newlines with a newline ending every file +[*] +trim_trailing_whitespace = true +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 4 + +# 4 space indentation +[*.py] +indent_style = space +indent_size = 4 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + +# Matches the exact files either package.json or .travis.yml +[*.{json,yml,yaml,toml}] +indent_style = space +indent_size = 2 \ No newline at end of file From 95e598f6f8538a6efad7630d4ae269f47790e771 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Wed, 31 Jul 2024 12:27:36 +0200 Subject: [PATCH 09/21] cfg: avoid cache messsage reply on snoop wire --- timing.cfg | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/timing.cfg b/timing.cfg index 14f27840d0..9c0e6a7049 100644 --- a/timing.cfg +++ b/timing.cfg @@ -18,6 +18,9 @@ flexus.set "-ufetch:threads" "1" # "Number #flexus.set "-ufetch:send_acks" "1" # "Send acknowledgements when we received data" (SendAcks) #flexus.set "-ufetch:use_reply_channel" "1" # "Send replies on Reply Channel and only Evicts on Snoop Channel" (UseReplyChannel) #flexus.set "-ufetch:evict_on_snoop" "0" # "Send evicts on Snoop Channel (otherwise use Request Channel)" (EvictOnSnoop) +flexus.set "-ufetch:send_acks" "1" # "Send acknowledgements when we received data" (SendAcks) +flexus.set "-ufetch:use_reply_channel" "1" # "Send replies on Reply Channel and only Evicts on Snoop Channel" (UseReplyChannel) +flexus.set "-ufetch:evict_on_snoop" "0" # "Send evicts on Snoop Channel (otherwise use Request Channel)" (EvictOnSnoop) # decoder: Decoder flexus.set "-decoder:fiq" "8" # "Fetch instruction queue size" (FIQSize) @@ -100,9 +103,7 @@ flexus.set "-L1d:maf_targets" "0" # "Number #flexus.set "-L1d:trace_address" "0" # "Address to initiate tracing" (TraceAddress) flexus.set "-L1d:cache_type" "InclusiveMESI:snoop_lru=false" # "Type of cache (InclusiveMOESI)" (CacheType) flexus.set "-L1d:array_config" "STD:size=16384:assoc=4:repl=LRU" # "Configuration of cache array (STD:sets=1024:assoc=16:repl=LRU" (ArrayConfiguration) -#flexus.set "-L1d:use_reply_channel" "1" # "Separate Reply and Snoop channels on BackSide" (UseReplyChannel) -flexus.set "-L1d:text_flexpoints" "0" # "Store flexpoints as text files (compatible with old FastCache component)" (TextFlexpoints) -flexus.set "-L1d:gzip_flexpoints" "1" # "Compress flexpoints with gzip" (GZipFlexpoints) +flexus.set "-L1d:use_reply_channel" "1" # "Separate Reply and Snoop channels on BackSide" (UseReplyChannel) # L2: CMPCache flexus.set "-L2:cores" "0" # "Number of cores" (Cores) @@ -167,22 +168,6 @@ flexus.set "-memory-map:round_robin" "1" # "Use sta flexus.set "-memory-map:write_page_map" "1" # "Write page map as pages are created" (CreatePageMap) flexus.set "-memory-map:page_map" "0" # "Load Page Map on start" (ReadPageMap) -# magic-break: MagicBreak -flexus.set "-magic-break:iter" "0" # "Enable Iteration Counts" (EnableIterationCounts) -flexus.set "-magic-break:stop_on_magic" "-1" # "Terminate simulation on a specific magic breakpoint" (TerminateOnMagicBreak) -flexus.set "-magic-break:end_iter" "-1" # "Terminate simulation when CPU 0 reaches iteration. -1 disables" (TerminateOnIteration) -flexus.set "-magic-break:ckpt_iter" "0" # "Checkpoint simulation when CPU 0 reaches each iteration." (CheckpointOnIteration) -flexus.set "-magic-break:end_trans" "-1" # "Terminate simulation after ## transactions. -1 disables" (TerminateOnTransaction) -flexus.set "-magic-break:trans" "1" # "Enable Transaction Counts" (EnableTransactionCounts) -flexus.set "-magic-break:trans_type" "0" # "Workload type. 0=TPCC/JBB 1=WEB" (TransactionType) -flexus.set "-magic-break:stats_trans" "1000" # "Statistics interval on ## transactions. -1 disables" (TransactionStatsInterval) -flexus.set "-magic-break:ckpt_trans" "-1" # "Quiesce and save every X transactions. -1 disables" (CheckpointEveryXTransactions) -flexus.set "-magic-break:first_trans" "0" # "Transaction number for first transaction." (FirstTransactionIs) -flexus.set "-magic-break:min_cycle" "0" # "Minimum number of cycles to run when TerminateOnTransaction is enabled." (CycleMinimum) -flexus.set "-magic-break:stop_cycle" "0" # "Cycle on which to halt simulation." (StopCycle) -flexus.set "-magic-break:ckpt_cycle" "0" # "# of cycles between checkpoints." (CkptCycleInterval) -flexus.set "-magic-break:ckpt_cycle_name" "0" # "Base cycle # from which to build checkpoint names." (CkptCycleName) - # mmu: MMU flexus.set "-mmu:cores" "0" # "Number of cores" (Cores) flexus.set "-mmu:itlbsize" "64" # "Size of the Instruction TLB" (iTLBSize) From 56b2b07b7b755d725d16de17d7bab29e95cb9d4a Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Tue, 27 Aug 2024 15:48:06 +0200 Subject: [PATCH 10/21] module: update QEMU and FLEXUS QEMU: - add/fix multiple API for timing FLEXUS - add architectural validation - add paraflex ckpt loading - fix blackbox for system register instruction - fix instruction considered as a branch when it should not - fix page walking - fix default behaviour for some function --- README.md | 13 ++++++------- flexus | 2 +- qemu | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c49438c613..f556741d38 100644 --- a/README.md +++ b/README.md @@ -55,18 +55,18 @@ ln -s qemu/build/aarch64-softmmu/qemu-system-aarch64 qemu-aarch64 ### 6. Add Images -[Download a simple image](https://github.com/parsa-epfl/qflex/releases/download/2024.05/images.tar.xz) and place it the -repository root location. - +[Download a simple image](https://github.com/parsa-epfl/qflex/releases/latest/) and place it the +repository root location. Release may also contain `checkpoint` ready to experiment with a warmed up timing simulator. ```sh -wget https://github.com/parsa-epfl/qflex/releases/download/2024.07-next/images.tar.xz +wget https://github.com/parsa-epfl/qflex/releases/latest/download/images.tar.xz +wget https://github.com/parsa-epfl/qflex/releases/latest/download/ckpt.tar.xz tar -xvf images.tar.xz +tar -xvf ckpt.tar.xz ``` The repository tree under images folder should look like this. ``` - images/ ├── busybox └── Busybox @@ -97,7 +97,6 @@ Made with [contrib.rocks](https://contrib.rocks). This software is an open-sourced software licensed under the following license: ```text - ***Software developed externally (not by the QFlex group)*** QFlex consists of several software components that are governed by various @@ -138,4 +137,4 @@ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -``` \ No newline at end of file +``` diff --git a/flexus b/flexus index 629b9847b6..08a62a2fb4 160000 --- a/flexus +++ b/flexus @@ -1 +1 @@ -Subproject commit 629b9847b6b523bace8a49b90e6d89ea4f25e98b +Subproject commit 08a62a2fb47dd0db149c6f1db2ac7b82d6b50750 diff --git a/qemu b/qemu index e3f980acb8..5b04cb7ef5 160000 --- a/qemu +++ b/qemu @@ -1 +1 @@ -Subproject commit e3f980acb84cffe8909f9f743bfa94c2ccbece51 +Subproject commit 5b04cb7ef51e0a6202fe2e2ebe8b7acf130f66b4 From bc5d4236acfc9623e9190834623244bbd674cbb7 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Wed, 11 Sep 2024 15:24:38 +0200 Subject: [PATCH 11/21] docs: update speed and config --- README.md | 4 ++-- docs/02-RUNQ.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f556741d38..bd28724e30 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ ## [🎯 Features](#features) -* ⚡ **Functional-First**. 30 MIPS functional first simulation. -* 🕰 **Timing-First**. 100 KIPS cycle-accurate simulation. +* ⚡ **Functional-First**. 1 MIPS/core functional first simulation. +* 🕰 **Timing-First**. 10 KIPS/core cycle-accurate simulation. * 🗂️ **Components-based**. Create custom components. * ✨ **Free**. QFlex is completely free and open source. diff --git a/docs/02-RUNQ.md b/docs/02-RUNQ.md index de7fecec3c..cc911ce884 100644 --- a/docs/02-RUNQ.md +++ b/docs/02-RUNQ.md @@ -30,7 +30,7 @@ machine cpu max - pauth-impdef on + pauth off parallel none @@ -106,4 +106,4 @@ libqflex cfg-path ${ROOT}/../trace.cfg debug vverb ${EXTRA} -``` \ No newline at end of file +``` From 5f10b9b6eb262602b9158167ebc965e2085f80b9 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Wed, 11 Sep 2024 15:26:28 +0200 Subject: [PATCH 12/21] module: update FLEXUS FLEXUS - Modified a lot of condition to check against a know type instead of 0 - add some TEMPORAR fix (CAS blackbox + MESI assertion) - Refactored the uFetch --- flexus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flexus b/flexus index 08a62a2fb4..d8cec78074 160000 --- a/flexus +++ b/flexus @@ -1 +1 @@ -Subproject commit 08a62a2fb47dd0db149c6f1db2ac7b82d6b50750 +Subproject commit d8cec7807460fe3ee53a7e0ca155e4cd748540c4 From bb0a0a625abea86b6eddfcce761f52c1fdf19241 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Mon, 23 Sep 2024 11:42:40 +0200 Subject: [PATCH 13/21] build: force enable capstone and slirp --- build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build b/build index b7f86bba48..b40c7b935e 100755 --- a/build +++ b/build @@ -26,6 +26,8 @@ case $SIM in if [ "$BUILD_TYPE" = "debug" ]; then ./configure --target-list=aarch64-softmmu \ --disable-docs \ + --enable-capstone \ + --enable-slirp \ --enable-savevm-external \ --enable-libqflex \ --enable-debug \ @@ -35,6 +37,8 @@ case $SIM in else ./configure --target-list=aarch64-softmmu \ --disable-docs \ + --enable-capstone \ + --enable-slirp \ --enable-savevm-external \ --enable-libqflex @@ -49,4 +53,4 @@ case $SIM in echo "Never heard of '${SIM}'" exit 1 ;; -esac \ No newline at end of file +esac From 65cae2dab9f2f247d47ba8679a11a1ec9870e45d Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Mon, 23 Sep 2024 17:21:11 +0200 Subject: [PATCH 14/21] module: update FLEXUS FLEXUS - fix access to NZCV register - add access to TPIDR_EL2 - default to evict clean QEMU - add permission check for sys_register --- flexus | 2 +- qemu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flexus b/flexus index d8cec78074..0acfbcaf3d 160000 --- a/flexus +++ b/flexus @@ -1 +1 @@ -Subproject commit d8cec7807460fe3ee53a7e0ca155e4cd748540c4 +Subproject commit 0acfbcaf3daa1f2ffbfdedefb98a0070952f0185 diff --git a/qemu b/qemu index 5b04cb7ef5..2e8f506570 160000 --- a/qemu +++ b/qemu @@ -1 +1 @@ -Subproject commit 5b04cb7ef51e0a6202fe2e2ebe8b7acf130f66b4 +Subproject commit 2e8f506570e6ee603f1b0ab35bf6cb3cf7da0643 From d129656776a54e5cd9629944f5f3f79482fe6a7e Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Mon, 23 Sep 2024 17:21:57 +0200 Subject: [PATCH 15/21] cfg: re-enable some cache behaviour --- timing.cfg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/timing.cfg b/timing.cfg index 9c0e6a7049..eec188f0c1 100644 --- a/timing.cfg +++ b/timing.cfg @@ -95,11 +95,11 @@ flexus.set "-L1d:maf_targets" "0" # "Number #flexus.set "-L1d:probe_fetchmiss" "0" # "Probe hierarchy on Ifetch miss" (ProbeFetchMiss) #flexus.set "-L1d:bustime_nodata" "1" # "Bus transfer time - no data" (BusTime_NoData) #flexus.set "-L1d:bustime_data" "2" # "Bus transfer time - data" (BusTime_Data) -#flexus.set "-L1d:allow_evict_clean" "1" # "Cause the cache to evict clean blocks" (EvictClean) -#flexus.set "-L1d:evict_writable_has_data" "1" # "Send data with EvictWritable messages" (EvictWritableHasData) -#flexus.set "-L1d:evict_on_snoop" "0" # "Send evictions on Snoop channel" (EvictOnSnoop) -#flexus.set "-L1d:fast_evict_clean" "0" # "Send clean evicts without reserving data bus" (FastEvictClean) -#flexus.set "-L1d:no_bus" "0" # "No bus model (i.e., infinite BW, no latency)" (NoBus) +flexus.set "-L1d:allow_evict_clean" "1" # "Cause the cache to evict clean blocks" (EvictClean) +flexus.set "-L1d:evict_writable_has_data" "1" # "Send data with EvictWritable messages" (EvictWritableHasData) +flexus.set "-L1d:evict_on_snoop" "0" # "Send evictions on Snoop channel" (EvictOnSnoop) +flexus.set "-L1d:fast_evict_clean" "0" # "Send clean evicts without reserving data bus" (FastEvictClean) +flexus.set "-L1d:no_bus" "0" # "No bus model (i.e., infinite BW, no latency)" (NoBus) #flexus.set "-L1d:trace_address" "0" # "Address to initiate tracing" (TraceAddress) flexus.set "-L1d:cache_type" "InclusiveMESI:snoop_lru=false" # "Type of cache (InclusiveMOESI)" (CacheType) flexus.set "-L1d:array_config" "STD:size=16384:assoc=4:repl=LRU" # "Configuration of cache array (STD:sets=1024:assoc=16:repl=LRU" (ArrayConfiguration) @@ -172,4 +172,4 @@ flexus.set "-memory-map:page_map" "0" # "Load Pa 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" "0" # "TLB never misses" (PerfectTLB) (1=true, 0=false) \ No newline at end of file +flexus.set "-mmu:perfect" "0" # "TLB never misses" (PerfectTLB) (1=true, 0=false) From 8c21bbf471fad14d24febfeca2f3b0f9a70eadee Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Fri, 4 Oct 2024 10:03:07 +0200 Subject: [PATCH 16/21] cfg: use runtime core mesh builder This replace the topology file. The mesh builder a fully meshed network. --- timing.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timing.cfg b/timing.cfg index eec188f0c1..dae509cf65 100644 --- a/timing.cfg +++ b/timing.cfg @@ -137,7 +137,7 @@ flexus.set "-nic:send-capacity" "4" # "Send Qu # network: MemoryNetwork flexus.set "-network:nodes" "0" # "Number of Nodes" (NumNodes) -flexus.set "-network:topology-file" "2x3-mesh.topology" # "Network topology file" (NetworkTopologyFile) +flexus.set "-network:topology-file" "BuildMesh" # "Network topology file" (NetworkTopologyFile) flexus.set "-network:virtual-channels" "3" # "Number of virtual channels" (VChannels) # net-mapper: SplitDestinationMapper From 2db028170583edf9b4590b05813a8a19bba4dfb0 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Fri, 4 Oct 2024 10:06:10 +0200 Subject: [PATCH 17/21] cfg: forcefully enable 1 MMU per core --- timing.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timing.cfg b/timing.cfg index dae509cf65..0892b66c88 100644 --- a/timing.cfg +++ b/timing.cfg @@ -169,7 +169,7 @@ flexus.set "-memory-map:write_page_map" "1" # "Write p flexus.set "-memory-map:page_map" "0" # "Load Page Map on start" (ReadPageMap) # mmu: MMU -flexus.set "-mmu:cores" "0" # "Number of cores" (Cores) +flexus.set "-mmu:cores" "1" # "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" "0" # "TLB never misses" (PerfectTLB) (1=true, 0=false) From ee779e51287694897916d0f9699734b7a61eb668 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Fri, 4 Oct 2024 10:09:30 +0200 Subject: [PATCH 18/21] cfg: enable evication and ack message --- timing.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/timing.cfg b/timing.cfg index 0892b66c88..0220c64dc6 100644 --- a/timing.cfg +++ b/timing.cfg @@ -10,12 +10,12 @@ flexus.set "-fag:threads" "1" # "Number flexus.set "-ufetch:iline" "64" # "Icache line size in bytes" (ICacheLineSize) flexus.set "-ufetch:perfect" "0" # "Use a perfect ICache" (PerfectICache) #flexus.set "-ufetch:prefetch" "1" # "Enable Next-line Prefetcher" (PrefetchEnabled) -#flexus.set "-ufetch:clean_evict" "1" # "Enable eviction messages" (CleanEvict) +flexus.set "-ufetch:clean_evict" "1" # "Enable eviction messages" (CleanEvict) flexus.set "-ufetch:size" "16384" # "ICache size in bytes" (Size) flexus.set "-ufetch:associativity" "4" # "ICache associativity" (Associativity) #flexus.set "-ufetch:miss_queue_size" "4" # "Maximum size of the fetch miss queue" (MissQueueSize) flexus.set "-ufetch:threads" "1" # "Number of threads under control of this uFetch" (Threads) -#flexus.set "-ufetch:send_acks" "1" # "Send acknowledgements when we received data" (SendAcks) +flexus.set "-ufetch:send_acks" "1" # "Send acknowledgements when we received data" (SendAcks) #flexus.set "-ufetch:use_reply_channel" "1" # "Send replies on Reply Channel and only Evicts on Snoop Channel" (UseReplyChannel) #flexus.set "-ufetch:evict_on_snoop" "0" # "Send evicts on Snoop Channel (otherwise use Request Channel)" (EvictOnSnoop) flexus.set "-ufetch:send_acks" "1" # "Send acknowledgements when we received data" (SendAcks) @@ -127,7 +127,7 @@ flexus.set "-L2:data_issue_lat" "1" # "Minimum flexus.set "-L2:dir_type" "inf" # "Type of directory (infinite, std, region, etc.)" (DirectoryType) flexus.set "-L2:dir_config" "skew_shift=0" # "Configuration of directory array (sets=1025:assoc=16)" (DirectoryConfig) flexus.set "-L2:level" "2" # "CacheLevel" (eL2) -#flexus.set "-L2:allow_evict_clean" "0" # "Cause the cache to evict clean blocks" (EvictClean) +flexus.set "-L2:allow_evict_clean" "0" # "Cause the cache to evict clean blocks" (EvictClean) flexus.set "-L2:array_config" "STD:total_sets=65536:assoc=8:repl=LRU" # "Configuration of cache array (STD:sets=1024:assoc=16:repl=LRU" (ArrayConfiguration) # nic: MultiNic2 From 23ceadd4bd776085234976c50bf2863b167734aa Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Fri, 4 Oct 2024 11:34:50 +0200 Subject: [PATCH 19/21] docs: add debug library legacy documentation --- docs/50-FLEXUS-DEBUG.md | 330 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 docs/50-FLEXUS-DEBUG.md diff --git a/docs/50-FLEXUS-DEBUG.md b/docs/50-FLEXUS-DEBUG.md new file mode 100644 index 0000000000..01ca901397 --- /dev/null +++ b/docs/50-FLEXUS-DEBUG.md @@ -0,0 +1,330 @@ +Dbg library documentation +==== + +Changelog + - twenisch 23Aug03 Initial revision + + +Goals: +=== + The goals of the Scaffold debug facility are: + - don't pay for what you don't use. Debug statements should + be free when they are shut off. + - provide the maximum information with the minimum code + - provide the best possible filtering capabilities so you see + only the output you want + +The Scaffold debugger filters debug output in 3 ways, compile-time, +entry-creation-time, and entry-processing-time. When a debug statement +is filtered at compile time, the text of the DBG_ macro is removed by +the preprocessor, and incurs almost no compile time and no runtime +overhead. Entry-creation-time filtering is accomplished by if statements +around the entry-creation code. entry-processing-time filtering is +accomplished by comparing fields in the debug entry against predefined +filters. The runtime cost of these filters depends on the number of fields +(in particular, string fields) associated with the debug entry, and the +number and complexity of debug targets and their filter expressions. +Exclude filters short-circuit the filtering process, so you should try to +write filter expressions with exclude filters first. + + +"DBG_" Debug Entry Creation API +======= + +Debug entries are created with the DBG_() and DBG_Assert() family of macros. +Each debug entry has an associated severity level, which controls compile-time +filtering. The current MinimumSeverity setting determines whether DBG_ macros +expand to the code for creating an entry, or compile away. DBG_Assert() macros +are always enabled, regardless of MinimumSeverity setting, unless specifically +disabled via "DBG_SetAssertions false" (see below). + +Here is the syntax for the DBG_ family macro: + + DBG_( , ) ; +Creates a debug entry - Debug severity level, documented below. - Any of the debug operations, + documented under "DBG Operations" below Ex : DBG_(Dev, (<< "Example debug entry at Development severity")); + +DBG_Assert([, ]); + Creates an assertion. The assertion is triggered if condition is false. + Except for compile time filtering, this is equivalent to: + DBG_( Crit, Assert() Condition( !( ) ) ) ; + - Condition controlling the assertion.Assertion is triggerred if the condition is FALSE. - + Any of the debug operations, + documented under "DBG Operations" below Ex : DBG_Assert((prt != 0), (<< "This assert fires when ptr == 0")); + + DBG_AssertSev(, [, ]); + Creates an assertion with a specified severity. Note that severity is + generally ignored for the purpose of compile time filtering of asserts, but + can be used by the entry-processing-time filters to customize assert + behavior. Except for compile time filtering, this is equivalent to: + DBG_( , Assert() Condition( !( ) ) ) ; + - Debug severity level, + documented below. - + Condition controlling the assertion.Assertion is triggerred if the condition is FALSE. - + Any of the debug operations, + documented under "DBG Operations" below Ex + : DBG_AssertSev(Verb, (prt != 0), (<< "This assert has Verbose severity")); + + PLANNED + FEATURES(not yet available) + : DBG_Invocation(); + Track the invocation of the current function, for creating stack backtraces + for debug entries. + Ex: + DBG_Invocation(); + +DBG Operations +======= + + ( << ) + Associates a message with a debug entry. This text is available as the + {Message} field of the entry. Anything that can be written to an ostream + can appear in the message. + - any expression that is valid for an ostream like std::cout + Aliases: + Message( << message ) + Msg( << message ) + Ex: + DBG_( Crit, ( << " a complicated " << &std::hex << myVariable << " expression.") ); + +AddCategory( | | ...) Associates the specified list of + categories with the debug entry.This list ADDS TO the category list of the debug statement, + so it appends onto any previous + Category() operations.Categories must have been previously created using DBG_NewCategory(see below) + . - + the name of the category.A list of categories can be separated by + | Aliases : AddCat( | ...) Ex : DBG_(Crit, Cat(MyCat1) AddCat(MyCat2 | MyCat3)(<< " some entry.")); + + Address( ) + Sets the {Address} numeric field of the debug entry to the specified value. + This is shorthand for SetNumeric( (Address) ). + - any expression convertible to long long + Aliases: + Addr( ) + Ex: + DBG_( Crit, Addr( address ) ( << " memory reference to specified addr.") ); + + Assert() Marks a debug statement as an assertion.If you use a DBG_(Sev, Assert()) macro rather than DBG_Assert(), + the assertion will be filtered at compile time like a normal debug statement + .Assetions also have the Assert category added.Ex : DBG_(Crit, Assert()(<< "Almost the same as DBG_Assert()")); + + Category( | | ...) Associates the specified list of + categories with the debug entry.This list REPLACES the category list of the debug statement, + so it overwrites any previous + Category() operations.Categories must have been previously created using DBG_NewCategory(see below) + . - + the name of the category.A list of categories can be separated by + | Aliases : Cat( | ...) Ex : DBG_(Crit, Cat(MyCat1 | MyCat2)(<< " some entry.")); + + Component( ) + Attaches the specified scaffold component to this debug entry. This makes + the {ComponentName} {ComponentType} and {ScaffoldIdx} debug fields + available. This also adds a condition to the debug expression which calls + .debugEnabled( ). The default implementation + of debugEnabled compares the debug statements severity against the severity + specified for the component in the wiring file. + - a reference to the component object + Aliases: + Comp( ) + Ex: + DBG_( Crit, Comp( *this ) ( << " *this is a scaffold component.") ); + + Condition( ) + Associates a condition with the DBG statement. This condition filters + the debug statement at entry-creation-time. The entry is only created + if the condition evaluates to TRUE. The condition is available in the + debug entry as the {Condition} field. Note that conditions are inverted for + DBG_Assert( - any boolean expression. + Aliases: + Cond( ) + Ex: + DBG_( Crit, Cond( my_variable == 1 ) ( << " my_variable must equal 1.") ); + + Core() Marks a debug statement as belonging to the Scaffold core + .Core debug statements can be filtered out at compile + time(core assertions are not filtered out unless all assertions are disabled) + .This also gives the debug statement the Core category.Ex : DBG_(Crit, Core()(<< "A core debug statement")); + + NoDefaultOps( ) + Suppresses the addition of "default operations" to a particular debug + statement. This is useful , e.g, if the default operations would cause a + compile error because they refer to a variable name that isn't in scope. + See "Compile Time Control of the DBG_ system" below for more info. + Ex: + DBG_( Crit, NoDefaultOps() ( << "default operations suppressed" ) ); + + Set( ( ) << ) + Creates a new string field in the debug entry, called {}. + Anything that can be written to an ostream can be written to the field. + - a name for the field + - any expression that is valid for an ostream like std::cout + Ex: + DBG_( Crit, ( (MyField) << " a value for {MyField}") ); + + SetNumeric( ( ) ) + Creates a new numeric field in the debug entry, called {}. + - a name for the field + - any expression that can be converted to long long + Ex: + DBG_( Crit, ( (MyNumericField) my_integer_variable ); + + +Compile Time Control of the DBG_ system +==== + +Much of the behavior of debug statements (for example, if they should compile +away) can be controlled at compile time. These settings can be changed at +any point in the code by setting some directives with #define, and then +#include DBG_Control().Note tht there are NO SEMICOLONS at the end of the +#define or #include directives. + +#define DBG_NewCategories category, category, ... +#include DBG_Control() + Creates new debug categories. Categories should be separated by commas. + This should only be done at global scope (outside of any namespace), or + the categories will only be visible within that namespace. + Ex: +#define DBG_NewCategories MyCat, MyCat2 +#include DBG_Control() + +#define DBG_Reset +#include DBG_Control() + Clears the default operations set with SetDefaultOps. See DBG_SetDefaultOps + for more info. + +#define DBG_SetAssertions true or false +#include DBG_Control() + Enable or disable assertions. This is true by default. + Ex: +#define DBG_Assertions true +#include DBG_Control() + +#define DBG_SetCoreDebugging true or false +#include DBG_Control() + Enable or disable core debugging. This needs to be set before the + Scaffold core is included (ie at the top of wiring). This is false + by default. + Ex: +#define DBG_SetCoreDebugging true +#include DBG_Control() + +#define DBG_SetDefaultOps +#include DBG_Control() + Any debug operations after DBG_SetDefaultOps are automatically appended + onto the end of every DBG_ and DBG_Assert statement, unless inhibited + by NoDefaultOps(). These default operations are cleared by DBG_Reset. + You should put a DBG_Reset at the bottom of any file that uses + DBG_SetDefaultOps. + Ex: +#define DBG_SetDefaultOps AddCategory(ProtocolEngine) +#include DBG_Control() + ... +#define DBG_Reset +#include DBG_Control() + +#define DBG_SetMinimumSeverity +#include DBG_Control() + Set the severity level used for compile-time filtering of debug statements. + Ex: +#define DBG_SetMinimumSeverity Dev +#include DBG_Control() + + +Run Time Configuration +==== + + Currently, the debug system reads debug.cfg in the current directory on +startup to configure itself. At some point, you will be able to load and +modify configurations from within Simics. + +Here is the configuration file format: + +target "target-name" { + filter{ } action + { + + } +} + +Each filter expression and action statement ends in a semicolon. + +Filters are either include filters or exclude filters. A debug entry matches +a target if it matches at least one include filter, and no exclude filters. + + + & ... ; + Include filter. Matches if the debug entry matches each of the &-separated + filters. + + - & ... ; + Exculde filter. Matches if the debug entry matches each of the &-separated + filters. + +Here are filter supported by the parser: + @ + @ 0x + Address Filter. Filters by comaring for equality to the {Address} field. + + [ ] + ScaffoldIdx Filter. Filters by comaring for equality to the {ScaffoldIdx} + field. + + severity + severity+ + severity- + Severity filter. Matches entries that are equal to, higher, or lower + than the specified severity. See the Severity section for the list of + severities + + {FieldName} == value + {FieldName} != value + {FieldName} >= value + {FieldName} <= value + {FieldName} > value + {FieldName} < value + {FieldName} exists + General filter on a field. If value is in quotes, then string comparison + is performed. If value is a number, numeric comparison is performed. + + category + Anything that can't be parsed as another filter is assumed to be a + category filter. Matches if the component has the specified category. + +Here are the supported actions: + + log console "strings" {FieldName} ... + log (filename) "strings" {FieldName} ... + Write debug output using the specified format to the console or to a file. + abort + Call std::abort() to halt execution + + +Fields available in debug entries +=== +{FilePath} - complete path from __FILE__ +{FileName} - portion of __FILE__ after the last / +{Line} - __LINE__ +{Function} - __FUNCTION__ +{Categories} - | separated list of categories +{Severity} - Symbolic name of severity +{SeverityNumeric} - Numeric severity level +{GlobalCount} - Debug entry number (these increment globally for all debug + entries) +{LocalCount} - Number of times this particular DBG_ statement has been + logged +{Message} - The message associated with the debug entry. +{Condition} - The boolean expression associated with this debug entry +{ComponentName} - The configuration name of the Scaffold component associated + with the debug statement +{ComponentType} - The class name of the scaffold component. +{ScaffoldIdx} - The index of the scaffold component. +{Address} - The memory address from the Addr() operation. + - user defined entry created with SetStr or SetNum. Expands + to if no entry with the name exists + +Not currently functional: +{Cycle} - Current scaffold cycle +{Drive} - The Scaffold drive interface that was last invoked, if any +{BackTrace} - List of active functions that are tracked by DBG_Invocation() From 8874d5a3631a3a331022f5e0eb19a8a4466ec62f Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Fri, 4 Oct 2024 11:36:03 +0200 Subject: [PATCH 20/21] module: update FLEXUS - fix mesh - remove dead code - modify assertion QEMU - add icount bypass --- flexus | 2 +- qemu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flexus b/flexus index 0acfbcaf3d..d90fc1bf1f 160000 --- a/flexus +++ b/flexus @@ -1 +1 @@ -Subproject commit 0acfbcaf3daa1f2ffbfdedefb98a0070952f0185 +Subproject commit d90fc1bf1f3c8be35ec85f9575f6a4c3a5cce619 diff --git a/qemu b/qemu index 2e8f506570..324cc25b50 160000 --- a/qemu +++ b/qemu @@ -1 +1 @@ -Subproject commit 2e8f506570e6ee603f1b0ab35bf6cb3cf7da0643 +Subproject commit 324cc25b5030b50bb48d624aacbb90f6411206eb From afb2959627d79faa02413cae3e2fa61cc279fc23 Mon Sep 17 00:00:00 2001 From: Bryan Perdrizat Date: Fri, 4 Oct 2024 12:15:03 +0200 Subject: [PATCH 21/21] docs: remove innacuracy --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bd28724e30..471ef6e9e9 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ ## [🎯 Features](#features) -* ⚡ **Functional-First**. 1 MIPS/core functional first simulation. -* 🕰 **Timing-First**. 10 KIPS/core cycle-accurate simulation. +* ⚡ **Functional-First**. 1 MIPS functional first simulation. +* 🕰 **Timing-First**. 70 KIPS cycle-accurate simulation. * 🗂️ **Components-based**. Create custom components. * ✨ **Free**. QFlex is completely free and open source. @@ -56,12 +56,11 @@ ln -s qemu/build/aarch64-softmmu/qemu-system-aarch64 qemu-aarch64 ### 6. Add Images [Download a simple image](https://github.com/parsa-epfl/qflex/releases/latest/) and place it the -repository root location. Release may also contain `checkpoint` ready to experiment with a warmed up timing simulator. +repository root location. + ```sh wget https://github.com/parsa-epfl/qflex/releases/latest/download/images.tar.xz -wget https://github.com/parsa-epfl/qflex/releases/latest/download/ckpt.tar.xz tar -xvf images.tar.xz -tar -xvf ckpt.tar.xz ``` The repository tree under images folder should look like this. @@ -78,7 +77,7 @@ images/ ### 7. Run ```sh ./runq images/bb-trace # run keenkraken release version -./runq images/bb-timing-dev # run knottykraken debug version +./runq images/bb-timing # run knottykraken release version ``` The filesystem now contains basic tools provided by `/bin/busybox` like `ls`, `cd`, etc.