Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
fbde7aac
Commit
fbde7aac
authored
May 22, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
faster test runner pattern matching
parent
801955ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
test/lib/functions.sh
+15
-9
No files found.
test/lib/functions.sh
View file @
fbde7aac
...
...
@@ -56,16 +56,22 @@ assertConverts() {
assertTrue
"conversion of
$ac_file
not stable after the first iteration"
$?
$SV2V
-v
$ac_file
2> /dev/null
>
/dev/null
assertTrue
"verbose conversion of
$ac_file
failed"
$?
# using sed to remove quoted strings
filtered
=
`
sed
-E
's/"([^"]|\")+"/
/g'
$ac_tmpa
`
# using sed to remove quoted strings
and integer unsigned
filtered
=
`
sed
-E
-e
's/"([^"]|\")+"//g'
-e
's/integer unsigned/integer
/g'
$ac_tmpa
`
# check for various things iverilog accepts which we don't want to output
PATTERNS
=
"
\$
bits
\|\$
dimensions
\|\$
unpacked_dimensions
\|\$
left
\|\$
right
\|\$
low
\|\$
high
\|\$
increment
\|\$
size"
echo
"
$filtered
"
|
grep
"
$PATTERNS
"
>
/dev/null
assertFalse
"conversion of
$ac_file
still contains dimension queries"
$?
echo
"
$filtered
"
| egrep
"
\s
(int
\|
bit
\|
logic
\|
byte
\|
struct
\|
enum
\|
longint
\|
shortint)
\s
"
assertFalse
"conversion of
$ac_file
still contains SV types"
$?
echo
"
$filtered
"
|
grep
"[^
\$
a-zA-Z_]unsigned"
|
grep
-v
"integer unsigned"
>
/dev/null
assertFalse
"conversion of
$ac_file
still contains unsigned keyword"
$?
prefix
=
"conversion of
$ac_file
still contains"
assertNotMatch
"
$filtered
"
"
$prefix
dimension queries"
\
'\$bits|\$dimensions|\$unpacked_dimensions|\$left|\$right|\$low|\$high|\$increment|\$size'
assertNotMatch
"
$filtered
"
"
$prefix
SystemVerilog types"
\
'[[:space:]](int|bit|logic|byte|struct|enum|longint|shortint)[[:space:]]'
assertNotMatch
"
$filtered
"
"
$prefix
unsigned keyword"
\
'[^\$a-zA-Z_]unsigned'
}
assertNotMatch
()
{
if
[[
"
$1
"
=
~
$3
]]
;
then
fail
"
$2
"
fi
}
# convert SystemVerilog source file(s)
...
...
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