Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vdt-plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
vdt-plugin
Commits
d512e941
Commit
d512e941
authored
Aug 08, 2015
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add message filter and separate parser settings to Quartus tools
parent
c682d5fe
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
5 deletions
+118
-5
parser_quartus.py
parsers/parser_quartus.py
+21
-3
quartus_asm.xml
tools/Altera_Quartus/quartus_asm.xml
+27
-0
quartus_interface.xml
tools/Altera_Quartus/quartus_interface.xml
+1
-0
quartus_place.xml
tools/Altera_Quartus/quartus_place.xml
+21
-0
quartus_proto.xml
tools/Altera_Quartus/quartus_proto.xml
+8
-2
quartus_synthesis.xml
tools/Altera_Quartus/quartus_synthesis.xml
+20
-0
quartus_timing_analyzer.xml
tools/Altera_Quartus/quartus_timing_analyzer.xml
+20
-0
No files found.
parsers/parser_quartus.py
View file @
d512e941
...
@@ -32,10 +32,12 @@ g_topModule = ""
...
@@ -32,10 +32,12 @@ g_topModule = ""
g_toolName
=
""
g_toolName
=
""
g_mode
=
""
g_mode
=
""
g_includeMsgId
=
True
g_includeMsgId
=
True
g_excludeIdList
=
[]
g_disableExcludeList
=
False
# Lines starting with these markers are of lines of interest
# Lines starting with these markers are of lines of interest
g_msgTypeMarkers
=
(
"Info"
,
"Warning"
,
"Error"
,
"Critical Warning"
,
"Extra Info"
)
g_msgTypeMarkers
=
(
"Info"
,
"Warning"
,
"Error"
,
"Critical Warning"
,
"Extra Info"
)
# Command line paramerters, these names should be in sync with those that are passed to the script in XML files (quartus_proto.xml probably)
# Command line paramerters, these names should be in sync with those that are passed to the script in XML files (quartus_proto.xml probably)
g_optNames
=
[
"top_module"
,
"tool_name"
,
"parser_mode"
,
"include_msg_id"
]
g_optNames
=
[
"top_module"
,
"tool_name"
,
"parser_mode"
,
"include_msg_id"
,
"exclude_id_list"
,
"disable_exclude_list"
]
# Search patterns
# Search patterns
patternMsgType
=
re
.
compile
(
".*?:"
)
patternMsgType
=
re
.
compile
(
".*?:"
)
...
@@ -67,6 +69,8 @@ def getParameters():
...
@@ -67,6 +69,8 @@ def getParameters():
global
g_toolName
global
g_toolName
global
g_mode
global
g_mode
global
g_includeMsgId
global
g_includeMsgId
global
g_excludeIdList
global
g_disableExcludeList
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
for
opt
in
g_optNames
:
for
opt
in
g_optNames
:
...
@@ -83,6 +87,13 @@ def getParameters():
...
@@ -83,6 +87,13 @@ def getParameters():
g_includeMsgId
=
True
g_includeMsgId
=
True
else
:
else
:
g_includeMsgId
=
False
g_includeMsgId
=
False
if
args
.
exclude_id_list
:
g_excludeIdList
=
[
int
(
elem
)
for
elem
in
args
.
exclude_id_list
.
split
(
'-'
)]
if
args
.
disable_exclude_list
:
if
args
.
disable_exclude_list
==
"true"
:
g_disableExcludeList
=
True
else
:
g_disableExcludeList
=
False
def
isProblem
(
line
):
def
isProblem
(
line
):
"""Check if the line contains meaningful information"""
"""Check if the line contains meaningful information"""
...
@@ -158,8 +169,10 @@ def getMsgText(line, msg):
...
@@ -158,8 +169,10 @@ def getMsgText(line, msg):
def
filterMessage
(
msg
):
def
filterMessage
(
msg
):
"""Decide whether this message should be redirected to output or filtered out"""
"""Decide whether this message should be redirected to output or filtered out"""
#just a stub
retVal
=
True
return
True
if
msg
.
msgId
in
g_excludeIdList
and
not
g_disableExcludeList
:
retVal
=
False
return
retVal
def
assembleLine
(
msg
):
def
assembleLine
(
msg
):
"""Assemble and return output line"""
"""Assemble and return output line"""
...
@@ -180,6 +193,7 @@ def assembleLine(msg):
...
@@ -180,6 +193,7 @@ def assembleLine(msg):
return
line
return
line
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
isFiltered
=
False
getParameters
()
getParameters
()
for
line
in
iter
(
sys
.
stdin
.
readline
,
''
):
for
line
in
iter
(
sys
.
stdin
.
readline
,
''
):
if
isProblem
(
line
):
if
isProblem
(
line
):
...
@@ -191,3 +205,7 @@ if __name__ == "__main__":
...
@@ -191,3 +205,7 @@ if __name__ == "__main__":
if
filterMessage
(
msg
):
if
filterMessage
(
msg
):
logLine
=
assembleLine
(
msg
)
logLine
=
assembleLine
(
msg
)
sys
.
stdout
.
write
(
logLine
)
sys
.
stdout
.
write
(
logLine
)
else
:
isFiltered
=
True
if
isFiltered
:
sys
.
stdout
.
write
(
"Info: some messages were filtered by python parser in accordance with settings
\n
"
)
tools/Altera_Quartus/quartus_asm.xml
View file @
d512e941
...
@@ -61,6 +61,26 @@
...
@@ -61,6 +61,26 @@
<parameter
id=
"CreateHex"
label=
"Create .hexout"
tooltip=
"Create Hexadecimal (Intel format) Output File (.hexout)"
<parameter
id=
"CreateHex"
label=
"Create .hexout"
tooltip=
"Create Hexadecimal (Intel format) Output File (.hexout)"
type=
"Boolean"
default=
"false"
visible=
"true"
readonly=
"false"
format=
"None"
/>
type=
"Boolean"
default=
"false"
visible=
"true"
readonly=
"false"
format=
"None"
/>
<!-- parser parameters, these can differ from base tool and will be stored separately -->
<parameter
id=
"PatternErrors"
/>
<parameter
id=
"PatternWarnings"
/>
<parameter
id=
"PatternInfo"
/>
<parameter
id=
"InstanceCapture"
/>
<parameter
id=
"InstanceSeparator"
/>
<parameter
id=
"InstanceSuffix"
/>
<parameter
id=
"ShowWarnings"
/>
<parameter
id=
"ShowInfo"
/>
<parameter
id=
"PreGrepW"
/>
<parameter
id=
"PreGrepI"
/>
<parameter
id=
"GrepEWI"
/>
<parameter
id=
"MaxMsg"
/>
<parameter
id=
"parser_mode"
/>
<parameter
id=
"parsers_path"
/>
<parameter
id=
"parser_name"
/>
<parameter
id=
"include_msg_id"
/>
<parameter
id=
"exclude_id_list"
/>
<parameter
id=
"disable_exclude_list"
/>
<input>
<input>
<group
name=
"General"
>
<group
name=
"General"
>
"DisableTool"
"DisableTool"
...
@@ -149,6 +169,13 @@
...
@@ -149,6 +169,13 @@
"%QuartusLocalResultDir/;"
"%QuartusLocalResultDir/;"
</if>
</if>
</line>
</line>
<line
name=
"quartus_copy_reports"
>
"-c"
"mkdir -p %QuartusLocalResultDir ;"
"rsync -av -e ssh"
"%RemoteUser@%RemoteHost:%QuartusProjectRoot/*.rpt"
"%QuartusLocalResultDir/"
</line>
</output>
</output>
</tool>
</tool>
...
...
tools/Altera_Quartus/quartus_interface.xml
View file @
d512e941
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<syntax
name=
"GrepFilterProblemSyntax"
format=
'| grep --line-buffered -v "\[%%ParamName"'
/>
<syntax
name=
"GrepFilterProblemSyntax"
format=
'| grep --line-buffered -v "\[%%ParamName"'
/>
<syntax
name=
"GrepFilterProblemOtherSyntax"
format=
'%(| grep --line-buffered -v "\[%%ParamValue"%|\n%)'
/>
<syntax
name=
"GrepFilterProblemOtherSyntax"
format=
'%(| grep --line-buffered -v "\[%%ParamValue"%|\n%)'
/>
<syntax
name=
"CmdLineParameterSyntax"
format=
"--%%ParamName %%ParamValue"
/>
<syntax
name=
"CmdLineParameterSyntax"
format=
"--%%ParamName %%ParamValue"
/>
<syntax
name=
"MsgIdList"
format=
"--exclude_id_list %(%%ParamValue%|-%)"
/>
<typedef
name=
"ParserModeType"
>
<typedef
name=
"ParserModeType"
>
<paramtype
kind=
"enum"
base=
"String"
>
<paramtype
kind=
"enum"
base=
"String"
>
<item
value=
"0"
label=
"Tool output is parsed immediately"
/>
<item
value=
"0"
label=
"Tool output is parsed immediately"
/>
...
...
tools/Altera_Quartus/quartus_place.xml
View file @
d512e941
...
@@ -130,6 +130,27 @@ when attempting to optimize the design timing requirements, including fmax"
...
@@ -130,6 +130,27 @@ when attempting to optimize the design timing requirements, including fmax"
<parameter
id=
"tdc"
label=
"Timing-driven compilation"
tooltip=
"Option to use timing-driven compilation. This option optimizes place and route based on
<parameter
id=
"tdc"
label=
"Timing-driven compilation"
tooltip=
"Option to use timing-driven compilation. This option optimizes place and route based on
timing information"
timing information"
default=
"false"
visible=
"true"
readonly=
"false"
omit=
"false"
type=
"Bool_on_off"
format=
"DoubleDash"
/>
default=
"false"
visible=
"true"
readonly=
"false"
omit=
"false"
type=
"Bool_on_off"
format=
"DoubleDash"
/>
<!-- parser parameters, these can differ from base tool and will be stored separately -->
<parameter
id=
"PatternErrors"
/>
<parameter
id=
"PatternWarnings"
/>
<parameter
id=
"PatternInfo"
/>
<parameter
id=
"InstanceCapture"
/>
<parameter
id=
"InstanceSeparator"
/>
<parameter
id=
"InstanceSuffix"
/>
<parameter
id=
"ShowWarnings"
/>
<parameter
id=
"ShowInfo"
/>
<parameter
id=
"PreGrepW"
/>
<parameter
id=
"PreGrepI"
/>
<parameter
id=
"GrepEWI"
/>
<parameter
id=
"MaxMsg"
/>
<parameter
id=
"parser_mode"
/>
<parameter
id=
"parsers_path"
/>
<parameter
id=
"parser_name"
/>
<parameter
id=
"include_msg_id"
/>
<parameter
id=
"exclude_id_list"
/>
<parameter
id=
"disable_exclude_list"
/>
<input>
<input>
<group
name=
"General"
>
<group
name=
"General"
>
<!-- Same as in project settings-->
<!-- Same as in project settings-->
...
...
tools/Altera_Quartus/quartus_proto.xml
View file @
d512e941
...
@@ -78,8 +78,12 @@
...
@@ -78,8 +78,12 @@
<parameter
id=
"parser_name"
label=
"Quartus parser name"
tooltip=
"Quartus output parser script path"
<parameter
id=
"parser_name"
label=
"Quartus parser name"
tooltip=
"Quartus output parser script path"
default=
"parser_quartus.py"
visible=
"true"
omit=
""
type=
"String"
format=
"CopyValue"
/>
default=
"parser_quartus.py"
visible=
"true"
omit=
""
type=
"String"
format=
"CopyValue"
/>
<parameter
id=
"include_msg_id"
label=
"In
lc
ude message ID"
tooltip=
"Include message ID to output"
<parameter
id=
"include_msg_id"
label=
"In
cl
ude message ID"
tooltip=
"Include message ID to output"
type=
"Boolean"
default=
"true"
visible=
"true"
readonly=
"false"
format=
"CmdLineParameterSyntax"
/>
type=
"Boolean"
default=
"true"
visible=
"true"
readonly=
"false"
format=
"CmdLineParameterSyntax"
/>
<parameter
id=
"exclude_id_list"
label=
"Exclude message ID"
tooltip=
"Exclude messages with these IDs from output"
type=
"Stringlist"
default=
""
visible=
"true"
readnonly=
"false"
omit=
""
format=
"MsgIdList"
/>
<parameter
id=
"disable_exclude_list"
label=
"Disable exclude list"
tooltip=
"This option allows temporary disable exclude ID list"
type=
"Boolean"
default=
"false"
visible=
"true"
readonly=
"false"
omit=
"false"
format=
"CmdLineParameterSyntax"
/>
<!-- Invisible parameters-->
<!-- Invisible parameters-->
<parameter
id=
"tool_name"
type=
"String"
default=
"%%ToolName"
visible=
"false"
format=
"CmdLineParameterSyntax"
/>
<parameter
id=
"tool_name"
type=
"String"
default=
"%%ToolName"
visible=
"false"
format=
"CmdLineParameterSyntax"
/>
...
@@ -96,6 +100,8 @@
...
@@ -96,6 +100,8 @@
"GrepEWI"
"GrepEWI"
"---"
"---"
"include_msg_id"
"include_msg_id"
"exclude_id_list"
"disable_exclude_list"
"---"
"---"
"PatternErrors"
"PatternErrors"
"PatternWarnings"
"PatternWarnings"
...
@@ -115,7 +121,7 @@
...
@@ -115,7 +121,7 @@
instance-separator=
"InstanceSeparator"
instance-separator=
"InstanceSeparator"
instance-suffix=
"InstanceSuffix"
>
instance-suffix=
"InstanceSuffix"
>
"-c"
"-c"
"python -u %parsers_path%parser_name %tool_name %top_module %parser_mode %include_msg_id | "
"python -u %parsers_path%parser_name %tool_name %top_module %parser_mode %include_msg_id
%exclude_id_list %disable_exclude_list
| "
"%GrepEWI"
"%GrepEWI"
</line>
</line>
</output>
</output>
...
...
tools/Altera_Quartus/quartus_synthesis.xml
View file @
d512e941
...
@@ -140,6 +140,26 @@ Note: this feature is not licenced for the Web Edition and this parameter should
...
@@ -140,6 +140,26 @@ Note: this feature is not licenced for the Web Edition and this parameter should
type=
"Stringlist"
format=
"ProgramSyntax"
default=
""
omit=
""
type=
"Stringlist"
format=
"ProgramSyntax"
default=
""
omit=
""
readonly=
"false"
visible=
"true"
/>
readonly=
"false"
visible=
"true"
/>
<!-- parser parameters, these can differ from base tool and will be stored separately -->
<parameter
id=
"PatternErrors"
/>
<parameter
id=
"PatternWarnings"
/>
<parameter
id=
"PatternInfo"
/>
<parameter
id=
"InstanceCapture"
/>
<parameter
id=
"InstanceSeparator"
/>
<parameter
id=
"InstanceSuffix"
/>
<parameter
id=
"ShowWarnings"
/>
<parameter
id=
"ShowInfo"
/>
<parameter
id=
"PreGrepW"
/>
<parameter
id=
"PreGrepI"
/>
<parameter
id=
"GrepEWI"
/>
<parameter
id=
"MaxMsg"
/>
<parameter
id=
"parser_mode"
/>
<parameter
id=
"parsers_path"
/>
<parameter
id=
"parser_name"
/>
<parameter
id=
"include_msg_id"
/>
<parameter
id=
"exclude_id_list"
/>
<parameter
id=
"disable_exclude_list"
/>
<!-- invisible or calculated parameters -->
<!-- invisible or calculated parameters -->
<parameter
id=
"analysis_and_elaboration"
label=
"Analysis and elaboration"
tooltip=
"Option to check all the design files in a design for syntax and
<parameter
id=
"analysis_and_elaboration"
label=
"Analysis and elaboration"
tooltip=
"Option to check all the design files in a design for syntax and
semantec errors, and perform a netlist exraction."
semantec errors, and perform a netlist exraction."
...
...
tools/Altera_Quartus/quartus_timing_analyzer.xml
View file @
d512e941
...
@@ -124,6 +124,26 @@ the TimeQuest Timing Analyzer"
...
@@ -124,6 +124,26 @@ the TimeQuest Timing Analyzer"
the TimeQuest Timing Analyzer"
the TimeQuest Timing Analyzer"
type=
"Cardinal"
default=
""
visible=
"true"
readonly=
"false"
omit=
""
format=
"DoubleDashName"
/>
type=
"Cardinal"
default=
""
visible=
"true"
readonly=
"false"
omit=
""
format=
"DoubleDashName"
/>
<!-- parser parameters, these can differ from base tool and will be stored separately -->
<parameter
id=
"PatternErrors"
/>
<parameter
id=
"PatternWarnings"
/>
<parameter
id=
"PatternInfo"
/>
<parameter
id=
"InstanceCapture"
/>
<parameter
id=
"InstanceSeparator"
/>
<parameter
id=
"InstanceSuffix"
/>
<parameter
id=
"ShowWarnings"
/>
<parameter
id=
"ShowInfo"
/>
<parameter
id=
"PreGrepW"
/>
<parameter
id=
"PreGrepI"
/>
<parameter
id=
"GrepEWI"
/>
<parameter
id=
"MaxMsg"
/>
<parameter
id=
"parser_mode"
/>
<parameter
id=
"parsers_path"
/>
<parameter
id=
"parser_name"
/>
<parameter
id=
"include_msg_id"
/>
<parameter
id=
"exclude_id_list"
/>
<parameter
id=
"disable_exclude_list"
/>
<input>
<input>
<group
name=
"General"
>
<group
name=
"General"
>
"DisableTool"
"DisableTool"
...
...
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