Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8ca94138
authored
Feb 24, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dataflow_cpp: missed some exceptions, fixed wrong asserts
parent
356f023c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
dataflow_cpp/include/embb/dataflow/internal/inputs.h
+5
-11
dataflow_cpp/include/embb/dataflow/network.h
+2
-3
No files found.
dataflow_cpp/include/embb/dataflow/internal/inputs.h
View file @
8ca94138
...
@@ -90,10 +90,7 @@ class Inputs<Slices, T1, embb::base::internal::Nil, embb::base::internal::Nil,
...
@@ -90,10 +90,7 @@ class Inputs<Slices, T1, embb::base::internal::Nil, embb::base::internal::Nil,
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
{
assert
(
count_
[
idx
]
>
0
);
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
);
}
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
1
;
count_
[
idx
]
=
1
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -143,7 +140,7 @@ class Inputs<Slices, T1, T2, embb::base::internal::Nil,
...
@@ -143,7 +140,7 @@ class Inputs<Slices, T1, T2, embb::base::internal::Nil,
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
assert
(
count_
[
idx
]
==
0
);
assert
(
count_
[
idx
]
>
0
);
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
2
;
count_
[
idx
]
=
2
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -197,10 +194,7 @@ class Inputs<Slices, T1, T2, T3, embb::base::internal::Nil,
...
@@ -197,10 +194,7 @@ class Inputs<Slices, T1, T2, T3, embb::base::internal::Nil,
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
{
assert
(
count_
[
idx
]
>
0
);
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
);
}
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
3
;
count_
[
idx
]
=
3
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -257,7 +251,7 @@ class Inputs<Slices, T1, T2, T3, T4, embb::base::internal::Nil>
...
@@ -257,7 +251,7 @@ class Inputs<Slices, T1, T2, T3, T4, embb::base::internal::Nil>
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
assert
(
count_
[
idx
]
==
0
);
assert
(
count_
[
idx
]
>
0
);
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
4
;
count_
[
idx
]
=
4
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -319,7 +313,7 @@ class Inputs
...
@@ -319,7 +313,7 @@ class Inputs
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
assert
(
count_
[
idx
]
==
0
);
assert
(
count_
[
idx
]
>
0
);
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
5
;
count_
[
idx
]
=
5
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
...
dataflow_cpp/include/embb/dataflow/network.h
View file @
8ca94138
...
@@ -842,9 +842,8 @@ class Network : public internal::ClockListener {
...
@@ -842,9 +842,8 @@ class Network : public internal::ClockListener {
*/
*/
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
const
int
cnt
=
--
sink_counter_
[
idx
];
assert
(
sink_counter_
[
idx
]
>
0
);
assert
(
cnt
==
0
);
--
sink_counter_
[
idx
];
EMBB_UNUSED_IN_RELEASE
(
cnt
);
}
}
/**
/**
...
...
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