Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hdlmake
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Hdlmake
Commits
3aa63b0a
Commit
3aa63b0a
authored
13 years ago
by
Pawel Szostek
Browse files
Options
Downloads
Patches
Plain Diff
Typos fixed. Correct ipcore generation
parent
3e5b5b51
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synthesis/depend.py
+19
-15
19 additions, 15 deletions
synthesis/depend.py
synthesis/hdlmake.py
+10
-6
10 additions, 6 deletions
synthesis/hdlmake.py
with
29 additions
and
21 deletions
synthesis/depend.py
+
19
−
15
View file @
3aa63b0a
...
...
@@ -88,41 +88,45 @@ def modelsim_ini_path():
vsim_path
=
os
.
popen
(
"
which vsim
"
).
read
().
strip
()
bin_path
=
os
.
path
.
dirname
(
vsim_path
)
return
os
.
path
.
abspath
(
bin_path
+
"
/../
"
)
def
generate_pseudo_ipcore
(
fie_deps_dict
,
filename
=
"
ipcore
"
):
def
generate_pseudo_ipcore
(
file_deps_dict
,
filename
=
"
ipcore
"
):
import
path
rp
=
os
.
path
.
relpath
f
=
open
(
"
m
akefile.ipcore
"
,
"
w
"
)
f
.
write
(
"
file: create_a_file
\n
"
)
f
.
write
(
"
create_a_file:
\n\t\t
@printf
\"\"
>
"
+
filename
)
f
=
open
(
"
M
akefile.ipcore
"
,
"
w
"
)
f
.
write
(
"
file: create_a_file
done
\n
"
)
f
.
write
(
"
create_a_file:
\n\t\t
@printf
\"\"
>
"
+
filename
+
'
\n
'
)
f
.
write
(
"
file:
"
)
for
file
in
file_deps_dict
:
f
.
write
(
rp
(
file
)
+
"
__cat
\\\n
"
)
f
.
write
(
rp
(
file
.
path
)
+
"
__cat
\\\n
"
)
f
.
write
(
"
\n
"
)
for
file
in
file_deps_dict
:
f
.
write
(
rp
(
file
)
+
"
__cat:
"
)
f
.
write
(
'
'
.
join
(
rp
(
x
)
+
"
__cat
"
for
x
in
file_deps_dict
[
file
]))
f
.
write
(
rp
(
file
.
path
)
+
"
__cat:
"
)
f
.
write
(
'
'
.
join
(
rp
(
depfile
.
path
)
+
"
__cat
"
for
depfile
in
file_deps_dict
[
file
]))
f
.
write
(
'
\n
'
)
f
.
write
(
"
\t\t
@cat
"
+
file
+
"
>>
"
+
filename
+
"
\n\n
"
)
f
.
write
(
"
\t\t
@echo Done.
"
)
f
.
write
(
"
\t\t
@echo
'
--
"
+
file
.
name
+
"'
>>
"
+
filename
+
"
\n
"
)
f
.
write
(
"
\t\t
@cat
"
+
rp
(
file
.
path
)
+
"
>>
"
+
filename
+
"
\n
"
)
f
.
write
(
"
\t\t
@echo
\"\"
>>
"
+
filename
+
"
\n\n
"
)
f
.
write
(
"
done:
\n\t\t
@echo Done.
"
)
def
generate_list_makefile
(
file_deps_dict
,
filename
=
"
Makefile.list
"
):
import
path
rp
=
os
.
path
.
relpath
f
=
open
(
filename
,
"
w
"
)
f
.
write
(
"
file: create_a_file
\n
"
)
f
.
write
(
"
file: create_a_file
done
\n
"
)
f
.
write
(
"
create_a_file:
\n\t\t
@printf
\"\"
> ise_list
\n
"
)
f
.
write
(
"
file:
"
)
for
file
in
file_deps_dict
:
f
.
write
(
rp
(
file
)
+
"
__print
\\\n
"
)
f
.
write
(
rp
(
file
.
path
)
+
"
__print
\\\n
"
)
f
.
write
(
"
\n
"
)
for
file
in
file_deps_dict
:
f
.
write
(
rp
(
file
)
+
"
__print:
"
)
f
.
write
(
'
'
.
join
(
rp
(
x
)
+
"
__print
"
for
x
in
file_deps_dict
[
file
]))
f
.
write
(
rp
(
file
.
path
)
+
"
__print:
"
)
f
.
write
(
'
'
.
join
(
rp
(
depfile
.
path
)
+
"
__print
"
for
depfile
in
file_deps_dict
[
file
]))
f
.
write
(
'
\n
'
)
f
.
write
(
"
\t\t
@echo
\'
"
+
file
.
library
+
'
;
'
+
rp
(
file
)
+
"
\'
>> ise_list
\n\n
"
)
f
.
write
(
"
\t\t
@echo Done.
"
)
f
.
write
(
"
\t\t
@echo
\'
"
+
file
.
library
+
'
;
'
+
rp
(
file
.
path
)
+
"
\'
>> ise_list
\n\n
"
)
f
.
write
(
"
done:
\n
\t\t
@echo Done.
"
)
def
generate_makefile
(
file_deps_dict
,
filename
=
"
Makefile
"
):
from
time
import
gmtime
,
strftime
...
...
This diff is collapsed.
Click to expand it.
synthesis/hdlmake.py
+
10
−
6
View file @
3aa63b0a
...
...
@@ -44,6 +44,7 @@ def main():
parser
.
add_option
(
"
-v
"
,
"
--verbose
"
,
dest
=
"
verbose
"
,
action
=
"
store_true
"
,
default
=
"
false
"
,
help
=
"
verbose mode
"
)
parser
.
add_option
(
"
--ipcore
"
,
dest
=
"
ipcore
"
,
action
=
"
store_true
"
,
default
=
"
false
"
,
help
=
"
generate a pseudo ip-core
"
)
parser
.
add_option
(
"
--inject
"
,
dest
=
"
inject
"
,
action
=
"
store_true
"
,
default
=
None
,
help
=
"
inject file list into ise project
"
)
parser
.
add_option
(
"
--nodel
"
,
dest
=
"
nodel
"
,
action
=
"
store_true
"
,
default
=
"
false
"
,
help
=
"
don
'
t delete intermediate makefiles
"
)
parser
.
add_option
(
"
--make-list
"
,
dest
=
"
make_list
"
,
action
=
"
store_true
"
,
default
=
None
,
help
=
"
make list of project files in ISE format
"
)
parser
.
add_option
(
"
--tcl-file
"
,
dest
=
"
tcl
"
,
help
=
"
specify a .tcl file used for synthesis with ISE
"
)
parser
.
add_option
(
"
--qpf-file
"
,
dest
=
"
qpf
"
,
help
=
"
specify a .qpf file used for synthesis with QPF
"
)
...
...
@@ -103,9 +104,13 @@ def main():
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
def
generate_pseudo_ipcore
():
file_deps_dict
=
global_mod
.
generate_deps_for_vhdl_in_modules
()
import
depend
tm
=
global_mod
.
top_module
file_deps_dict
=
tm
.
generate_deps_for_vhdl_in_modules
()
depend
.
generate_pseudo_ipcore
(
file_deps_dict
)
if
global_mod
.
options
.
nodel
!=
True
:
os
.
remove
(
"
Makefile.ipcore
"
)
def
fetch
():
modules
=
global_mod
.
top_module
.
fetch
()
p
.
vprint
(
"
Involved modules:
"
)
...
...
@@ -218,13 +223,12 @@ def local_synthesis():
def
generate_list_makefile
():
import
depend
tm
=
global_mod
.
top_module
modules
=
tm
.
make_list_of_modules
()
p
.
vprint
(
"
Modules that will be taken into account in the makefile:
"
+
str
([
str
(
i
)
for
i
in
modules
]))
deps
=
depend
.
generate_deps_for_vhdl_in_modules
(
modules
)
deps
=
tm
.
generate_deps_for_vhdl_in_modules
()
depend
.
generate_list_makefile
(
deps
)
os
.
system
(
"
make -f Makefile.list
"
)
os
.
remove
(
"
Makefile.list
"
)
if
global_mod
.
options
.
nodel
!=
True
:
os
.
remove
(
"
Makefile.list
"
)
if
__name__
==
"
__main__
"
:
#global options' map for use in the entire script
t0
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment