tapa: Batch stream function call parse error

I’m getting and error “no port _dout” as follows.

I0426 18:08:59.777 tapa.core:269] instrumenting upper-level RTL
Traceback (most recent call last):
  File "/home/vk/.local/bin/tapac", line 33, in <module>
    sys.exit(load_entry_point('tapa', 'console_scripts', 'tapac')())
  File "/home/vk/src/blaok/tapa/backend/python/tapa/tapac.py", line 527, in main
    program.generate_task_rtl(
  File "/home/vk/src/blaok/tapa/backend/python/tapa/core.py", line 272, in generate_task_rtl
    self._instrument_non_top_upper_task(task, part_num, additional_fifo_pipelining)
  File "/home/vk/src/blaok/tapa/backend/python/tapa/core.py", line 814, in _instrument_non_top_upper_task
    self._connect_fifos(task)
  File "/home/vk/src/blaok/tapa/backend/python/tapa/core.py", line 398, in _connect_fifos
    wire_width = self.get_task(task_name).module.get_port_of(
  File "/home/vk/src/blaok/tapa/backend/python/tapa/verilog/xilinx/module.py", line 199, in get_port_of
    raise ValueError(f'module {self.name} does not have port {fifo}.{suffix}')
ValueError: module compute_kernel does not have port in_hashes._dout

The function signature is

void compute_kernel(tapa::istream<ap_uint<256>>& in_hashes,
                    tapa::istream<uint64_t>& num_iters,
                    tapa::ostream<ap_uint<256>> out_q);

and the call is

void compute(tapa::istreams<ap_uint<256>, NK>& in_hashes_qs,
             tapa::istreams<uint64_t, NK>& num_iters_qs,
             tapa::ostreams<ap_uint<256>, NK>& out_qs) {
    tapa::task().invoke<tapa::detach, NK>(compute_kernel, in_hashes_qs, num_iters_qs, out_qs);
}

What is wrong with this function?

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 24 (16 by maintainers)

Most upvoted comments

@vkomenda BTW, in case you have not seen it, we are holding a hybrid tutorial at FCCM this month. You are welcome to join https://www.fccm.org/workshop-tutorial-2022/

Also, you might want to use n_elem % NK instead of iq here and here.

Thanks for spotting! Noted and corrected.

Are you sure you want i + j * NK instead of i * NK + j?

I am indeed. This is for the j-th output from the i-th kernel. This means non-sequential writes and you might argue that I should transform this to sequential writes instead.