Skip to content

Commit

Permalink
Added an example of hierarchical DF. WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizioferrandi authored and Ansaya committed Mar 28, 2024
1 parent e22ee15 commit bbc2f0d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
16 changes: 16 additions & 0 deletions panda_regressions/hls/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ EXTRA_DIST= \
%D%/bambu_specific_test2.sh \
%D%/bambu_specific_test3_list \
%D%/bambu_specific_test3.sh \
%D%/bambu_specific_test4/AddBlock.hpp \
%D%/bambu_specific_test4/dataflow.cpp \
%D%/bambu_specific_test4/duplicate.cpp \
%D%/bambu_specific_test4/multipath2.cpp \
%D%/bambu_specific_test4/multipath4.cpp \
%D%/bambu_specific_test4/SimpleSystem.hpp \
%D%/bambu_specific_test4/tb_dataflow2.cpp \
%D%/bambu_specific_test4/dataflow2.hpp \
%D%/bambu_specific_test4/dataflow.hpp \
%D%/bambu_specific_test4/MulBlock.hpp \
%D%/bambu_specific_test4/multipath3.cpp \
%D%/bambu_specific_test4/multipath.cpp \
%D%/bambu_specific_test4/SumBlock.hpp \
%D%/bambu_specific_test4/tb_dataflow.cpp \
%D%/bambu_specific_test4_list \
%D%/bambu_specific_test4.sh \
%D%/bambu_interface_test/2mm.c \
%D%/bambu_interface_test/axi_small_write.c \
%D%/bambu_interface_test/axi_different_write.c \
Expand Down
9 changes: 3 additions & 6 deletions panda_regressions/hls/bambu_specific_test4/multipath4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SubSystem
ac_channel<int> x, y, z;

public:
void sub_module(ac_channel<int>& in1, ac_channel<int>& in2, ac_channel<int>& out)
void compute(ac_channel<int>& in1, ac_channel<int>& in2, ac_channel<int>& out)
{
#pragma HLS dataflow
a5.compute(in1, x);
Expand All @@ -46,11 +46,10 @@ class SimpleSystem
{
AddBlock<5> a5;
AddBlock<7> a7;
SumBlock<int> s1;
MulBlock m1;
SubSystem s2;

ac_channel<int> x, y, z, k;
ac_channel<int> x, y, z;

public:
void top(ac_channel<int>& in1, ac_channel<int>& in2, ac_channel<int>& out)
Expand All @@ -61,9 +60,7 @@ class SimpleSystem

a7.compute(in2, z);

s2.sub_module(z, x, k);

s1.compute(y, k, out);
s2.compute(y, z, out);
}
};

Expand Down

0 comments on commit bbc2f0d

Please sign in to comment.