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
f7ca1122
Commit
f7ca1122
authored
Jun 02, 2013
by
Paweł Szostek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of ohwr.org:misc/hdl-make
Conflicts: hdlmake
parents
aff4c49c
aceb7036
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
16 deletions
+23
-16
__main__.py
src/__main__.py
+5
-1
flow.py
src/flow.py
+1
-1
flow_altera.py
src/flow_altera.py
+3
-1
global_mod.py
src/global_mod.py
+0
-3
makefile_writer.py
src/makefile_writer.py
+5
-7
srcfile.py
src/srcfile.py
+9
-3
No files found.
src/__main__.py
View file @
f7ca1122
...
...
@@ -67,6 +67,10 @@ def main():
default
=
None
,
help
=
"create/update an ise project including list of project"
"files"
)
parser
.
add_option
(
"--quartus-proj"
,
action
=
"store_true"
,
dest
=
"quartus_proj"
,
default
=
None
,
help
=
"create/update a quartus project including list of project"
"files"
)
parser
.
add_option
(
"-l"
,
"--synthesize-locally"
,
dest
=
"local"
,
default
=
None
,
action
=
"store_true"
,
help
=
"perform a local synthesis"
)
...
...
@@ -127,6 +131,7 @@ def main():
"fetch"
:
"fetch"
,
"make_sim"
:
"generate_modelsim_makefile"
,
"ise_proj"
:
"generate_ise_project"
,
"quartus_proj"
:
"generate_quartus_project"
,
"local"
:
"run_local_synthesis"
,
"remote"
:
"run_remote_synthesis"
,
"make_fetch"
:
"generate_fetch_makefile"
,
...
...
@@ -144,7 +149,6 @@ def main():
if
is_set
:
sth_chosen
=
True
getattr
(
kernel
,
function
)()
sth_chosen
=
True
except
Exception
,
unknown_error
:
p
.
echo
(
"Oooops! We've got an error. Here is the appropriate info:
\n
"
)
p
.
print_version
()
...
...
src/flow.py
View file @
f7ca1122
...
...
@@ -297,7 +297,7 @@ class ModelsiminiReader(object):
reading_libraries
=
False
for
line
in
ini
:
line
=
line
.
split
(
""
)[
0
]
line
=
line
.
split
(
"
"
)[
0
]
line
=
line
.
strip
()
if
line
==
""
:
continue
if
line
.
lower
()
==
"[library]"
:
...
...
src/flow_altera.py
View file @
f7ca1122
...
...
@@ -87,7 +87,7 @@ class QuartusProject:
return
pre
+
'
\n
'
+
post
+
'
\n
'
def
__emit_files
(
self
):
from
srcfile
import
VHDLFile
,
VerilogFile
,
SignalTapFile
,
SDCFile
,
DPFFile
from
srcfile
import
VHDLFile
,
VerilogFile
,
SignalTapFile
,
SDCFile
,
QIPFile
,
DPFFile
tmp
=
"set_global_assignment -name {0} {1}"
ret
=
[]
for
f
in
self
.
files
:
...
...
@@ -99,6 +99,8 @@ class QuartusProject:
line
=
tmp
.
format
(
"SIGNALTAP_FILE"
,
f
.
rel_path
())
elif
isinstance
(
f
,
SDCFile
):
line
=
tmp
.
format
(
"SDC_FILE"
,
f
.
rel_path
())
elif
isinstance
(
f
,
QIPFile
):
line
=
tmp
.
format
(
"QIP_FILE"
,
f
.
rel_path
())
elif
isinstance
(
f
,
DPFFile
):
line
=
tmp
.
format
(
"MISC_FILE"
,
f
.
rel_path
())
else
:
...
...
src/global_mod.py
View file @
f7ca1122
...
...
@@ -22,10 +22,7 @@
options
=
None
top_module
=
None
global_target
=
"''"
<<<<<<<
HEAD
#######
#this var is modified by the build makefile - DON'T TOUCH IT!
BUILD_ID
=
"2013Feb22:341efe"
=======
>>>>>>>
Makefile
:
add
release
generation
######
src/makefile_writer.py
View file @
f7ca1122
...
...
@@ -341,16 +341,14 @@ clean:
lib
=
vhdl
.
library
purename
=
vhdl
.
purename
#each .dat depends on corresponding .vhd file
self
.
write
(
os
.
path
.
join
(
lib
,
purename
,
"."
+
purename
+
"_"
+
vhdl
.
extension
())
+
": "
+
vhdl
.
rel_path
()
+
'
\n
'
)
self
.
write
(
os
.
path
.
join
(
lib
,
purename
,
"."
+
purename
+
"_"
+
vhdl
.
extension
())
+
": "
+
vhdl
.
rel_path
())
for
dep_file
in
vhdl
.
dep_depends_on
:
name
=
dep_file
.
purename
self
.
write
(
"
\\\n
"
+
os
.
path
.
join
(
dep_file
.
library
,
name
,
"."
+
name
+
"_vhd"
))
self
.
writeln
()
self
.
writeln
(
' '
.
join
([
"
\t\t
vcom $(VCOM_FLAGS)"
,
vhdl
.
vcom_opt
,
"-work"
,
lib
,
"$< "
]))
self
.
writeln
(
"
\t\t
@mkdir -p $(dir $@) && touch $@
\n
"
)
self
.
writeln
()
if
len
(
vhdl
.
dep_depends_on
)
!=
0
:
self
.
write
(
os
.
path
.
join
(
lib
,
purename
,
"."
+
purename
)
+
":"
)
for
dep_file
in
vhdl
.
dep_depends_on
:
name
=
dep_file
.
purename
self
.
write
(
"
\\\n
"
+
os
.
path
.
join
(
dep_file
.
library
,
name
,
"."
+
name
))
self
.
write
(
'
\n\n
'
)
def
__get_rid_of_incdirs
(
self
,
vlog_opt
):
vlog_opt
=
self
.
__emit_string
(
vlog_opt
)
...
...
src/srcfile.py
View file @
f7ca1122
...
...
@@ -102,7 +102,7 @@ class SourceFile(IDependable, File):
class
VHDLFile
(
SourceFile
):
def
__init__
(
self
,
path
,
library
=
None
,
vcom_opt
=
None
):
SourceFile
.
__init__
(
self
,
path
,
library
)
##
self.__create_deps()
self
.
__create_deps
()
if
not
vcom_opt
:
self
.
vcom_opt
=
""
else
:
...
...
@@ -142,7 +142,7 @@ class VHDLFile(SourceFile):
if
global_mod
.
top_module
.
target
==
"xilinx"
:
std_libs
=
flow
.
ISE_STANDARD_LIBS
elif
global_mod
.
top_module
.
target
==
"altera"
:
std_libs
=
flow
.
MODELSIM
_STANDARD_LIBS
std_libs
=
flow
.
QUARTUS
_STANDARD_LIBS
import
re
try
:
...
...
@@ -277,6 +277,10 @@ class SDCFile(File):
def
__init__
(
self
,
path
):
File
.
__init__
(
self
,
path
)
class
QIPFile
(
File
):
def
__init__
(
self
,
path
):
File
.
__init__
(
self
,
path
)
class
DPFFile
(
File
):
def
__init__
(
self
,
path
):
File
.
__init__
(
self
,
path
)
...
...
@@ -351,7 +355,7 @@ class SourceFileFactory:
nf
=
None
if
extension
==
'vhd'
or
extension
==
'vhdl'
or
extension
==
'vho'
:
nf
=
VHDLFile
(
path
,
library
,
vcom_opt
)
elif
extension
==
'v'
or
extension
==
'vh'
or
extension
==
'vo'
:
elif
extension
==
'v'
or
extension
==
'vh'
or
extension
==
'vo'
or
extension
==
'vm'
:
nf
=
VerilogFile
(
path
,
library
,
vlog_opt
,
include_dirs
)
elif
extension
==
'sv'
or
extension
==
'svh'
:
nf
=
SVFile
(
path
,
library
,
vlog_opt
,
include_dirs
)
...
...
@@ -371,6 +375,8 @@ class SourceFileFactory:
nf
=
SignalTapFile
(
path
)
elif
extension
==
'sdc'
:
nf
=
SDCFile
(
path
)
elif
extension
==
'qip'
:
nf
=
QIPFile
(
path
)
elif
extension
==
'dpf'
:
nf
=
DPFFile
(
path
)
return
nf
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