Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
e648f0ac
Commit
e648f0ac
authored
May 17, 2019
by
Lukas Sommer
Browse files
Also store the number of AXI4 masters in the XML synthesis report;
parent
e3f219c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
common/ip_report.xml.template
View file @
e648f0ac
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
</TimingReport>
</TimingReport>
<PortReport>
<PortReport>
<NumMasters>@@MASTERS@@</NumMasters>
<NumSlaves>@@SLAVES@@</NumSlaves>
<NumSlaves>@@SLAVES@@</NumSlaves>
</PortReport>
</PortReport>
...
...
src/main/scala/tapasco/activity/EvaluateIP.scala
View file @
e648f0ac
...
@@ -122,8 +122,8 @@ object EvaluateIP {
...
@@ -122,8 +122,8 @@ object EvaluateIP {
logger
.
trace
(
"%s: Vivado finished successfully"
.
format
(
runPrefix
))
logger
.
trace
(
"%s: Vivado finished successfully"
.
format
(
runPrefix
))
val
ur
=
UtilizationReport
(
files
.
rpt_util
).
get
val
ur
=
UtilizationReport
(
files
.
rpt_util
).
get
val
dpd
=
TimingReport
(
files
.
rpt_timing
).
get
.
dataPathDelay
val
dpd
=
TimingReport
(
files
.
rpt_timing
).
get
.
dataPathDelay
val
numSlaves
=
PortReport
(
files
.
rpt_port
).
get
.
numSlaves
val
portReport
=
PortReport
(
files
.
rpt_port
).
get
writeXMLReport
(
reportFile
,
ur
,
dpd
,
targetPeriod
,
numSlaves
)
writeXMLReport
(
reportFile
,
ur
,
dpd
,
targetPeriod
,
portReport
.
numMasters
,
portReport
.
numSlaves
)
logger
.
info
(
"{} finished successfully, report in {}"
,
runPrefix
:
Any
,
reportFile
)
logger
.
info
(
"{} finished successfully, report in {}"
,
runPrefix
:
Any
,
reportFile
)
// clean up files on exit
// clean up files on exit
deleteOnExit
(
files
.
baseDir
.
toFile
)
deleteOnExit
(
files
.
baseDir
.
toFile
)
...
@@ -180,7 +180,7 @@ object EvaluateIP {
...
@@ -180,7 +180,7 @@ object EvaluateIP {
* @param targetPeriod Target operating period.
* @param targetPeriod Target operating period.
**/
**/
private
def
writeXMLReport
(
reportFile
:
Path
,
ur
:
UtilizationReport
,
dataPathDelay
:
Double
,
private
def
writeXMLReport
(
reportFile
:
Path
,
ur
:
UtilizationReport
,
dataPathDelay
:
Double
,
targetPeriod
:
Double
,
slaves
:
Int
)
:
Unit
=
{
targetPeriod
:
Double
,
masters
:
Int
,
slaves
:
Int
)
:
Unit
=
{
val
needles
=
scala
.
collection
.
mutable
.
Map
[
String
,
String
](
val
needles
=
scala
.
collection
.
mutable
.
Map
[
String
,
String
](
"SLICE"
->
ur
.
used
.
SLICE
.
toString
,
"SLICE"
->
ur
.
used
.
SLICE
.
toString
,
"SLICES"
->
ur
.
available
.
SLICE
.
toString
,
"SLICES"
->
ur
.
available
.
SLICE
.
toString
,
...
@@ -194,6 +194,7 @@ object EvaluateIP {
...
@@ -194,6 +194,7 @@ object EvaluateIP {
"DSPS"
->
ur
.
available
.
DSP
.
toString
,
"DSPS"
->
ur
.
available
.
DSP
.
toString
,
"PERIOD"
->
targetPeriod
.
toString
,
"PERIOD"
->
targetPeriod
.
toString
,
"MIN_PERIOD"
->
dataPathDelay
.
toString
,
"MIN_PERIOD"
->
dataPathDelay
.
toString
,
"MASTERS"
->
masters
.
toString
,
"SLAVES"
->
slaves
.
toString
"SLAVES"
->
slaves
.
toString
)
)
...
...
src/main/scala/tapasco/reports/SynthesisReport.scala
View file @
e648f0ac
...
@@ -31,9 +31,10 @@ final case class SynthesisReport(
...
@@ -31,9 +31,10 @@ final case class SynthesisReport(
override
val
file
:
Path
,
override
val
file
:
Path
,
area
:
Option
[
AreaEstimate
],
area
:
Option
[
AreaEstimate
],
timing
:
Option
[
TimingEstimate
],
timing
:
Option
[
TimingEstimate
],
ports
:
Option
[
Int
])
extends
Report
(
file
)
{
masters
:
Option
[
Int
],
slaves
:
Option
[
Int
])
extends
Report
(
file
)
{
require
(
file
.
toFile
.
exists
,
"file %s does not exist"
.
format
(
file
.
toString
))
require
(
file
.
toFile
.
exists
,
"file %s does not exist"
.
format
(
file
.
toString
))
require
(
area
.
nonEmpty
||
timing
.
nonEmpty
||
port
s
.
nonEmpty
,
"no synthesis results found in %s"
.
format
(
file
.
toString
))
require
(
area
.
nonEmpty
||
timing
.
nonEmpty
||
masters
.
nonEmpty
||
slave
s
.
nonEmpty
,
"no synthesis results found in %s"
.
format
(
file
.
toString
))
}
}
object
SynthesisReport
{
object
SynthesisReport
{
...
@@ -51,8 +52,8 @@ object SynthesisReport {
...
@@ -51,8 +52,8 @@ object SynthesisReport {
val
ff
:
Integer
=
((
xml
\\
"AreaReport"
\\
e
\\
"FF"
)
text
).
toInt
val
ff
:
Integer
=
((
xml
\\
"AreaReport"
\\
e
\\
"FF"
)
text
).
toInt
val
dsp
:
Integer
=
((
xml
\\
"AreaReport"
\\
e
\\
"DSP"
)
text
).
toInt
val
dsp
:
Integer
=
((
xml
\\
"AreaReport"
\\
e
\\
"DSP"
)
text
).
toInt
val
bram
:
Integer
=
((
xml
\\
"AreaReport"
\\
e
\\
"BRAM"
)
text
).
toInt
val
bram
:
Integer
=
((
xml
\\
"AreaReport"
\\
e
\\
"BRAM"
)
text
).
toInt
new
ResourcesEstimate
(
slice
,
lut
,
ff
,
dsp
,
bram
)
ResourcesEstimate
(
slice
,
lut
,
ff
,
dsp
,
bram
)
}).
grouped
(
2
).
map
(
x
=>
new
AreaEstimate
(
x
.
head
,
x
.
tail
.
head
)).
toList
.
headOption
}).
grouped
(
2
).
map
(
x
=>
AreaEstimate
(
x
.
head
,
x
.
tail
.
head
)).
toList
.
headOption
}
catch
{
case
e
:
Exception
=>
logger
.
warn
(
"parsing utilization report failed: "
+
e
);
None
}
}
catch
{
case
e
:
Exception
=>
logger
.
warn
(
"parsing utilization report failed: "
+
e
);
None
}
/** Extracts the timing estimation from the given synthesis report file.
/** Extracts the timing estimation from the given synthesis report file.
...
@@ -65,6 +66,11 @@ object SynthesisReport {
...
@@ -65,6 +66,11 @@ object SynthesisReport {
((
xml
\\
"TimingReport"
\\
"TargetClockPeriod"
)
text
).
toDouble
))
((
xml
\\
"TimingReport"
\\
"TargetClockPeriod"
)
text
).
toDouble
))
}
catch
{
case
e
:
Exception
=>
logger
.
warn
(
"parsing timing report failed: "
+
e
);
None
}
}
catch
{
case
e
:
Exception
=>
logger
.
warn
(
"parsing timing report failed: "
+
e
);
None
}
def
extractMasterPorts
(
sr
:
Path
)
:
Option
[
Int
]
=
try
{
val
xml
=
scala
.
xml
.
XML
.
loadFile
(
sr
.
toAbsolutePath
.
toString
)
Some
(((
xml
\\
"PortReport"
\\
"NumMasters"
)
text
).
toInt
)
}
catch
{
case
e
:
Exception
=>
logger
.
warn
(
"parsing port report failed: %s"
.
format
(
e
));
None
}
def
extractSlavePorts
(
sr
:
Path
)
:
Option
[
Int
]
=
try
{
def
extractSlavePorts
(
sr
:
Path
)
:
Option
[
Int
]
=
try
{
val
xml
=
scala
.
xml
.
XML
.
loadFile
(
sr
.
toAbsolutePath
.
toString
)
val
xml
=
scala
.
xml
.
XML
.
loadFile
(
sr
.
toAbsolutePath
.
toString
)
Some
(((
xml
\\
"PortReport"
\\
"NumSlaves"
)
text
).
toInt
)
Some
(((
xml
\\
"PortReport"
\\
"NumSlaves"
)
text
).
toInt
)
...
@@ -73,6 +79,6 @@ object SynthesisReport {
...
@@ -73,6 +79,6 @@ object SynthesisReport {
/** Produce SynthesisReport instance from file. **/
/** Produce SynthesisReport instance from file. **/
def
apply
(
sr
:
Path
)
:
Option
[
SynthesisReport
]
=
catchAllDefault
(
None
:
Option
[
SynthesisReport
],
def
apply
(
sr
:
Path
)
:
Option
[
SynthesisReport
]
=
catchAllDefault
(
None
:
Option
[
SynthesisReport
],
"failed to read synthesis report %s: "
.
format
(
sr
.
toString
))
{
"failed to read synthesis report %s: "
.
format
(
sr
.
toString
))
{
Some
(
SynthesisReport
(
sr
,
extractArea
(
sr
),
extractTiming
(
sr
),
extractSlavePorts
(
sr
)))
Some
(
SynthesisReport
(
sr
,
extractArea
(
sr
),
extractTiming
(
sr
),
extractMasterPorts
(
sr
),
extractSlavePorts
(
sr
)))
}
}
}
}
Write
Preview
Supports
Markdown
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