Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
Hdlmake
Commits
74d58e92
Commit
74d58e92
authored
Oct 23, 2013
by
Pawel Szostek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhance makefile writer (modelsim)
parent
edbd9225
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
15 deletions
+27
-15
makefile_writer.py
hdlmake/makefile_writer.py
+27
-15
No files found.
hdlmake/makefile_writer.py
View file @
74d58e92
...
...
@@ -25,6 +25,7 @@ import logging
import
string
import
fetch
import
global_mod
from
string
import
Template
class
_StaticClassVariable
():
pass
...
...
@@ -462,22 +463,32 @@ clean:
#rules for all _primary.dat files for sv
for
vl
in
fileset
.
filter
(
VerilogFile
):
self
.
write
(
os
.
path
.
join
(
vl
.
library
,
vl
.
purename
,
'.'
+
vl
.
purename
+
"_"
+
vl
.
extension
())
+
': '
)
for
dep_file
in
vl
.
depends_on
:
self
.
write
(
"
%
s:
%
s"
%
(
os
.
path
.
join
(
vl
.
library
,
vl
.
purename
,
".
%
s_
%
s"
%
(
vl
.
purename
,
vl
.
extension
())),
vl
.
rel_path
()
)
)
for
dep_file
in
[
dfile
for
dfile
in
vl
.
depends_on
if
dfile
is
not
vl
]
:
name
=
dep_file
.
purename
extension
=
dep_file
.
extension
()
self
.
write
(
"
\\\n
"
+
os
.
path
.
join
(
dep_file
.
library
,
name
,
".
%
s_
%
s"
%
(
name
,
extension
)))
self
.
write
(
"
\t\t
vlog -work "
+
vl
.
library
)
self
.
write
(
" $(VLOG_FLAGS) "
)
if
isinstance
(
vl
,
SVFile
):
self
.
write
(
" -sv "
)
incdir
=
"+incdir+"
incdir
+=
'+'
.
join
(
vl
.
include_dirs
)
incdir
+=
" "
self
.
write
(
incdir
)
self
.
writeln
(
vl
.
vlog_opt
+
" $<"
)
self
.
writeln
()
###
# self.write("\t\tvlog -work "+vl.library)
# self.write(" $(VLOG_FLAGS) ")
# if isinstance(vl, SVFile):
# self.write(" -sv ")
# incdir = "+incdir+"
# incdir += '+'.join(vl.include_dirs)
# incdir += " "
# self.write(incdir)
# self.writeln(vl.vlog_opt+" $<")
####
compile_template
=
Template
(
"
\t\t
vlog -work ${library} $$(VLOG_FLAGS) ${sv_option} +incdir+${include_dirs} ${vlog_opt} $$<"
)
compile_line
=
compile_template
.
substitute
(
library
=
vl
.
library
,
sv_option
=
"-sv"
if
isinstance
(
vl
,
SVFile
)
else
""
,
include_dirs
=
'+'
.
join
(
vl
.
include_dirs
),
vlog_opt
=
vl
.
vlog_opt
)
self
.
writeln
(
compile_line
)
self
.
write
(
"
\t\t
@mkdir -p $(dir $@)"
)
self
.
writeln
(
" && touch $@
\n\n
"
)
self
.
write
(
"
\n
"
)
...
...
@@ -487,8 +498,9 @@ clean:
lib
=
vhdl
.
library
purename
=
vhdl
.
purename
#each .dat depends on corresponding .vhd file
self
.
write
(
os
.
path
.
join
(
lib
,
purename
,
"."
+
purename
+
"_"
+
vhdl
.
extension
())
+
": "
+
vhdl
.
rel_path
())
self
.
write
(
"
%
s:
%
s"
%
(
os
.
path
.
join
(
lib
,
purename
,
"."
+
purename
+
"_"
+
vhdl
.
extension
()),
vhdl
.
rel_path
())
)
for
dep_file
in
vhdl
.
depends_on
:
name
=
dep_file
.
purename
extension
=
dep_file
.
extension
()
...
...
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