Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Platform-independent core collection
Commits
f4c0344a
Commit
f4c0344a
authored
Aug 03, 2017
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb_lm32: remove non synthesizable code when generating lm32_allprofiles.v
parent
47b5fcb2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6242 additions
and
6379 deletions
+6242
-6379
gen_lmcores.py
modules/wishbone/wb_lm32/gen_lmcores.py
+16
-1
lm32_allprofiles.v
modules/wishbone/wb_lm32/generated/lm32_allprofiles.v
+6226
-6378
No files found.
modules/wishbone/wb_lm32/gen_lmcores.py
View file @
f4c0344a
...
...
@@ -57,6 +57,20 @@ def mangle_names(string, profile_name):
for
pattern
in
LM32_mods
:
string
=
string
.
replace
(
pattern
,
pattern
+
"_"
+
profile_name
)
return
string
;
def
remove_unsynthetizable
(
code
):
syn_on
=
True
r
=
""
for
l
in
code
.
split
(
"
\n
"
):
if
l
.
lstrip
(
"
\t
"
)
.
startswith
(
"// synthesis translate_off"
):
syn_on
=
False
elif
l
.
lstrip
(
"
\t
"
)
.
startswith
(
"// synthesis translate_on"
):
syn_on
=
True
if
syn_on
:
r
=
r
+
l
+
"
\n
"
return
r
def
gen_customized_version
(
profile_name
,
feats
):
print
(
"GenCfg "
,
profile_name
);
...
...
@@ -110,7 +124,8 @@ def gen_customized_version(profile_name, feats):
f
=
open
(
fname
,
"r"
);
contents
=
f
.
read
();
mangled
=
mangle_names
(
contents
,
profile_name
)
ftmp
.
write
(
mangled
);
code
=
remove_unsynthetizable
(
mangled
)
ftmp
.
write
(
code
);
f
.
close
();
ftmp
.
close
();
...
...
modules/wishbone/wb_lm32/generated/lm32_allprofiles.v
View file @
f4c0344a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment