Skip to content

Commit e8cac19

Browse files
dongyongtaofanghuaqi
authored andcommitted
doc: update demo_pma design part
Signed-off-by: dongyongtao <[email protected]>
1 parent a440897 commit e8cac19

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

doc/source/design/app.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ This `demo_pma application`_ is used to demonstrate how to set memory region to
23642364
hardware-defined regions, but please take care to use it, because maybe the region you disable will go to ``Device``
23652365
(maybe covered by another bigger-range ``Device`` region!), then instruction fetch exception happens!
23662366

2367-
* Observe cycles taken when executing same task ``array_update_by_row`` by changing the same memory region to ``Non-Cacheable``/``Cacheable``
2367+
* Observe cycles taken when executing same task ``array_read_by_row``(read from ``array_test``, update into ``array_test_r``) by changing the same memory region to ``Non-Cacheable``/``Cacheable``
23682368
* Struct ``PMA_CONFIG`` is used to assign PMA, which consists of ``region_type`` ``region_base`` ``region_size`` ``region_enable``
23692369
* ``region_type`` could be ``PMA_REGION_TYPE_SECSHARE``, ``PMA_REGION_TYPE_NC``, ``PMA_REGION_TYPE_DEV``, ``PMA_REGION_TYPE_CA``
23702370
* ``region_base`` is base physical address, which needs to be 4K byte aligned
@@ -2395,26 +2395,25 @@ This `demo_pma application`_ is used to demonstrate how to set memory region to
23952395

23962396
.. code-block:: console
23972397
2398-
Nuclei SDK Build Time: Dec 26 2024, 21:48:11
2398+
Nuclei SDK Build Time: May 23 2025, 15:02:30
23992399
Download Mode: SRAM
2400-
CPU Frequency 50002001 Hz
2400+
CPU Frequency 50005606 Hz
24012401
CPU HartID: 0
2402-
Benchmark initialized
24032402
DCache Linesize is 64 bytes, ways is 2, setperway is 512, total size is 65536 bytes
24042403
2405-
array_test size: 10 * 64 bytes, addr: 0xa0012000
2404+
array_test size: 64 * 64 bytes, addr: 0xa0013000
24062405
24072406
Set to NonCacheable region
2408-
Region type: 0x4,region base addr: 0xa0012000, region size: 0x10000, region status: 1
2409-
CSV, NonCacheable, 345
2410-
HPM4:0xf0000021, array_update_by_row_dcache_miss_noncacheable, 0
2407+
Region type: 0x4,region base addr: 0xa0013000, region size: 0x1000, region status: 1
2408+
HPM4:0xf0000021, array_read_by_row_dcache_miss_noncacheable, 64
24112409
24122410
Set to Cacheable region
2413-
Region type: 0x0,region base addr: 0xa0012000, region size: 0x10000, region status: 1
2414-
CSV, Cacheable, 166
2415-
HPM4:0xf0000021, array_update_by_row_dcache_miss_cacheable, 2
2411+
Region type: 0x0,region base addr: 0xa0013000, region size: 0x1000, region status: 1
2412+
HPM4:0xf0000021, array_read_by_row_dcache_miss_cacheable, 128
24162413
2417-
From output, we can see the cycles taken varies a lot according to the memory attribute ``NonCacheable`` and ``Cacheable``
2414+
From output, considering ``array_read_by_row_dcache_miss_noncacheable`` counting the common part cache miss including ``array_test_r`` which belongs to Cacheable.
2415+
So ``array_read_by_row_dcache_miss_cacheable`` minus ``array_read_by_row_dcache_miss_noncacheable``, we get exactly the cache miss(here is the row number 64) that
2416+
``array_test`` brings in Cacheable region, and it demonstrates ``array_test`` brings no cache miss in NonCacheable region as expected.
24182417

24192418
.. note::
24202419
* In Nuclei Evalsoc core ux900 for example, the sram/ddr memory locates originally in hardware-defined Cacheable region(which configured by rtl configuration stage),

0 commit comments

Comments
 (0)