The problem of modifying the cache parameter in the Canvas

I want to modify cache latency parameter in system canvas,and I use FVP_Base_Neoverse-N1 to build my system,so is it correct to modify the cache parameters like this?

  • Hi, thanks for the question.  By default, cache modelling is disabled in Fast Models / FVPs.  For the most part the presence - or otherwise - of a cache does not affect software functionality and modelling the caches in a programmer's view model like Fast Models has an impact on the simulation performance.  However, you do need to switch cache modelling on in order simulate cache access and have the timing parameters to take effecy.

    In the Base FVPs such as Neoverse-N1 there is a top level parameter called "cache_state_modelled" that switches on (or off) the modelling of all caches.  Each cache in the platform can be enabled or disabled individually, but generally you would either want all on, or all off.  There are several ways to set this parameter.  I generally use a command line switch when running the FVP: "-C cache_state_modelled=1". 

    Another option is to set it in System Canvas and rebuild the platform.  To do this:

    • open the project
    • with the top level LISA file (FVP_Base_Neoverse-N1.lisa) open, click "properties"
    • select the "parameters" tag
    • change the default value of cache_state_modelled to 1
    • save
    • build
    Now when you run the FVP cache modelling will be on by default.  You could then turn it off if needed by adding "-C cache_state_modelled=0" to the command line.
    The second stage of adding delays to the cache transactions in the model.  A Neoverse-N1 has:
    • l1 dcache, l1 icache, l2 cache per core
    • l3 cache shared between all cores
    Each of these has a set of parameters for hit/miss, read/write, snoop and maintenance latency.  The methods for setting them are the same as those for the global cache state modelled paramter.
    • on the command line, add (for example) "-C cluster0.dcache-hit_latency=<value>"
    • edit the value in the LISA by:
    • right click on the Neoverse model (called "cluster0")
    • select "object properties"
    • select "parameters" tab
    • edit the value of all the cache operations that you want to assign a latency
    • (or you could double-click on the "cluster0" model to open the LISA for that model and edit the parameters in the source code)
    • save
    • rebuild
    There is one final step to get these values recognized when you run the FVP.  By default, all latencies are ignored when a fast model runs.  To enable them, you need to set an Environment Variable called FASTSIM_DISABLE_TA.  Set this to "0" for the latencies to applied in the simulation before running the FVP.
    The documentation for Fast Models Timing Annotation can be found here: developer.arm.com/.../timing-annotation.
    Regards,
    Rob.
More questions in this forum