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
200ff96a
Commit
200ff96a
authored
13 years ago
by
Paweł Szostek
Browse files
Options
Downloads
Patches
Plain Diff
Check if XILINX env variable is set
parent
7d63e57f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synthesis/action_runner.py
+28
-6
28 additions, 6 deletions
synthesis/action_runner.py
with
28 additions
and
6 deletions
synthesis/action_runner.py
+
28
−
6
View file @
200ff96a
...
...
@@ -62,15 +62,37 @@ class ActionRunner(object):
def
generate_ise_project
(
self
,
top_mod
):
from
flow
import
ISEProject
,
ISEProjectProperty
if
self
.
__is_xilinx_screwed
():
p
.
rawprint
(
"
Xilinx environment variable is unset or is wrong.
\n
Cannot generate ise project
"
)
quit
()
if
not
self
.
modules_pool
.
is_everything_fetched
():
p
.
echo
(
"
A module remains unfetched. Fetching must be done prior to makefile generation
"
)
quit
()
ise
=
self
.
__check_xilinx
()
if
os
.
path
.
exists
(
top_mod
.
syn_project
):
self
.
__update_existing_ise_project
()
self
.
__update_existing_ise_project
(
ise
=
ise
)
else
:
self
.
__create_new_ise_project
(
ise
=
ise
)
def
__is_xilinx_screwed
(
self
):
if
self
.
__check_xilinx
()
==
None
:
return
True
else
:
self
.
__create_new_ise_project
()
return
False
def
__update_existing_ise_project
(
self
):
def
__check_xilinx
(
self
):
xilinx
=
os
.
getenv
(
"
XILINX
"
)
if
xilinx
==
None
:
return
None
else
:
import
re
vp
=
re
.
compile
(
"
.*?(\d\d\.\d).*
"
)
m
=
re
.
match
(
vp
,
xilinx
)
if
m
==
None
:
return
None
return
m
.
group
(
1
)
def
__update_existing_ise_project
(
self
,
ise
):
from
dep_solver
import
DependencySolver
from
flow
import
ISEProject
,
ISEProjectProperty
...
...
@@ -79,13 +101,13 @@ class ActionRunner(object):
solver
=
DependencySolver
()
fileset
=
solver
.
solve
(
fileset
)
prj
=
ISEProject
()
prj
=
ISEProject
(
ise
=
ise
)
prj
.
add_files
(
fileset
)
prj
.
add_libs
(
fileset
.
get_libs
())
prj
.
load_xml
(
top_mod
.
syn_project
)
prj
.
emit_xml
(
top_mod
.
syn_project
)
def
__create_new_ise_project
(
self
):
def
__create_new_ise_project
(
self
,
ise
):
from
dep_solver
import
DependencySolver
from
flow
import
ISEProject
,
ISEProjectProperty
...
...
@@ -94,7 +116,7 @@ class ActionRunner(object):
solver
=
DependencySolver
()
fileset
=
solver
.
solve
(
fileset
)
prj
=
ISEProject
()
prj
=
ISEProject
(
ise
=
ise
)
prj
.
add_files
(
fileset
)
prj
.
add_libs
(
fileset
.
get_libs
())
...
...
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