anchor.diff:     endfunction
   
      // ================================================================
  -   // Hit; no need to upgrade cache meta state
  +   // Hit; no eviction, no refill;
  +   //      just respond and update meta state to MODIFIED on writes
  +
  +   Bool is_hit = ((   ((req_op == AXI4_OP_RD) && (tag.tag_state >= META_SHARED))
  +		   || ((req_op == AXI4_OP_WR) && (tag.tag_state >= META_EXCLUSIVE)))
  +		  && (tag.tag_addr  == line_addr));
   
      rule rl_hit ((rg_state == STATE_IDLE)
   		&& (! f_L2_to_L1_Reqs.notEmpty)        // L2-to-L1 requests have priority
   		&& soc_map.m_is_mem_addr (addr)        // cacheable addrs only
  -		&& (   ((req_op == AXI4_OP_RD)
  -			&& (tag.tag_state >= META_SHARED))
  -		    || ((req_op == AXI4_OP_WR)
  -			&& (tag.tag_state >= META_EXCLUSIVE)))
  -		&& (tag.tag_addr  == fn_addr_to_data_addr (addr)));
  +		&& is_hit);
   
         let new_tag_state = ((req_op == AXI4_OP_RD) ? tag.tag_state : META_MODIFIED);
         let data_set = rf_data_sets.sub (index);
  
positive.code:       end
     endrule
  
     // ----------------
     // Some convenience values for head of merged queue (current request)
  
     let req     = f_reqs.first;
     let req_op  = req.req_op;
     let addr    = req.addr;
     let index   = fn_addr_to_index (addr);
     let tag_set = rf_tag_sets.sub (index);
     let tag     = tag_set [0];    // Direct mapped only, for now
  
     // ================================================================
     // Handle downgrade-request from L2 (highest priority)
  
  
negative.code:    endrule
  
     // ================================================================
     // Hit; but first needs upgrade from Invalid/Shared to Shared/Exclusive
     // Do upgrade if tag state is
     // Req is RD:  tag state is I
     // Reg is WR:  tag state is I or
     //             tag state is S, E and addr matches tag
  
     function Bool fn_do_upgrade ();
        Bool result;
        if (tag.tag_state == META_INVALID)
  	 // Refill needed for read or write
  	 result = True;
        else if (tag.tag_addr != line_addr)
  	 // Tag does not match; need to evict before upgrade
  	 result = False;
        else if (req_op == AXI4_OP_RD)
  	 // RD and tag match; no need to upgrade
  	 result = False;
        else    
  	 // WR and tag match; upgrade if S (not E, M)
  	 result = (tag.tag_state == META_SHARED);
        return result;
     endfunction
  
     rule rl_upgrade_req ((rg_state == STATE_IDLE)
  			&& (! f_L2_to_L1_Reqs.notEmpty)        // L2-to-L1 requests have priority
  			&& soc_map.m_is_mem_addr (addr)        // cacheable addrs only
  			&& fn_do_upgrade ());
        // Request refill/upgrade from L2
        let l1_to_l2_req = L1_to_L2_Req {addr:        line_addr,
  				       from_state:  tag.tag_state,
  				       to_state:    ((req_op == AXI4_OP_RD)
  						     ? META_SHARED
  