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
1582a4e4
Commit
1582a4e4
authored
Aug 09, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GHDL tool relies on Make to create an ordered file list
parent
8dd1337f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
8 deletions
+30
-8
ghdl.py
hdlmake/tools/ghdl.py
+30
-8
No files found.
hdlmake/tools/ghdl.py
View file @
1582a4e4
...
...
@@ -23,15 +23,17 @@
"""Module providing support for GHDL simulator"""
import
os
import
string
from
.make_sim
import
ToolSim
from
hdlmake.util
import
path
as
path_mod
from
hdlmake.srcfile
import
VHDLFile
class
ToolGHDL
(
ToolSim
):
"""Class providing the interface for
Lattice Diamond synthesis
"""
"""Class providing the interface for
GHDL simulator
"""
TOOL_INFO
=
{
'name'
:
'GHDL'
,
...
...
@@ -66,11 +68,31 @@ class ToolGHDL(ToolSim):
def
makefile_sim_compilation
(
self
):
"""Print the GDHL simulation compilation target"""
fileset
=
self
.
fileset
self
.
writeln
(
"simulation:"
)
self
.
writeln
(
"
\t\t
# Analyze sources"
)
for
vhdl
in
fileset
.
filter
(
VHDLFile
):
self
.
writeln
(
"
\t\t
ghdl -a "
+
vhdl
.
rel_path
())
self
.
writeln
()
self
.
writeln
(
"
\t\t
# Elaborate design"
)
self
.
writeln
(
"simulation: $(VERILOG_OBJ) $(VHDL_OBJ)"
)
self
.
writeln
(
"
\t\t
ghdl -e $(TOP_MODULE)"
)
self
.
writeln
()
self
.
writeln
(
'
\n
'
)
for
file_aux
in
fileset
:
if
any
(
isinstance
(
file_aux
,
file_type
)
for
file_type
in
self
.
_hdl_files
):
self
.
write
(
"
%
s:
%
s"
%
(
os
.
path
.
join
(
file_aux
.
library
,
file_aux
.
purename
,
".
%
s_
%
s"
%
(
file_aux
.
purename
,
file_aux
.
extension
())),
file_aux
.
rel_path
()))
# list dependencies, do not include the target file
for
dep_file
in
[
dfile
for
dfile
in
file_aux
.
depends_on
if
dfile
is
not
file_aux
]:
if
dep_file
in
fileset
:
name
=
dep_file
.
purename
extension
=
dep_file
.
extension
()
self
.
write
(
"
\\\n
"
+
os
.
path
.
join
(
dep_file
.
library
,
name
,
".
%
s_
%
s"
%
(
name
,
extension
)))
else
:
# the file is included -> we depend directly on it
self
.
write
(
"
\\\n
"
+
dep_file
.
rel_path
())
self
.
writeln
()
self
.
writeln
(
"
\t\t
ghdl -a $<"
)
self
.
write
(
"
\t\t
@"
+
path_mod
.
mkdir_command
()
+
" $(dir $@)"
)
self
.
writeln
(
" && touch $@
\n
"
)
self
.
writeln
()
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