mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
support bram initialisation
This commit is contained in:
parent
7a43be5e43
commit
47374a495d
5 changed files with 25 additions and 3 deletions
8
techlibs/gowin/brams_init.py
Executable file
8
techlibs/gowin/brams_init.py
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
with open("techlibs/gowin/bram_init_16.vh", "w") as f:
|
||||
for i in range(0, 0x40):
|
||||
low = i << 8
|
||||
hi = ((i+1) << 8)-1
|
||||
snippet = "INIT[%d:%d]" % (hi, low)
|
||||
print(".INIT_RAM_%02X({%s})," % (i, snippet), file=f)
|
Loading…
Add table
Add a link
Reference in a new issue