Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-frequency simulation #96

Open
branylagaffe opened this issue Dec 18, 2024 · 0 comments
Open

Multi-frequency simulation #96

branylagaffe opened this issue Dec 18, 2024 · 0 comments
Assignees

Comments

@branylagaffe
Copy link
Collaborator

Problem: Qflex simulates all components of the system (core, uncore) at the same frequency.
Desired functionality: Components can be simulated at different frequencies, for example, core 1 at 2 GHz, core 2 at 3 GHz, uncore at 1.5 GHz

Terminology:

  • A core consists of the following components in flexus:
    • Fetch unit
    • Fetch Address Generator
    • uArch
    • MMU
    • Decoder
    • L1D cache
  • Uncore consists of the following components:
    • the NIC (not sure what this is)
    • the Network (NoC)
    • the Memory (memory controllers)
    • L2 cache
  • Drive frequency: How many times a component is driven in one cycle

Notes:

  1. The scheduling algorithm went over each component one by one. If there were multiple instances of a component they were executed first. eg, F1 -> F2 -> FAG1 -> FAG2 -> uArch 1 -> uArch2 ....
  2. What we want is scheduling in the granularity of a core, i.e, Core 1 (F1 -> FAG1 -> uArch1 -> ...) -> Core 2 (F2 -> FAG2 -> uArch2 -> ...) -> Uncore (NIC1 -> N1 -> M1 -> M2 -> L1)
  3. Note that components belonging to the core must have the same number of units. For example, if there 4 cores, there must be 4 fetch units, 4 FAGs, 4 MMUs and so on, but MMU components can have different number of units, eg, 1 L2 but 4 memory controllers

List of changes:

  1. [Libqflex] Take command line arguments for frequency, eg, -libqflex mode=timing,...,freq=2:1:3. The order is as follows: core 0 frequency followed by core 1 frequency and so on and the last one is uncore frequency. The unit does not matter. You must supply an argument for each core/uncore otherwise there'll be assertion error. Frequencies can also be fractional upto one digit after the decimal, eg, freq=1.2,2.5,2.1
  2. [Flexus] Instead of a single vector of components, have two vectors, first one for core, second one for uncore (Note: these are vectors of types :O)
  3. [Flexus] On initialization, process the frequency string and convert into drive numbers. 1. Step 1: Convert fractions to whole numbers by multiplying with LCM of denominators
    eg, 1.5:3 -> (15/10):(3/1) -> (3/2):3 -> 3:6
    2. Step 2: Normalize the drive frequencies eg, 3:6 -> 1:2, this means core 0 should be driven once and uncore twice, i.e., uncore is twice the frequency of core
    3. Step 3: Store this new list and the maximum frequency
  4. [Flexus] New do_cycle function to go over all components in a core one by one instead of instances in the same component one by one. Note this is only possible for core where all components have the same number of instances. Uncore can have different number of instances per component so uncore still uses the previous function.
  5. [Flexus] Fine-grained scheduling algorithm, try to maintain uniformity, eg, not C1->C1->C1->C2->C2->U->U and instead C1->C2->U->C1->C2->U->C2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants