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
ceac87ea
Commit
ceac87ea
authored
Feb 14, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing hierarchical support for GHDL
parent
28035599
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
content.py
hdlmake/module/content.py
+1
-1
ghdl.py
hdlmake/tools/ghdl.py
+1
-4
make_sim.py
hdlmake/tools/make_sim.py
+15
-13
No files found.
hdlmake/module/content.py
View file @
ceac87ea
...
...
@@ -34,7 +34,7 @@ class ModuleContent(ModuleCore):
"""Process the files instantiated by the HDLMake module"""
from
hdlmake.srcfile
import
SourceFileSet
# HDL files provided by the module
if
self
.
manifest_dict
[
"files"
]
==
[]
:
if
"files"
not
in
self
.
manifest_dict
:
self
.
files
=
SourceFileSet
()
try
:
logging
.
debug
(
"No files in the manifest at
%
s"
,
...
...
hdlmake/tools/ghdl.py
View file @
ceac87ea
...
...
@@ -61,10 +61,7 @@ class ToolGHDL(ToolSim):
def
makefile_sim_options
(
self
):
"""Print the GHDL options to the Makefile"""
if
self
.
top_module
.
manifest_dict
[
"ghdl_opt"
]:
ghdl_opt
=
self
.
top_module
.
manifest_dict
[
"ghdl_opt"
]
else
:
ghdl_opt
=
''
ghdl_opt
=
self
.
manifest_dict
.
get
(
"ghdl_opt"
,
''
)
ghdl_string
=
string
.
Template
(
"""GHDL_OPT := ${ghdl_opt}
\n
"""
)
self
.
writeln
(
ghdl_string
.
substitute
(
...
...
hdlmake/tools/make_sim.py
View file @
ceac87ea
...
...
@@ -32,16 +32,24 @@ class ToolSim(ToolMakefile):
def
simulation_makefile
(
self
,
pool
):
"""Execute the simulation action"""
_check_simulation_manifest
(
pool
.
top_module
.
manifest_dict
)
pool
.
check_all_fetched_or_quit
()
top_module
=
pool
.
get_top_module
()
manifest_project_dict
=
{}
for
mod
in
pool
:
manifest_project_dict
.
update
(
mod
.
manifest_dict
)
if
'fetchto'
in
mod
.
manifest_dict
:
self
.
repo_list
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
mod
.
path
,
mod
.
manifest_dict
[
'fetchto'
])))
_check_simulation_manifest
(
manifest_project_dict
)
fset
=
pool
.
build_file_set
(
top_module
.
manifest_dict
[
"sim_top"
]
,
manifest_project_dict
.
get
(
"sim_top"
)
,
standard_libs
=
self
.
_standard_libs
)
# Filter the not parseable files!
dep_files
=
fset
.
filter
(
DepFile
)
# dep_solver.solve(dep_files)
self
.
makefile_setup
(
top_module
,
dep_files
)
self
.
makefile_setup
(
manifest_project_dict
,
dep_files
)
self
.
makefile_check_tool
(
'sim_path'
)
self
.
makefile_sim_top
()
self
.
makefile_sim_options
()
...
...
@@ -59,7 +67,7 @@ TOP_MODULE := ${top_module}
PWD := $$(shell pwd)
"""
)
self
.
writeln
(
top_parameter
.
substitute
(
top_module
=
self
.
top_module
.
manifest_dict
[
"sim_top"
]))
top_module
=
self
.
manifest_dict
[
"sim_top"
]))
def
makefile_sim_options
(
self
):
"""End stub method to write the simulation Makefile options section"""
...
...
@@ -154,14 +162,8 @@ PWD := $$(shell pwd)
def
makefile_sim_command
(
self
):
"""Generic method to write the simulation Makefile user commands"""
if
self
.
top_module
.
manifest_dict
[
"sim_pre_cmd"
]:
sim_pre_cmd
=
self
.
top_module
.
manifest_dict
[
"sim_pre_cmd"
]
else
:
sim_pre_cmd
=
''
if
self
.
top_module
.
manifest_dict
[
"sim_post_cmd"
]:
sim_post_cmd
=
self
.
top_module
.
manifest_dict
[
"sim_post_cmd"
]
else
:
sim_post_cmd
=
''
sim_pre_cmd
=
self
.
manifest_dict
.
get
(
"sim_pre_cmd"
,
''
)
sim_post_cmd
=
self
.
manifest_dict
.
get
(
"sim_post_cmd"
,
''
)
sim_command
=
string
.
Template
(
"""# USER SIM COMMANDS
sim_pre_cmd:
\t\t
${sim_pre_cmd}
...
...
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