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
1f6dad04
Commit
1f6dad04
authored
Oct 31, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dep_file: remove unused include dependency.
parent
6d968e95
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
dep_file.py
hdlmake/sourcefiles/dep_file.py
+2
-4
vhdl_parser.py
hdlmake/sourcefiles/vhdl_parser.py
+2
-1
vlog_parser.py
hdlmake/sourcefiles/vlog_parser.py
+0
-2
No files found.
hdlmake/sourcefiles/dep_file.py
View file @
1f6dad04
...
@@ -35,17 +35,16 @@ class DepRelation(object):
...
@@ -35,17 +35,16 @@ class DepRelation(object):
"""Class used to create instances representing HDL dependency relations"""
"""Class used to create instances representing HDL dependency relations"""
# rel_type
# rel_type
# Architecture is never required.
ENTITY
=
1
ENTITY
=
1
PACKAGE
=
2
PACKAGE
=
2
INCLUDE
=
3
ARCHITECTURE
=
3
ARCHITECTURE
=
4
MODULE
=
ENTITY
MODULE
=
ENTITY
def
__init__
(
self
,
obj_name
,
lib_name
,
rel_type
):
def
__init__
(
self
,
obj_name
,
lib_name
,
rel_type
):
assert
rel_type
in
[
assert
rel_type
in
[
DepRelation
.
ENTITY
,
DepRelation
.
ENTITY
,
DepRelation
.
PACKAGE
,
DepRelation
.
PACKAGE
,
DepRelation
.
INCLUDE
,
DepRelation
.
ARCHITECTURE
,
DepRelation
.
ARCHITECTURE
,
DepRelation
.
MODULE
]
DepRelation
.
MODULE
]
self
.
rel_type
=
rel_type
self
.
rel_type
=
rel_type
...
@@ -62,7 +61,6 @@ class DepRelation(object):
...
@@ -62,7 +61,6 @@ class DepRelation(object):
ostr
=
{
ostr
=
{
self
.
ENTITY
:
"entity"
,
self
.
ENTITY
:
"entity"
,
self
.
PACKAGE
:
"package"
,
self
.
PACKAGE
:
"package"
,
self
.
INCLUDE
:
"include/header"
,
self
.
ARCHITECTURE
:
"architecture"
,
self
.
ARCHITECTURE
:
"architecture"
,
self
.
MODULE
:
"module"
}
self
.
MODULE
:
"module"
}
return
"
%
s '
%
s.
%
s'"
%
(
ostr
[
self
.
rel_type
],
return
"
%
s '
%
s.
%
s'"
%
(
ostr
[
self
.
rel_type
],
...
...
hdlmake/sourcefiles/vhdl_parser.py
View file @
1f6dad04
...
@@ -76,6 +76,7 @@ class VHDLParser(DepParser):
...
@@ -76,6 +76,7 @@ class VHDLParser(DepParser):
DepRelation
(
pkg_name
,
lib_name
,
DepRelation
.
PACKAGE
))
DepRelation
(
pkg_name
,
lib_name
,
DepRelation
.
PACKAGE
))
return
"<hdlmake use_pattern
%
s.
%
s>"
%
(
lib_name
,
pkg_name
)
return
"<hdlmake use_pattern
%
s.
%
s>"
%
(
lib_name
,
pkg_name
)
buf
=
re
.
sub
(
use_pattern
,
do_use
,
buf
)
buf
=
re
.
sub
(
use_pattern
,
do_use
,
buf
)
# new entity
# new entity
entity_pattern
=
re
.
compile
(
entity_pattern
=
re
.
compile
(
r"^\s*entity\s+(?P<name>\w+)\s+is\s+(?:port|generic|end)"
r"^\s*entity\s+(?P<name>\w+)\s+is\s+(?:port|generic|end)"
...
@@ -214,7 +215,7 @@ class VHDLParser(DepParser):
...
@@ -214,7 +215,7 @@ class VHDLParser(DepParser):
buf
=
re
.
sub
(
function_pattern
,
do_function
,
buf
)
buf
=
re
.
sub
(
function_pattern
,
do_function
,
buf
)
# instantions
# instanti
ati
ons
libraries
=
set
([
dep_file
.
library
])
libraries
=
set
([
dep_file
.
library
])
instance_pattern
=
re
.
compile
(
instance_pattern
=
re
.
compile
(
r"^\s*(?P<LABEL>\w+)\s*:"
r"^\s*(?P<LABEL>\w+)\s*:"
...
...
hdlmake/sourcefiles/vlog_parser.py
View file @
1f6dad04
...
@@ -588,6 +588,4 @@ class VerilogParser(DepParser):
...
@@ -588,6 +588,4 @@ class VerilogParser(DepParser):
if
match
:
if
match
:
do_inst
(
match
)
do_inst
(
match
)
m_inside_module
.
subn
(
do_module
,
buf
)
m_inside_module
.
subn
(
do_module
,
buf
)
dep_file
.
add_provide
(
DepRelation
(
dep_file
.
path
,
None
,
DepRelation
.
INCLUDE
))
dep_file
.
is_parsed
=
True
dep_file
.
is_parsed
=
True
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