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
acbb3699
Commit
acbb3699
authored
Oct 23, 2023
by
Benny Simonsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include library in TOP_MODULE
parent
645fa346
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
4 deletions
+25
-4
isim.py
hdlmake/tools/isim.py
+10
-2
makefilesim.py
hdlmake/tools/makefilesim.py
+7
-1
makefilesyn.py
hdlmake/tools/makefilesyn.py
+8
-1
No files found.
hdlmake/tools/isim.py
View file @
acbb3699
...
...
@@ -61,6 +61,7 @@ class ToolISim(MakefileSim):
def
__init__
(
self
):
super
(
ToolISim
,
self
)
.
__init__
()
self
.
default_library
=
"work"
def
_makefile_sim_top
(
self
):
"""Print the top section of the Makefile for Xilinx ISim"""
...
...
@@ -83,7 +84,14 @@ class ToolISim(MakefileSim):
# Ensure the path is absolute and normalized
return
os
.
path
.
abspath
(
xilinx_ini_path
)
self
.
writeln
(
"## variables #############################"
)
self
.
writeln
(
"TOP_MODULE := {}"
.
format
(
self
.
manifest_dict
.
get
(
"sim_top"
,
''
)))
top_module
=
self
.
manifest_dict
.
get
(
"sim_top"
,
None
)
if
top_module
:
library
=
self
.
manifest_dict
.
get
(
"library"
,
self
.
default_library
)
if
top_module
.
startswith
(
'.'
):
top_module
=
library
+
top_module
elif
'.'
not
in
top_module
:
top_module
=
library
+
'.'
+
top_module
self
.
writeln
(
"TOP_MODULE := {}"
.
format
(
top_module
))
self
.
writeln
(
"FUSE_OUTPUT ?= isim_proj"
)
self
.
writeln
()
self
.
writeln
(
"XILINX_INI_PATH := {}"
.
format
(
__get_xilinxsim_ini_dir
()))
...
...
@@ -161,7 +169,7 @@ $(VHDL_OBJ): $(LIB_IND) xilinxsim.ini
self
.
writeln
(
"
\t\t
"
+
shell
.
copy_command
()
+
" $< ."
)
self
.
writeln
(
"""
\
fuse:
\t\t
fuse
work.
$(TOP_MODULE) -intstyle ise -incremental -o $(FUSE_OUTPUT)
\t\t
fuse $(TOP_MODULE) -intstyle ise -incremental -o $(FUSE_OUTPUT)
"""
)
self
.
_makefile_sim_libraries
(
libs
)
...
...
hdlmake/tools/makefilesim.py
View file @
acbb3699
...
...
@@ -24,6 +24,7 @@ class MakefileSim(ToolMakefile):
def
__init__
(
self
):
super
(
MakefileSim
,
self
)
.
__init__
()
self
.
default_library
=
"work"
def
write_makefile
(
self
,
top_manifest
,
fileset
,
filename
=
None
):
"""Execute the simulation action"""
...
...
@@ -43,7 +44,12 @@ class MakefileSim(ToolMakefile):
def
_makefile_sim_top
(
self
):
"""Generic method to write the simulation Makefile top section"""
self
.
writeln
(
"TOP_MODULE := {}"
.
format
(
self
.
manifest_dict
[
"sim_top"
]))
top_module
=
self
.
manifest_dict
.
get
(
"sim_top"
)
if
top_module
:
if
self
.
manifest_dict
.
get
(
"library"
,
''
)
not
in
[
""
,
self
.
default_library
]:
if
top_module
.
startswith
(
'.'
):
top_module
=
self
.
manifest_dict
[
"library"
]
+
top_module
self
.
writeln
(
"TOP_MODULE := {}"
.
format
(
top_module
))
self
.
writeln
()
def
_makefile_sim_options
(
self
):
...
...
hdlmake/tools/makefilesyn.py
View file @
acbb3699
...
...
@@ -79,6 +79,13 @@ SYN_DEVICE := {syn_device}
SYN_PACKAGE := {syn_package}
SYN_GRADE := {syn_grade}
"""
top_module
=
self
.
manifest_dict
.
get
(
"syn_top"
,
None
)
if
top_module
:
if
self
.
manifest_dict
.
get
(
"library"
,
''
)
not
in
[
""
,
self
.
default_library
]:
if
top_module
.
startswith
(
'.'
):
top_module
=
self
.
manifest_dict
[
"library"
]
+
top_module
self
.
writeln
(
top_parameter
.
format
(
tcl_interpreter
=
self
.
get_tool_bin
(),
project_name
=
os
.
path
.
splitext
(
...
...
@@ -89,7 +96,7 @@ SYN_GRADE := {syn_grade}
syn_package
=
self
.
manifest_dict
[
"syn_package"
],
syn_grade
=
self
.
manifest_dict
[
"syn_grade"
],
tool_path
=
self
.
manifest_dict
[
"syn_path"
],
top_module
=
self
.
manifest_dict
[
"syn_top"
]
))
top_module
=
top_module
))
def
_makefile_syn_prj_tcl_cmd
(
self
):
"""Create the Makefile variables for the TCL project commands."""
...
...
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