Question related to add_submap

Hi ,

The UVM LRM 18002-2017 mentions the following for function add_submap


The number of consecutive physical addresses occupied by the submap depends on 
the number of bytes in the physical interface that corresponds to the submap, 
the number of addresses used in the submap, and 
the number of bytes in the physical interface corresponding to this address map.

By “number of bytes in the physical interface that corresponds to the submap”
I believe it means the 3rd argument ’ n_bytes ’ to create_map for sub_map .

Similarly “number of bytes in the physical interface corresponding to this address map” points to the 3rd argument ’ n_bytes ’ to create_map for parent map .

I am not able to get the following

  • the number of bytes in the physical interface corresponding to this address map
  • the number of addresses used in the submap

How does ’ n_bytes ’ passed to create_map for parent address map impact
The number of consecutive physical addresses occupied by the submap ?

Let’s take an example ::


//  [1]  Within   build()  of  CSR  with  10  registers  which  in  itself  is  sub_block 
         
         //  Create  10  registers  and  call  their  respective  build()  function  first
         default_map  =  create_map( "default_map" , 'h0 , 4 , UVM_LITTLE_ENDIAN , 1 ); // 4-byte physical  interface

         default_map.add_reg( reg1 , 'h0 , "RO" );
         default_map.add_reg( reg2 , 'h4 , "RW" );
         .......................................
         default_map.add_reg( reg10, 'd36 , "RW" );
 
// [2]  Within  build()  of  Parent block  which  has  above  CSR  as  sub-block
         
        //  create  CSR  Sub-block  and  call  it's  build()  here 

        default_map  =  create_map( "default_map" , 'h0 , 8 , UVM_LITTLE_ENDIAN , 1 ); // 8-byte physical  interface
        
        default_map.add_submap( CSR.default_map , 'h100 );

So how does one calculate the number of consecutive physical addresses occupied by the CSR submap ?