Skip to content

Commit

Permalink
Merge pull request #25 from sifive/ecc_scrub
Browse files Browse the repository at this point in the history
Limit zeroed memory to 64k.
  • Loading branch information
bsousi5 authored Apr 30, 2020
2 parents 6f0944f + a0ef04b commit 421ae1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion memory_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@ def consolidate_address_ranges(regions):
for region in sorted_list:
memories.update({region["name"] : region})

return memories
for _, memory in memories.items():
if 'memory' in memory["name"] and memory["length"] > 0x10000:
# Only 64KB of memory is zeroed due to limitation in RTL sim run
memory["length"] = 0x10000

return memories

def compute_address_range(region):
"""Extract the address range from the reg of the Node"""
Expand Down
4 changes: 4 additions & 0 deletions templates/base.lds
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ SECTIONS

/* The RAM memories map for ECC scrubbing */
{% for memory in ram_memories %}
{% if 'memory' in memory["name"]: %}
/* Default memory to zero-scrub for at most 64KB, for limiting RTL simulation run time. */
* User is recommended to enable the full size for manual RTL simulation run! */
{% endif %}
PROVIDE( metal_{{ memory.name }}_memory_start = {{ memory.base_hex }} );
PROVIDE( metal_{{ memory.name }}_memory_end = {{ memory.base_hex }} + {{ memory.length_hex }} );
{% endfor %}
Expand Down

0 comments on commit 421ae1c

Please sign in to comment.