hdl.mem: add synthesis attribute support.

Fixes #291.
This commit is contained in:
whitequark 2020-02-06 14:48:48 +00:00
parent f7abe368a9
commit 31cd72c0b6
3 changed files with 13 additions and 2 deletions

View file

@ -826,7 +826,7 @@ def _convert_fragment(builder, fragment, name_map, hierarchy):
memory = param_value
if memory not in memories:
memories[memory] = module.memory(width=memory.width, size=memory.depth,
name=memory.name)
name=memory.name, attrs=memory.attrs)
addr_bits = bits_for(memory.depth)
data_parts = []
data_mask = (1 << memory.width) - 1