小编潘俊瑋*_*潘俊瑋的帖子

如何通过systemC tlm_fifo<float>连接两个模块?

我还是写systemC-TLM的新手。现在,我想通过 tlm_fifoFF 连接两个模块。我在网上搜索了很长时间的例子。但是没有用。请帮助提供一些想法或示例如何实现这一点。

这是我的架构:

在此处输入图片说明

而且,这是我的错误信息:

在此处输入图片说明


这是“main.cpp”

#include <systemc.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h> 
#include "merlin2.h"

#include "tlm.h"
#include <tlm_utils/simple_target_socket.h>
#include <tlm_utils/simple_initiator_socket.h>
#include <tlm_utils/multi_passthrough_initiator_socket.h>
#include <tlm_utils/multi_passthrough_target_socket.h>
#include <tlm_core/tlm_1/tlm_req_rsp/tlm_channels/tlm_fifo/tlm_fifo.h>
#include <tlm_core/tlm_1/tlm_req_rsp/tlm_1_interfaces/tlm_fifo_ifs.h>
using namespace sc_core;
using namespace tlm;
using namespace tlm_utils;
using namespace std;

int sc_main(int argc, char** argv){

    Merlin2 merlin_test("merlin2_JW");

    sc_start();
    cout << "end" << endl;
    return 0;
} 
Run Code Online (Sandbox Code Playgroud)

这是“merlin2.cpp”

#include "merlin2.h"
Merlin2::Merlin2(const sc_module_name& name)
{
    ProcessEngine PE_TEST("test_PE");
    test_PE TP("PE_test");
    tlm::tlm_fifo <float> FF ("fifo");

    TP.out(FF);
    PE_TEST.in(FF);
}
Run Code Online (Sandbox Code Playgroud)

这是“merlin2.h”

#ifndef __MERLIN2_H__
#define …
Run Code Online (Sandbox Code Playgroud)

c++ systemc

3
推荐指数
1
解决办法
717
查看次数

标签 统计

c++ ×1

systemc ×1