-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hls::vector interface for DuplicateStreams #141
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, @vopade!
Please, review the comments. Mostly, I'd like to ask you to avoid whitespace changes that are a mere consequence of editor settings or personal preference.
streamtools.h
Outdated
T e = in.read(); | ||
out1.write(e); | ||
out2.write(e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, undo mere indentation changes.
streamtools.h
Outdated
template<typename T, unsigned int NumTotal > | ||
void DuplicateStreams_Batch(hls::stream<T> & in, hls::stream<T> & out1, | ||
hls::stream<T> & out2, const unsigned int numReps) { | ||
for (unsigned int image = 0; image < numReps; image++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, don't just change indentation.
tb/data/dup_stream_config.h
Outdated
using T = ap_uint<8>; | ||
constexpr unsigned NUM_REPEAT = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix missing end of line.
tb/dup_stream_tb.cpp
Outdated
stream<T> output_stream1("output_stream"); | ||
stream<T> output_stream2("output_stream"); | ||
static T expected[NUM_REPEAT*MAX_IMAGES]; | ||
unsigned int count_out = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, many lines are just indentation changes. Please, undo.
@@ -2,10 +2,15 @@ | |||
using namespace hls; | |||
#include "ap_int.h" | |||
#include "bnn-library.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you could reduce these includes to hls_stream.h
only. Please, do if possible.
tb/dup_stream_top.cpp
Outdated
void Testbench_dup_stream(stream<ap_uint<WIDTH> > & in, stream<ap_uint<WIDTH> > & out1, stream<ap_uint<WIDTH> > & out2, unsigned int numReps){ | ||
DuplicateStreams_Batch<WIDTH, NUM_REPEAT>(in, out1, out2, numReps); | ||
} | ||
void Testbench_dup_stream(stream<T> & in, stream<T> & out1, stream<T> & out2, unsigned int numReps){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a consequence of the above, please, use hls::stream
rather than stream
.
Hi @preusser, |
THanks, @vopade! This looks good. Getting ready for the merge ... |
Commit for pooling operators was automatically added to this PR since it was still open. Please review @preusser |
Changed interfaces of
DuplicateStreams
andDuplicateStreams_Batch
as well as pooling operators from packed to hls::vector