Review Board 2.0.15

ruby: change function signature for functional_read/write

Review Request #3422 - Created April 4, 2016 and updated

Brandon Potter
Changeset 11424:6901103f7f04
ruby: change function signature for functional_read/write

The functional_read and function_write functions within Ruby will
occasionally use methods which rely on knowing the block size so we add
the block size as a parameter.

To avoid special casing large sections of the SLICC code, we propagate the
change to all instances of these functions (even when the parameter is
not used).

Posted (April 11, 2016, 1:51 p.m.)

Could you point out where this parameter is used? I'm having a hard time finding it in this patch.

Without seeing where the parameter is used, I feel like there has to be a better way! Surely we can find a way to modify the few places this information is needed rather than changing every file.

  1. Seems I jumped the gun here. This, /r/3423 and /r/3424 will be combined? To double check that I understand, the reason this is needed is for makeLineAddress, etc? Could you provide a list of these functions?

    Maybe we should take this off reviewboard. Could you send an email with the underlying reason you need to pass this new parameter around everywhere. Since it's split across so many patches, I'm having a hard time following.

    I really don't like the idea of passing around this parameter everywhere. I'd like to understand better the problem so I can try my hand at a cleaner solution.

  2. Right, I broke the patches apart so that it was easier to isolate the changes. The goal was to split the patches so that they compile/run seperately while maintaining some distinction between them; this is especially true for the block size patches which amount to thousands of patch lines if they're all combined.

    The total ordering of all of the Ruby patches is as follows:
    1) - DPRINTF newline
    2) - unnecessary !!
    3) - #ifdef 0 removal
    4) - intermediate TBE transitions (MESI_{Three,Two}_Level, MOESI_CMP_directory, MOESI_hammer)
    5) - for TBETable, use ENTRY* instead of Entry
    6) - SLICC pointer naming convention change
    7) - SubBlock removal
    8) - filter's parameter list change (string -> types)
    9) - preliminary addition of block_size_{bits,bytes} to objects
    10) - functional read/write parameter changes
    11) - add block_size_bits to testAnd* functions
    12) - add block_size_{bytes, bits} to the address functions
    13) - write mask initialization
    14) - data block initialization
    15) - SLICC grammer addition (new w/ constructor for new ENTRY(block_size))
    16) - pass block_size into ENTRY constructors
    17) - change PerfectCache to use ENTRY* instead of ENTRY
    18) - remove RubySystem static for block_size
    19) - convert global stats variables to locals
    20) - add helper method for stats printing
    21) - component mapping changes
    22) - remove unused L3Cntrl in Python files
    23) - consolidate CntrlBase definitions and add clear method to CntrlBase
    24) - topology - avoid Machine* functions
    25) - network/netdest - avoid Machine* functions
    26) - allows used of uninitialized sets for NetDest
    27) - Packet* to PacketPtr change
    28) - add L0 machine type to machine type enumeration class (for MESI_Three_Level)
    29) - MESI_Three_Level - make the L0 cache visible to the Ruby network
    30) - add scripts to invoke multi-instance and left-over miscellaneous fixes
    31) - garnet fixed model bug fix

    The block size related changes are from 9-18. With patches 9-12, I add in block_size parameters in a structured way that doesn't prevent compilation/running. It should also help readability tremendously; the alternative is to have them put into a single patch which might be hard to understand.

  3. To follow the block_size parameter changes, I'd look at 9-12 definitely and perhaps 13 and 14. The key to understanding the changes is that the functions used in 12 are used alot.