mirror of
https://github.com/YosysHQ/yosys
synced 2026-01-18 08:18:56 +00:00
Fix test regex to match upstream stat output format
The test was using regexes that matched Silimate's modified stat output
format ('Number of wires: <count>'), but upstream yosys uses a different
format (' <count> <area> wires'). Update the regex to match the upstream
format.
This commit is contained in:
parent
6503ad91c9
commit
a4774cac02
1 changed files with 3 additions and 2 deletions
|
|
@ -7,10 +7,11 @@ proc read_stats { file } {
|
|||
set ports 0
|
||||
set nets 0
|
||||
foreach line [split $result "\n"] {
|
||||
if [regexp {Number of wires:[ \t]+([0-9]+)} $line tmp n] {
|
||||
# Match upstream yosys stat format: " <count> <area> wires"
|
||||
if [regexp {^\s*(\d+)\s+[\d.]+\s+wires\s*$} $line -> n] {
|
||||
set nets [expr $nets + $n]
|
||||
}
|
||||
if [regexp {Number of ports:[ \t]+([0-9]+)} $line tmp n] {
|
||||
if [regexp {^\s*(\d+)\s+[\d.]+\s+ports\s*$} $line -> n] {
|
||||
set ports [expr $ports + $n]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue