Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raptor Engineering Public Development
dsview
Commits
22f5a7be
Commit
22f5a7be
authored
Jul 05, 2017
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue #103: search ‘C’ (rising edge/falling edge)
parent
2e17f421
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
DSView/pv/data/logicsnapshot.cpp
DSView/pv/data/logicsnapshot.cpp
+10
-3
DSView/pv/dock/searchdock.cpp
DSView/pv/dock/searchdock.cpp
+7
-6
No files found.
DSView/pv/data/logicsnapshot.cpp
View file @
22f5a7be
...
...
@@ -882,6 +882,7 @@ bool LogicSnapshot::pattern_search(int64_t start, int64_t end, bool nxt, int64_t
while
(
nxt
?
index
<=
end
:
index
>=
start
)
{
// get expacted and current pattern
exp_index
.
clear
();
cur_edge
.
clear
();
for
(
it_type
iterator
=
pattern
.
begin
();
iterator
!=
pattern
.
end
();
iterator
++
)
{
uint16_t
ch_index
=
iterator
->
first
;
...
...
@@ -934,6 +935,7 @@ bool LogicSnapshot::pattern_search(int64_t start, int64_t end, bool nxt, int64_t
(
nxt
?
sub_index
<=
end
:
sub_index
>=
start
))
{
// get expacted and current pattern
exp_index
.
clear
();
cur_edge
.
clear
();
for
(
it_type
iterator
=
pattern
.
begin
();
iterator
!=
pattern
.
end
();
iterator
++
)
{
uint16_t
ch_index
=
iterator
->
first
;
...
...
@@ -1006,13 +1008,18 @@ bool LogicSnapshot::pattern_search(int64_t start, int64_t end, bool nxt, int64_t
cur_sample
[
ch_index
]
=
get_sample
(
exp_index
[
seq
],
ch_index
);
find_edge
=
get_pre_edge
(
exp_index
[
seq
],
cur_sample
[
ch_index
],
1
,
ch_index
);
}
if
(
find_edge
)
if
(
find_edge
)
{
cur_sample
[
ch_index
]
=
get_sample
(
exp_index
[
seq
],
ch_index
);
else
if
(
iterator
->
second
[
cur_match_pos
]
==
'C'
)
exp_sample
[
ch_index
]
=
cur_sample
[
ch_index
];
}
else
break
;
}
while
(
cur_sample
[
ch_index
]
!=
exp_sample
[
ch_index
]);
}
seq
++
;
if
(
find_edge
)
seq
++
;
else
break
;
}
if
(
find_edge
)
{
if
(
nxt
)
...
...
DSView/pv/dock/searchdock.cpp
View file @
22f5a7be
...
...
@@ -234,22 +234,23 @@ void SearchDock::on_set()
{
dialogs
::
Search
dlg
(
this
,
_session
,
_pattern
);
if
(
dlg
.
exec
())
{
_pattern
=
dlg
.
get_pattern
();
std
::
map
<
uint16_t
,
QString
>
new
_pattern
=
dlg
.
get_pattern
();
QString
search_label
;
for
(
auto
&
iter
:
_pattern
)
{
for
(
auto
&
iter
:
new
_pattern
)
{
iter
.
second
.
remove
(
QChar
(
' '
),
Qt
::
CaseInsensitive
);
iter
.
second
=
iter
.
second
.
toUpper
();
search_label
.
push_back
(
iter
.
second
);
// if (iter.second != "XXXXXXXXXXXXXXXX") {
// search_label.push_back(QString::number(iter.first));
// search_label.push_back("/");
// }
}
_search_value
->
setText
(
search_label
);
QFontMetrics
fm
=
this
->
fontMetrics
();
_search_value
->
setFixedWidth
(
fm
.
width
(
search_label
)
+
_search_button
->
width
()
+
20
);
if
(
new_pattern
!=
_pattern
)
{
_view
.
set_search_pos
(
_view
.
get_search_pos
(),
false
);
_pattern
=
new_pattern
;
}
}
}
...
...
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