3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-07 19:51:23 +00:00

Added memory_bram "shuffle_enable" feature

This commit is contained in:
Clifford Wolf 2015-01-04 13:14:30 +01:00
parent 5d631f0ea7
commit daae35319b
2 changed files with 117 additions and 1 deletions

View file

@ -68,6 +68,10 @@ def create_bram(dsc_f, sim_f, ref_f, tb_f, k1, k2, or_next):
print(" clkpol %s" % " ".join(["%d" % i for i in clkpol]), file=dsc_f)
print("endbram", file=dsc_f)
print("match bram_%02d_%02d" % (k1, k2), file=dsc_f)
if random.randrange(2):
non_zero_enables = [i for i in enable if i]
if len(non_zero_enables):
print(" shuffle_enable %d" % random.choice(non_zero_enables), file=dsc_f)
if or_next:
print(" or_next_if_better", file=dsc_f)
print("endmatch", file=dsc_f)