riscv-software-src / riscv-perf-model

Example RISC-V Out-of-Order/Superscalar Processor Performance Core and MSS Model
Apache License 2.0
133 stars 56 forks source link

fusion draft PR commit #135

Closed jeffnye-gh closed 8 months ago

jeffnye-gh commented 9 months ago

Contains the draft version of the fusion API and start of a test bench. Doxygen file provided also. README.md has the gist. fusion/test/testbench.cpp has some usage.

The API is more general, simpler, better alignment with other source and existing packages (mavis).

See the README.md or front page of doxygen. API uses functor's at the top level and within the inner transform operations for generality. There are examples of each, including a lambda example.

FieldExtractor (mavis) and MachineInfo (future CoreExtensions ?) are template parameters.

To run the test bench and generate docs @ fusion/html/index.html :

cd fusion
mkdir -p release; cd release
cmake ..
make -j32 regress
make docs
klingaard commented 8 months ago

A few general comments (nits):

  1. The header files should be .hpp
  2. The header files in olympia are named exactly (case included) as the class they represent. However, this rule isn't documented in the CodingStyleGuide
  3. Noticed some files copied from Mavis. Mavis didn't follow a lot of the styles adopted by Olympia (for example using #ifdef instead of #pragma once for header guards). Do you mind making them consistent with Olympia's style?
  4. Function names do not match the coding style guide -- they lower_lower for example...
  5. Any single line conditionals will need to be encapsulated in {}

Started looking at the implementation. Have some comments pending.

jeffnye-gh commented 8 months ago

I have posted a PR for the Fusion API alone. We will continue the DSL syntax discussion.