16 #ifndef __AXIADDWRITERESPONSE_H__
17 #define __AXIADDWRITERESPONSE_H__
20 #include <nvhls_connections.h>
21 #include <nvhls_marshaller.h>
23 #include <TypeToBits.h>
50 template <
typename CfgManager,
typename CfgSubordinate>
62 typename axiM::read::template subordinate<> axiM_read;
63 typename axiM::write::template subordinate<> axiM_write;
64 typename axiS::read::template manager<> axiS_read;
65 typename axiS::write::template manager<> axiS_write;
84 axiM_read(
"axiM_read"),
85 axiM_write(
"axiM_write"),
86 axiS_read(
"axiS_read"),
87 axiS_write(
"axiS_write"),
98 dummyB.out(axiM_write.b);
100 SC_THREAD(axi_read_ar);
101 sensitive << clk.pos();
104 SC_THREAD(axi_read_r);
105 sensitive << clk.pos();
108 SC_THREAD(axi_write_aw);
109 sensitive << clk.pos();
112 SC_THREAD(axi_write_w);
113 sensitive << clk.pos();
119 axiM_read.ar.Reset();
120 axiS_read.ar.Reset();
121 #pragma hls_pipeline_init_interval 1
122 #pragma pipeline_stall_mode flush
125 if (axiM_read.ar.PopNB(AR)) {
126 axiS_read.ar.Push(BitsToType<typename axiS::AddrPayload>(
TypeToBits(AR)));
134 #pragma hls_pipeline_init_interval 1
135 #pragma pipeline_stall_mode flush
138 if (axiS_read.r.PopNB(R)) {
139 axiM_read.r.Push(BitsToType<typename axiM::ReadPayload>(
TypeToBits(R)));
144 void axi_write_aw() {
145 axiM_write.aw.Reset();
146 axiS_write.aw.Reset();
147 #pragma hls_pipeline_init_interval 1
148 #pragma pipeline_stall_mode flush
151 if (axiM_write.aw.PopNB(AW)) {
152 axiS_write.aw.Push(BitsToType<typename axiS::AddrPayload>(
TypeToBits(AW)));
158 axiM_write.w.Reset();
159 axiS_write.w.Reset();
160 #pragma hls_pipeline_init_interval 1
161 #pragma pipeline_stall_mode flush
164 if (axiM_write.w.PopNB(W)) {
165 axiS_write.w.Push(BitsToType<typename axiS::WritePayload>(
TypeToBits(W)));
A simple shim that converts between two AXI configs by adding write responses.
The base axi4 class parameterized according a valid config.
sc_lv< Wrapped< T >::width > TypeToBits(T in)
Convert Type to logic vector.
#define NVHLS_NEG_RESET_SIGNAL_IS(port)
ENABLE_SYNC_RESET define: Select synchronous or asynchronous reset.
A struct composed of the signals associated with AXI read and write requests.
A struct composed of the signals associated with an AXI read response.
A struct composed of the signals associated with AXI write data.