Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community High-Level Synthesis Why does Stratus HLS report this error?

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 23
  • Views 16497
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why does Stratus HLS report this error?

idwwwoqq808
idwwwoqq808 over 4 years ago

I'm trying to implement a module that reads and writes a memory. The memory is instantiated in the top module and passed down to submodules.

It seems there are errors in the generated memory header file.

I'm using Stratus 19.1 on CentOS 7. I've tried synthesizing "Lab 3: Explicit Memorys" (which comes with Stratus) and it was completed without errors.

Can anyone tell me what the cause of this error and how to solve it?

Also, the way I instantiate memories is same as in Lab3.

I'd prefer to keep ports of memories the same because in the project I'm working on, one module only writes to a memory block and another module only reads from this memory. They will access the same memory simultaneously so I'd rather not to use a shared interface.

Here's the setting of the memory:

And Here's my code:

/* Test3.h */
#include "cynw_p2p.h"
#include "memlib.h"
#include "writer_wrap.h"
#include "reader_wrap.h"

SC_MODULE(Test3)
{
public:
sc_in < sc_uint<8> > din;
sc_out< sc_uint<8> > dout;

// Declaration of clock and reset parameters
sc_in_clk clk;
sc_in < bool > rst;

sc_signal< bool > sgn;

//sc_uint<8> mem[256];
RAM8x256::wrapper< CYN::TLM > *mem;

writer_wrapper m_writer;
reader_wrapper m_reader;

SC_CTOR(Test3)
: m_writer("writer"), 
m_reader("reader"),
clk( "clk" ),
rst( "rst" )
{
m_writer.clk(clk);
m_writer.rst(rst);
m_writer.din(din);
m_writer.sgn(sgn);

m_reader.clk(clk);
m_reader.rst(rst);
m_reader.dout(dout);
m_reader.sgn(sgn);

mem = new RAM8x256::wrapper< CYN::TLM > ("mem");
m_writer.m_mem(*mem);
m_reader.m_mem(*mem);
mem->clk_rst(clk,rst);
}
};
//-------------------------------------------------------
/* writer.h */
#include "cynw_p2p.h"
#include "memlib.h"

SC_MODULE(writer)
{
public:
sc_in < sc_uint<8> > din;
sc_out< bool > sgn;

// Declaration of clock and reset parameters
sc_in_clk clk;
sc_in < bool > rst;

//sc_uint<8> *m_mem;
RAM8x256::port_1< CYN::TLM > m_mem;
sc_uint<8> ad;

//SC_HAS_PROCESS(writer);

//writer(sc_module_name &name,
// sc_uint<8> mem[256])
// :m_mem(mem)
SC_CTOR(writer)
{
SC_CTHREAD(writer_thread, clk.pos());
async_reset_signal_is(rst,0);

//HLS_MAP_TO_MEMORY(m_mem,"RAM8x256");
}
void writer_thread();
};
//-------------------------------------------------------
/* writer.cpp */
#include "writer.h"

// The thread function for the design
void writer::writer_thread()
{
// Reset the interfaces
{
CYN_PROTOCOL("writer_thread");

sgn.write(0);
ad=0;
//m_mem.reset();
wait();

// Main execution loop
while (1)
{
m_mem[ad]=din.read();
sgn.write(din.read()[7]);
ad++;
wait();
}
}
}
//-------------------------------------------------------
/* reader.h */
#include "cynw_p2p.h"
#include "memlib.h"

SC_MODULE(reader)
{
public:
sc_in < bool > sgn;
sc_out< sc_uint<8> > dout;

// Declaration of clock and reset parameters
sc_in_clk clk;
sc_in < bool > rst;

sc_uint<8> ad;
sc_uint<8> out_tmp;
//sc_uint<8> (&m_mem)[256];
RAM8x256::port_2< CYN::TLM > m_mem;

//SC_HAS_PROCESS(reader);
//reader(sc_module_name &name,
// sc_uint<8> (&mem)[256])
// :m_mem(mem)
SC_CTOR(reader)
{
SC_CTHREAD(reader_thread, clk.pos());
async_reset_signal_is(rst,0);

//HLS_MAP_TO_MEMORY(m_mem,"RAM8x256");
}
void reader_thread();

};
//-------------------------------------------------------
/* reader.cpp */
#include "reader.h"

// The thread function for the design
void reader::reader_thread()
{
// Reset the interfaces
{
CYN_PROTOCOL("reader_thread");

ad=0;
//m_mem.reset();

wait();

// Main execution loop
while (1)
{
out_tmp=m_mem[ad];

if(sgn.read()){
dout.write( (~out_tmp)+1 );
}else{
dout.write(out_tmp);
}
wait();

ad++;
wait();
}
}
}
//-------------------------------------------------------
The "Job Trace" reports:
00148: Normalization and optimization:
NOTE 00860: Long int data types are being implemented with 64 bits.
02923: Dissolving function boundaries.
02924: Dissolved 198 function calls.
#################################################################
# #
ERROR 03144:# at memlib/c_parts/RAM8x256.h line 3175 #
ERROR 03144.# Call to unresolved virtual function or function called via #
ERROR 03144.# pointer #
# #
#################################################################
#################################################################
# #
FATAL 02368:# at writer.h line 8 #
FATAL 02368.# Not all sc_port->sc_interface bindings and virtual function #
FATAL 02368.# calls could be resolved #
# #
#################################################################

01445: Summary of messages of severity WARNING or greater:
01193: SEVERITY MSGID CNT
01198: FATAL 02368 1
01198: ERROR 03144 1

stratus_hls failed with 2 errors and 0 warnings.

  • Cancel
Parents
  • Rosemary
    Rosemary over 3 years ago

    According to 3m n95 buyers, In this guide and in the comparing prebuilt material we incorporate a gas pedal that performs duplicate and collect (MAC) on number vectors of configurable length. In particular, we carry out the accompanying little portion of calculation.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Rosemary
    Rosemary over 3 years ago

    According to 3m n95 buyers, In this guide and in the comparing prebuilt material we incorporate a gas pedal that performs duplicate and collect (MAC) on number vectors of configurable length. In particular, we carry out the accompanying little portion of calculation.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information