projects
/
yosys.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge remote-tracking branch 'origin/master' into xaig_dff
[yosys.git]
/
techlibs
/
gowin
/
brams_init.py
1
#!/usr/bin/env python3
2
3
with
open
(
"techlibs/gowin/bram_init_16.vh"
,
"w"
)
as
f
:
4
for
i
in
range
(
0
,
0x40
):
5
low
=
i
<<
8
6
hi
= ((
i
+
1
) <<
8
)-
1
7
snippet
=
"INIT[
%d
:
%d
]"
% (
hi
,
low
)
8
print
(
".INIT_RAM_
%0
2X({
%s
}),"
% (
i
,
snippet
),
file
=
f
)