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
296e7413
Commit
296e7413
authored
Nov 01, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: factorize code.
parent
401120be
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
isim.py
hdlmake/tools/isim.py
+3
-5
makefile.py
hdlmake/tools/makefile.py
+1
-1
makefilesim.py
hdlmake/tools/makefilesim.py
+1
-1
makefilevsim.py
hdlmake/tools/makefilevsim.py
+2
-2
No files found.
hdlmake/tools/isim.py
View file @
296e7413
...
...
@@ -168,7 +168,7 @@ fuse:
self
.
write
(
' -i '
)
self
.
write
(
' '
.
join
(
vl_file
.
include_dirs
))
self
.
writeln
(
" $<"
)
self
.
_makefile_
sim_file_touch_stamp
()
self
.
_makefile_
touch_stamp_file
()
self
.
writeln
()
self
.
write
(
"
\n
"
)
# list rules for all _primary.dat files for vhdl
...
...
@@ -186,8 +186,7 @@ fuse:
lib
,
purename
,
"."
+
purename
)
+
'
\n
'
)
self
.
writeln
(
"
\t\t
vhpcomp $(VHPCOMP_FLAGS) -work {lib}=.{slash}{lib} $< "
.
format
(
lib
=
lib
,
slash
=
shell
.
makefile_slash_char
()))
self
.
writeln
(
"
\t\t
@"
+
shell
.
mkdir_command
()
+
" $(dir $@) && "
+
shell
.
touch_command
()
+
" $@
\n
"
)
self
.
_makefile_touch_stamp_file
()
self
.
writeln
()
# dependency meta-target.
# This rule just list the dependencies of the above file
...
...
@@ -201,5 +200,4 @@ fuse:
for
dep_file
in
vhdl_file
.
depends_on
:
self
.
write
(
"
\\\n
"
+
self
.
get_stamp_file
(
dep_file
))
self
.
write
(
'
\n
'
)
self
.
writeln
(
"
\t\t
@"
+
shell
.
mkdir_command
()
+
" $(dir $@) && "
+
shell
.
touch_command
()
+
" $@
\n
"
)
self
.
_makefile_touch_stamp_file
()
hdlmake/tools/makefile.py
View file @
296e7413
...
...
@@ -103,7 +103,7 @@ class ToolMakefile(object):
name
=
dep_file
.
purename
return
os
.
path
.
join
(
dep_file
.
library
,
name
,
".{}_{}"
.
format
(
name
,
dep_file
.
extension
()))
def
_makefile_
sim_file_touch_stamp
(
self
):
def
_makefile_
touch_stamp_file
(
self
):
self
.
write
(
"
\t\t
@"
+
shell
.
mkdir_command
()
+
" $(dir $@)"
)
self
.
writeln
(
" && "
+
shell
.
touch_command
()
+
" $@
\n
"
)
...
...
hdlmake/tools/makefilesim.py
View file @
296e7413
...
...
@@ -110,7 +110,7 @@ TOP_MODULE := {top_module}
elif
isinstance
(
file_aux
,
VerilogFile
):
command_key
=
'vlog'
self
.
writeln
(
"
\t\t
"
+
self
.
SIMULATOR_CONTROLS
[
command_key
]
.
format
(
work
=
file_aux
.
library
))
self
.
_makefile_
sim_file_touch_stamp
()
self
.
_makefile_
touch_stamp_file
()
self
.
writeln
()
def
_makefile_sim_command
(
self
):
...
...
hdlmake/tools/makefilevsim.py
View file @
296e7413
...
...
@@ -121,11 +121,11 @@ class MakefileVsim(MakefileSim):
self
.
_makefile_sim_file_rule
(
vlog
)
self
.
writeln
(
"
\t\t
vlog -work {library} $(VLOG_FLAGS) {sv_option} $(INCLUDE_DIRS) $<"
.
format
(
library
=
vlog
.
library
,
sv_option
=
"-sv"
if
isinstance
(
vlog
,
SVFile
)
else
""
))
self
.
_makefile_
sim_file_touch_stamp
()
self
.
_makefile_
touch_stamp_file
()
self
.
writeln
()
# list rules for all _primary.dat files for vhdl
for
vhdl
in
fileset
.
filter
(
VHDLFile
)
.
sort
():
self
.
_makefile_sim_file_rule
(
vhdl
)
self
.
writeln
(
"
\t\t
vcom $(VCOM_FLAGS) -work {} $< "
.
format
(
vhdl
.
library
))
self
.
_makefile_
sim_file_touch_stamp
()
self
.
_makefile_
touch_stamp_file
()
self
.
writeln
()
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