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
694fc922
Commit
694fc922
authored
Aug 04, 2011
by
Paweł Szostek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor bug in makefile generation
parent
b9403c1c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
hdlmake
hdlmake
+0
-0
flow.py
src/flow.py
+12
-1
hdlmake_kernel.py
src/hdlmake_kernel.py
+8
-16
makefile_writer.py
src/makefile_writer.py
+1
-1
No files found.
hdlmake
View file @
694fc922
No preview for this file type
src/flow.py
View file @
694fc922
...
...
@@ -42,7 +42,6 @@ class ISEProjectProperty:
return
prop
class
ISEProject
:
class
FakeFile
(
list
):
def
__init__
(
self
):
...
...
@@ -92,6 +91,18 @@ class ISEProject:
def
add_property
(
self
,
prop
):
self
.
props
.
append
(
prop
)
def
add_initial_properties
(
self
,
syn_device
,
syn_grade
,
syn_package
,
syn_top
):
self
.
add_property
(
ISEProjectProperty
(
"Device"
,
syn_device
))
self
.
add_property
(
ISEProjectProperty
(
"Device Family"
,
"Spartan6"
))
self
.
add_property
(
ISEProjectProperty
(
"Speed Grade"
,
syn_grade
))
self
.
add_property
(
ISEProjectProperty
(
"Package"
,
syn_package
))
self
.
add_property
(
ISEProjectProperty
(
"Enable Multi-Threading"
,
"2"
))
self
.
add_property
(
ISEProjectProperty
(
"Enable Multi-Threading par"
,
"4"
))
self
.
add_property
(
ISEProjectProperty
(
"Implementation Top"
,
"Architecture|"
+
syn_top
))
self
.
add_property
(
ISEProjectProperty
(
"Manual Implementation Compile Order"
,
"true"
))
self
.
add_property
(
ISEProjectProperty
(
"Auto Implementation Top"
,
"false"
))
self
.
add_property
(
ISEProjectProperty
(
"Implementation Top Instance Path"
,
"/"
+
syn_top
))
def
__parse_props
(
self
):
for
xmlp
in
self
.
xml_project
.
getElementsByTagName
(
"properties"
)[
0
]
.
getElementsByTagName
(
"property"
):
prop
=
ISEProjectProperty
(
...
...
src/hdlmake_kernel.py
View file @
694fc922
...
...
@@ -218,17 +218,11 @@ class HdlmakeKernel(object):
prj
=
ISEProject
(
ise
=
ise
,
top_mod
=
self
.
modules_pool
.
get_top_module
())
prj
.
add_files
(
fileset
)
prj
.
add_libs
(
fileset
.
get_libs
())
prj
.
add_initial_properties
(
syn_device
=
top_mod
.
syn_device
,
syn_grade
=
top_mod
.
syn_grade
,
syn_package
=
top_mod
.
syn_package
,
syn_top
=
top_mod
.
syn_top
)
prj
.
add_property
(
ISEProjectProperty
(
"Device"
,
top_mod
.
syn_device
))
prj
.
add_property
(
ISEProjectProperty
(
"Device Family"
,
"Spartan6"
))
prj
.
add_property
(
ISEProjectProperty
(
"Speed Grade"
,
top_mod
.
syn_grade
))
prj
.
add_property
(
ISEProjectProperty
(
"Package"
,
top_mod
.
syn_package
))
prj
.
add_property
(
ISEProjectProperty
(
"Enable Multi-Threading"
,
"2"
))
prj
.
add_property
(
ISEProjectProperty
(
"Enable Multi-Threading par"
,
"4"
))
prj
.
add_property
(
ISEProjectProperty
(
"Implementation Top"
,
"Architecture|"
+
top_mod
.
syn_top
))
prj
.
add_property
(
ISEProjectProperty
(
"Manual Implementation Compile Order"
,
"true"
))
prj
.
add_property
(
ISEProjectProperty
(
"Auto Implementation Top"
,
"false"
))
prj
.
add_property
(
ISEProjectProperty
(
"Implementation Top Instance Path"
,
"/"
+
top_mod
.
syn_top
))
prj
.
emit_xml
(
top_mod
.
syn_project
)
def
run_local_synthesis
(
self
):
...
...
@@ -243,7 +237,6 @@ class HdlmakeKernel(object):
def
run_remote_synthesis
(
self
):
from
srcfile
import
SourceFileFactory
ssh
=
self
.
connection
tm
=
self
.
modules_pool
.
get_top_module
()
cwd
=
os
.
getcwd
()
p
.
vprint
(
"The program will be using ssh connection: "
+
str
(
ssh
))
...
...
@@ -251,7 +244,7 @@ class HdlmakeKernel(object):
p
.
echo
(
"SSH connection failure. Remote host doesn't response."
)
quit
()
if
not
os
.
path
.
exists
(
tm
.
fetchto
):
if
not
os
.
path
.
exists
(
self
.
top_module
.
fetchto
):
p
.
echo
(
"There are no modules fetched. Are you sure it's correct?"
)
files
=
self
.
modules_pool
.
build_very_global_file_list
()
...
...
@@ -262,9 +255,9 @@ class HdlmakeKernel(object):
sff
=
SourceFileFactory
()
files
.
add
(
sff
.
new
(
tcl
))
files
.
add
(
sff
.
new
(
tm
.
syn_project
))
files
.
add
(
sff
.
new
(
self
.
top_module
.
syn_project
))
dest_folder
=
ssh
.
transfer_files_forth
(
files
,
dest_folder
=
tm
.
syn_name
)
dest_folder
=
ssh
.
transfer_files_forth
(
files
,
dest_folder
=
self
.
top_module
.
syn_name
)
syn_cmd
=
"cd "
+
dest_folder
+
cwd
+
" && xtclsh run.tcl"
p
.
vprint
(
"Launching synthesis on "
+
str
(
ssh
)
+
": "
+
syn_cmd
)
...
...
@@ -296,9 +289,8 @@ class HdlmakeKernel(object):
return
tcls
[
0
]
def
__generate_tcl
(
self
):
tm
=
self
.
modules_pool
.
get_top_module
()
f
=
open
(
"run.tcl"
,
"w"
);
f
.
write
(
"project open "
+
tm
.
syn_project
+
'
\n
'
)
f
.
write
(
"project open "
+
self
.
top_module
.
syn_project
+
'
\n
'
)
f
.
write
(
"process run {Generate Programming File} -force rerun_all
\n
"
)
f
.
close
()
...
...
src/makefile_writer.py
View file @
694fc922
...
...
@@ -280,7 +280,7 @@ clean:
#the compilation process fails) and add an ending according to file's
#extension (.sv and .vhd files may have the same corename and this
#causes a mess
self
.
write
(
os
.
path
.
join
(
vl
.
library
,
vl
.
purename
,
"."
+
vl
.
purename
+
"_
sv"
)
+
"
\\\n
"
)
self
.
write
(
os
.
path
.
join
(
vl
.
library
,
vl
.
purename
,
"."
+
vl
.
purename
+
"_
"
+
vl
.
extension
()
)
+
"
\\\n
"
)
self
.
write
(
'
\n
'
)
libs
=
set
(
f
.
library
for
f
in
fileset
.
files
)
...
...
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