You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/design/app.rst
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2364,7 +2364,7 @@ This `demo_pma application`_ is used to demonstrate how to set memory region to
2364
2364
hardware-defined regions, but please take care to use it, because maybe the region you disable will go to ``Device``
2365
2365
(maybe covered by another bigger-range ``Device`` region!), then instruction fetch exception happens!
2366
2366
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``
2368
2368
* Struct ``PMA_CONFIG`` is used to assign PMA, which consists of ``region_type`` ``region_base`` ``region_size`` ``region_enable``
2369
2369
* ``region_type`` could be ``PMA_REGION_TYPE_SECSHARE``, ``PMA_REGION_TYPE_NC``, ``PMA_REGION_TYPE_DEV``, ``PMA_REGION_TYPE_CA``
2370
2370
* ``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
2395
2395
2396
2396
.. code-block:: console
2397
2397
2398
-
Nuclei SDK Build Time: Dec 26 2024, 21:48:11
2398
+
Nuclei SDK Build Time: May 23 2025, 15:02:30
2399
2399
Download Mode: SRAM
2400
-
CPU Frequency 50002001 Hz
2400
+
CPU Frequency 50005606 Hz
2401
2401
CPU HartID: 0
2402
-
Benchmark initialized
2403
2402
DCache Linesize is 64 bytes, ways is 2, setperway is 512, total size is 65536 bytes
2404
2403
2405
-
array_test size: 10 * 64 bytes, addr: 0xa0012000
2404
+
array_test size: 64 * 64 bytes, addr: 0xa0013000
2406
2405
2407
2406
Set to NonCacheable region
2408
-
Region type: 0x4,region base addr: 0xa0012000, region size: 0x10000, region status: 1
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.
2418
2417
2419
2418
.. note::
2420
2419
* 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