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
a76999c2
Commit
a76999c2
authored
Jul 31, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simulation tools are now a set of classes inherited by simulation action
parent
092e2524
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
54 additions
and
18 deletions
+54
-18
simulation.py
hdlmake/action/simulation.py
+20
-3
makefile_writer.py
hdlmake/makefile_writer.py
+1
-0
__init__.py
hdlmake/tools/__init__.py
+7
-0
active_hdl.py
hdlmake/tools/active_hdl.py
+4
-1
__init__.py
hdlmake/tools/aldec/__init__.py
+0
-0
__init__.py
hdlmake/tools/common/__init__.py
+0
-1
ghdl.py
hdlmake/tools/ghdl.py
+4
-1
__init__.py
hdlmake/tools/ghdl/__init__.py
+0
-0
isim.py
hdlmake/tools/isim.py
+7
-3
__init__.py
hdlmake/tools/isim/__init__.py
+0
-0
iverilog.py
hdlmake/tools/iverilog.py
+3
-1
__init__.py
hdlmake/tools/iverilog/__init__.py
+0
-0
modelsim.py
hdlmake/tools/modelsim.py
+4
-4
__init__.py
hdlmake/tools/modelsim/__init__.py
+0
-0
riviera.py
hdlmake/tools/riviera.py
+3
-3
__init__.py
hdlmake/tools/riviera/__init__.py
+0
-0
sim_makefile_support.py
hdlmake/tools/sim_makefile_support.py
+1
-1
No files found.
hdlmake/action/simulation.py
View file @
a76999c2
...
...
@@ -31,8 +31,13 @@ from hdlmake.dep_file import DepFile
#import hdlmake.new_dep_solver as dep_solver
from
.action
import
Action
from
hdlmake.tools
import
(
ToolIVerilog
,
ToolISim
,
ToolModelsim
,
ToolActiveHDL
,
ToolRiviera
,
ToolGHDL
)
class
GenerateSimulationMakefile
(
Action
):
class
GenerateSimulationMakefile
(
Action
,
ToolIVerilog
,
ToolISim
,
ToolModelsim
,
ToolActiveHDL
,
ToolRiviera
,
ToolGHDL
):
"""This class contains the simulation specific methods"""
def
_check_simulation_makefile
(
self
):
...
...
@@ -50,8 +55,20 @@ class GenerateSimulationMakefile(Action):
self
.
_check_all_fetched_or_quit
()
self
.
_check_simulation_makefile
()
tool_name
=
self
.
get_top_module
()
.
manifest_dict
[
"sim_tool"
]
tool_module
=
importlib
.
import_module
(
"hdlmake.tools.
%
s.
%
s"
%
(
tool_name
,
tool_name
))
tool_object
=
tool_module
.
ToolControls
()
if
tool_name
is
"iverilog"
:
tool_object
=
ToolIVerilog
()
elif
tool_name
is
"isim"
:
tool_object
=
ToolISim
()
elif
tool_name
is
"modelsim"
:
tool_object
=
ToolModelsim
()
elif
tool_name
is
"active-hdl"
:
tool_object
=
ToolActiveHDL
()
elif
tool_name
is
"riviera"
:
tool_object
=
ToolRiviera
()
elif
tool_name
is
"ghdl"
:
tool_object
=
ToolGHDL
()
tool_info
=
tool_object
.
get_keys
()
if
sys
.
platform
==
'cygwin'
:
bin_name
=
tool_info
[
'windows_bin'
]
...
...
hdlmake/makefile_writer.py
View file @
a76999c2
...
...
@@ -41,6 +41,7 @@ class MakefileWriter(object):
self
.
_filename
=
filename
else
:
self
.
_filename
=
"Makefile"
super
(
MakefileWriter
,
self
)
.
__init__
()
def
__del__
(
self
):
if
self
.
_file
:
...
...
hdlmake/tools/__init__.py
View file @
a76999c2
from
.iverilog
import
ToolIVerilog
from
.isim
import
ToolISim
from
.modelsim
import
ToolModelsim
from
.active_hdl
import
ToolActiveHDL
from
.riviera
import
ToolRiviera
from
.ghdl
import
ToolGHDL
from
.sim_makefile_support
import
VsimMakefileWriter
hdlmake/tools/a
ldec/aldec
.py
→
hdlmake/tools/a
ctive_hdl
.py
View file @
a76999c2
...
...
@@ -26,7 +26,10 @@ import string
from
hdlmake.makefile_writer
import
MakefileWriter
class
ToolControls
(
MakefileWriter
):
class
ToolActiveHDL
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolActiveHDL
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
pass
...
...
hdlmake/tools/aldec/__init__.py
deleted
100644 → 0
View file @
092e2524
hdlmake/tools/common/__init__.py
deleted
100644 → 0
View file @
092e2524
"""Common functionality shared by multiple tools."""
hdlmake/tools/ghdl
/ghdl
.py
→
hdlmake/tools/ghdl.py
View file @
a76999c2
...
...
@@ -25,7 +25,10 @@ import string
from
hdlmake.makefile_writer
import
MakefileWriter
class
ToolControls
(
MakefileWriter
):
class
ToolGHDL
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolGHDL
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
pass
...
...
hdlmake/tools/ghdl/__init__.py
deleted
100644 → 0
View file @
092e2524
hdlmake/tools/isim
/isim
.py
→
hdlmake/tools/isim.py
View file @
a76999c2
...
...
@@ -40,7 +40,10 @@ ISIM_STANDARD_LIBS = ['std', 'ieee', 'ieee_proposed', 'vl', 'synopsys',
'simprims_ver'
,
'unisims_ver'
,
'uni9000_ver'
,
'unimacro_ver'
,
'xilinxcorelib_ver'
,
'secureip'
]
class
ToolControls
(
MakefileWriter
):
class
ToolISim
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolISim
,
self
)
.
__init__
()
def
get_keys
(
self
):
tool_info
=
{
...
...
@@ -196,8 +199,9 @@ isim.wdb isim_proj isim_proj.*
#incdir = "-i "
#incdir += " -i ".join(vl.include_dirs)
#incdir += " "
self
.
write
(
' -i '
)
self
.
write
(
' '
.
join
(
vl
.
include_dirs
)
+
' '
)
if
vl
.
include_dirs
:
self
.
write
(
' -i '
)
self
.
write
(
' '
.
join
(
vl
.
include_dirs
)
+
' '
)
self
.
writeln
(
vl
.
vlog_opt
+
" $<"
)
self
.
write
(
"
\t\t
@mkdir -p $(dir $@)"
)
self
.
writeln
(
" && touch $@
\n\n
"
)
...
...
hdlmake/tools/isim/__init__.py
deleted
100644 → 0
View file @
092e2524
hdlmake/tools/iverilog
/iverilog
.py
→
hdlmake/tools/iverilog.py
View file @
a76999c2
...
...
@@ -36,8 +36,10 @@ IVERILOG_STANDARD_LIBS = ['std', 'ieee', 'ieee_proposed', 'vl', 'synopsys',
'simprims_ver'
,
'unisims_ver'
,
'uni9000_ver'
,
'unimacro_ver'
,
'xilinxcorelib_ver'
,
'secureip'
]
class
Tool
Controls
(
MakefileWriter
):
class
Tool
IVerilog
(
MakefileWriter
):
def
__init__
(
self
):
super
(
ToolIVerilog
,
self
)
.
__init__
()
def
get_keys
(
self
):
tool_info
=
{
...
...
hdlmake/tools/iverilog/__init__.py
deleted
100644 → 0
View file @
092e2524
hdlmake/tools/modelsim
/modelsim
.py
→
hdlmake/tools/modelsim.py
View file @
a76999c2
...
...
@@ -25,16 +25,16 @@ from __future__ import print_function
import
xml.dom.minidom
import
os
from
.
.common.
sim_makefile_support
import
VsimMakefileWriter
from
.sim_makefile_support
import
VsimMakefileWriter
XmlImpl
=
xml
.
dom
.
minidom
.
getDOMImplementation
()
MODELSIM_STANDARD_LIBS
=
[
'ieee'
,
'std'
,
'altera_mf'
]
class
Tool
Controls
(
VsimMakefileWriter
):
class
Tool
Modelsim
(
VsimMakefileWriter
):
def
__init__
(
self
):
super
(
Tool
Controls
,
self
)
.
__init__
()
super
(
Tool
Modelsim
,
self
)
.
__init__
()
def
detect_version
(
self
,
path
):
pass
...
...
@@ -69,5 +69,5 @@ class ToolControls(VsimMakefileWriter):
self
.
additional_clean
.
extend
([
"./modelsim.ini"
,
"transcript"
,
"*.vcd"
,
"*.wlf"
])
self
.
copy_rules
[
"modelsim.ini"
]
=
os
.
path
.
join
(
"$(MODELSIM_INI_PATH)"
,
"modelsim.ini"
)
super
(
Tool
Controls
,
self
)
.
generate_simulation_makefile
(
fileset
,
top_module
)
super
(
Tool
Modelsim
,
self
)
.
generate_simulation_makefile
(
fileset
,
top_module
)
hdlmake/tools/modelsim/__init__.py
deleted
100644 → 0
View file @
092e2524
hdlmake/tools/riviera
/riviera
.py
→
hdlmake/tools/riviera.py
View file @
a76999c2
...
...
@@ -23,7 +23,7 @@
#
from
__future__
import
print_function
from
.
.common.
sim_makefile_support
import
VsimMakefileWriter
from
.sim_makefile_support
import
VsimMakefileWriter
# as of 2014.06, these are the standard libraries
# included in an installation
...
...
@@ -60,9 +60,9 @@ RIVIERA_STANDARD_LIBS.extend(RIVIERA_XILINX_VHDL_LIBRARIES)
RIVIERA_STANDARD_LIBS
.
extend
(
RIVIERA_XILINX_VLOG_LIBRARIES
)
class
Tool
Controls
(
VsimMakefileWriter
):
class
Tool
Riviera
(
VsimMakefileWriter
):
def
__init__
(
self
):
super
(
Tool
Controls
,
self
)
.
__init__
()
super
(
Tool
Riviera
,
self
)
.
__init__
()
self
.
vcom_flags
.
append
(
"-2008"
)
self
.
additional_clean
.
extend
([
"*.asdb"
,
"*.vcd"
,
])
...
...
hdlmake/tools/riviera/__init__.py
deleted
100644 → 0
View file @
092e2524
hdlmake/tools/
common/
sim_makefile_support.py
→
hdlmake/tools/sim_makefile_support.py
View file @
a76999c2
...
...
@@ -94,7 +94,7 @@ PWD := $(shell pwd)
self
.
writeln
(
"VSIM_FLAGS :=
%
s"
%
(
' '
.
join
(
self
.
vsim_flags
)))
self
.
writeln
(
"VLOG_FLAGS :=
%
s"
%
(
' '
.
join
(
self
.
vlog_flags
)))
self
.
writeln
(
"VMAP_FLAGS :=
%
s"
%
(
' '
.
join
(
self
.
vmap_flags
)))
self
.
writeln
(
"INCLUDE_DIRS := +incdir+
%
s"
%
(
'+'
.
join
(
top_module
.
include_dirs
)))
#
self.writeln("INCLUDE_DIRS := +incdir+%s" % ('+'.join(top_module.include_dirs)))
self
.
write
(
"VERILOG_SRC := "
)
for
vl
in
fileset
.
filter
(
VerilogFile
):
...
...
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