Skip to content

Commit bbf582a

Browse files
authored
Merge pull request #88 from siliconcompiler/fix-template
use >= for memory mapping to avoid fallthrough
2 parents a66e6fa + 4447bb5 commit bbf582a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lambdalib/utils/templates/la_spmemory.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module la_sp{{ type }}
4646

4747
// Determine which memory to select
4848
localparam MEM_PROP = (PROP != "DEFAULT") ? PROP :{% for aw, dw_select in selection_table.items() %}
49-
{% if loop.nextitem is defined %}(AW {% if loop.previtem is defined %}=={% else %}>={% endif %} {{ aw }}) ? {% endif %}{% for dw, memory in dw_select.items() %}{% if loop.nextitem is defined %}(DW >= {{dw}}) ? {% endif %}"{{ memory}}"{% if loop.nextitem is defined %} : {% endif%}{% endfor %}{% if loop.nextitem is defined %} :{% else %};{% endif %}{% endfor %}
49+
{% if loop.nextitem is defined %}(AW >= {{ aw }}) ? {% endif %}{% for dw, memory in dw_select.items() %}{% if loop.nextitem is defined %}(DW >= {{dw}}) ? {% endif %}"{{ memory}}"{% if loop.nextitem is defined %} : {% endif%}{% endfor %}{% if loop.nextitem is defined %} :{% else %};{% endif %}{% endfor %}
5050

5151
localparam MEM_WIDTH = {% for memory, width in width_table %}
5252
(MEM_PROP == "{{ memory }}") ? {{ width }} :{% endfor %}

0 commit comments

Comments
 (0)