本文整理汇总了C++中hls::stream::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ stream::empty方法的具体用法?C++ stream::empty怎么用?C++ stream::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hls::stream
的用法示例。
在下文中一共展示了stream::empty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hls_cropping_strm
//.........这里部分代码省略.........
dst.write(aesl_tmp_3[i]);
}
AESL_transaction_pc ++ ;
} else {
static unsigned AESL_transaction;
static AESL_FILE_HANDLER aesl_fh;
char* tvin_src_V_V = new char[50];
char* wrapc_stream_size_in_src_V_V = new char[50];
char* tvout_dst_V_V = new char[50];
char* tvin_dst_V_V = new char[50];
aesl_fh.touch(AUTOTB_TVIN_dst_V_V);
char* wrapc_stream_size_out_dst_V_V = new char[50];
static INTER_TCL_FILE tcl_file(INTER_TCL);
int leading_zero;
std::vector<ap_int<8> > aesl_tmp_0;
int aesl_tmp_1 = 0;
while (!src.empty()) {
aesl_tmp_0.push_back(src.read());
aesl_tmp_1 ++;
}
std::vector<ap_int<16> > aesl_tmp_3;
int aesl_tmp_4 = 0;
while (!dst.empty()) {
aesl_tmp_3.push_back(dst.read());
aesl_tmp_4 ++;
}
for (int i = 0; i < aesl_tmp_1; i++) {
src.write(aesl_tmp_0[i]);
}
AESL_ORIG_DUT_hls_cropping_strm(src,dst);
int aesl_tmp_2 = src.size();
int aesl_tmp_5 = aesl_tmp_4;
while (!dst.empty()) {
示例2: pyrconstuct_top
//.........这里部分代码省略.........
AESL_transaction_pc++;
}
else
{
static unsigned AESL_transaction;
static AESL_FILE_HANDLER aesl_fh;
// "imgIn_M_real_V"
char* tvin_imgIn_M_real_V = new char[50];
aesl_fh.touch(AUTOTB_TVIN_imgIn_M_real_V);
// "imgIn_M_imag_V"
char* tvin_imgIn_M_imag_V = new char[50];
aesl_fh.touch(AUTOTB_TVIN_imgIn_M_imag_V);
// "pyrFilOut_V"
char* tvin_pyrFilOut_V = new char[50];
aesl_fh.touch(AUTOTB_TVIN_pyrFilOut_V);
char* tvout_pyrFilOut_V = new char[50];
aesl_fh.touch(AUTOTB_TVOUT_pyrFilOut_V);
char* wrapc_stream_size_out_pyrFilOut_V = new char[50];
aesl_fh.touch(WRAPC_STREAM_SIZE_OUT_pyrFilOut_V);
char* wrapc_stream_egress_status_pyrFilOut_V = new char[50];
aesl_fh.touch(WRAPC_STREAM_EGRESS_STATUS_pyrFilOut_V);
static INTER_TCL_FILE tcl_file(INTER_TCL);
int leading_zero;
// dump stream tvin: "pyrFilOut"
std::vector<std::complex<ap_fixed<17, 6, (ap_q_mode) 0, (ap_o_mode)3, 0> > > aesl_tmp_0;
int aesl_tmp_1 = 0;
while (!pyrFilOut.empty())
{
aesl_tmp_0.push_back(pyrFilOut.read());
aesl_tmp_1++;
}
// [[transaction]]
sprintf(tvin_imgIn_M_real_V, "[[transaction]] %d\n", AESL_transaction);
aesl_fh.write(AUTOTB_TVIN_imgIn_M_real_V, tvin_imgIn_M_real_V);
sc_bv<16>* imgIn_M_real_V_tvin_wrapc_buffer = new sc_bv<16>[512];
// RTL Name: imgIn_M_real_V
{
// bitslice(15, 0)
{
int hls_map_index = 0;
// celement: imgIn._M_real.V(15, 0)
{
// carray: (0) => (511) @ (1)
for (int i_0 = 0; i_0 <= 511; i_0 += 1)
{
// sub : i_0
// ori_name : imgIn[i_0].real()
// sub_1st_elem : 0
// ori_name_1st_elem : imgIn[0].real()
// regulate_c_name : imgIn__M_real_V
// input_type_conversion : (imgIn[i_0].real()).range().to_string(SC_BIN).c_str()
if (&(imgIn[0].real()) != NULL) // check the null address if the c port is array or others
{
sc_lv<16> imgIn__M_real_V_tmp_mem;
imgIn__M_real_V_tmp_mem = (imgIn[i_0].real()).range().to_string(SC_BIN).c_str();
imgIn_M_real_V_tvin_wrapc_buffer[hls_map_index++].range(15, 0) = imgIn__M_real_V_tmp_mem.range(15, 0);