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
3e5b5b51
Commit
3e5b5b51
authored
13 years ago
by
Pawel Szostek
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a typo and basic pseudo ip-core generation
parent
aa701a7a
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synthesis/depend.py
+18
-9
18 additions, 9 deletions
synthesis/depend.py
synthesis/hdlmake.py
+8
-1
8 additions, 1 deletion
synthesis/hdlmake.py
with
26 additions
and
10 deletions
synthesis/depend.py
+
18
−
9
View file @
3e5b5b51
...
...
@@ -88,20 +88,29 @@ 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
"
):
import
path
rp
=
os
.
path
.
relpath
f
=
open
(
"
makefile.ipcore
"
,
"
w
"
)
f
.
write
(
"
file: create_a_file
\n
"
)
f
.
write
(
"
create_a_file:
\n\t\t
@printf
\"\"
>
"
+
filename
)
f
.
write
(
"
file:
"
)
for
file
in
file_deps_dict
:
f
.
write
(
rp
(
file
)
+
"
__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
(
'
\n
'
)
f
.
write
(
"
\t\t
@cat
"
+
file
+
"
>>
"
+
filename
+
"
\n\n
"
)
f
.
write
(
"
\t\t
@echo Done.
"
)
def
generate_list_makefile
(
file_deps_dict
,
filename
=
"
Makefile.list
"
):
from
time
import
gmtime
,
strftime
import
path
date
=
strftime
(
"
%a, %d %b %Y %H:%M:%S
"
,
gmtime
())
notices
=
"""
#######################################################################
# This makefile has been automatically generated by hdl-make
# on
"""
+
date
+
"""
#######################################################################
"""
rp
=
os
.
path
.
relpath
f
=
open
(
filename
,
"
w
"
)
f
.
write
(
notices
)
f
.
write
(
"
file: create_a_file
\n
"
)
f
.
write
(
"
create_a_file:
\n\t\t
@printf
\"\"
> ise_list
\n
"
)
f
.
write
(
"
file:
"
)
...
...
@@ -112,7 +121,7 @@ def generate_list_makefile(file_deps_dict, filename="Makefile.list"):
f
.
write
(
rp
(
file
)
+
"
__print:
"
)
f
.
write
(
'
'
.
join
(
rp
(
x
)
+
"
__print
"
for
x
in
file_deps_dict
[
file
]))
f
.
write
(
'
\n
'
)
f
.
write
(
"
\t\t
@echo
\'
"
+
file
_
lib
_dict
[
file
]
+
'
;
'
+
rp
(
file
)
+
"
\'
>> ise_list
\n\n
"
)
f
.
write
(
"
\t\t
@echo
\'
"
+
file
.
lib
rary
+
'
;
'
+
rp
(
file
)
+
"
\'
>> ise_list
\n\n
"
)
f
.
write
(
"
\t\t
@echo Done.
"
)
def
generate_makefile
(
file_deps_dict
,
filename
=
"
Makefile
"
):
...
...
This diff is collapsed.
Click to expand it.
synthesis/hdlmake.py
+
8
−
1
View file @
3e5b5b51
...
...
@@ -42,6 +42,7 @@ def main():
parser
.
add_option
(
"
-l
"
,
"
--synthesize-locally
"
,
dest
=
"
local
"
,
action
=
"
store_true
"
,
help
=
"
perform a local synthesis
"
)
parser
.
add_option
(
"
-r
"
,
"
--synthesize-remotelly
"
,
dest
=
"
remote
"
,
action
=
"
store_true
"
,
help
=
"
perform a remote synthesis
"
)
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
(
"
--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
"
)
...
...
@@ -56,7 +57,7 @@ def main():
# if no, the look for it in the current directory (python manifest has priority)
file
=
None
if
os
.
path
.
exists
(
"
manifest.py
"
):
file
=
"
man
f
iest.py
"
file
=
"
mani
f
est.py
"
elif
os
.
path
.
exitsts
(
"
Manifest.py
"
):
file
=
"
Manifest.py
"
...
...
@@ -97,8 +98,14 @@ def main():
generate_makefile
()
elif
global_mod
.
options
.
inject
==
True
:
inject_into_ise
()
elif
global_mod
.
options
.
ipcore
==
True
:
generate_pseudo_ipcore
()
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
def
generate_pseudo_ipcore
():
file_deps_dict
=
global_mod
.
generate_deps_for_vhdl_in_modules
()
depend
.
generate_pseudo_ipcore
(
file_deps_dict
)
def
fetch
():
modules
=
global_mod
.
top_module
.
fetch
()
p
.
vprint
(
"
Involved modules:
"
)
...
...
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