I attempted to build and run the Lab5 unit test from the "answer" training
project at
https://github.com/opencpi/training/tree/master/training. I got
the following error:
```
$ ocpidev run --verbose --view
make: Entering directory `./training/training/components/time_demux.test'
======== Preparing for execution on available platforms with available
built workers and assemblies for time_demux:
Probing for available local platforms:
Local platforms are: hdl-0-xsim rcc-0-centos7
Generating execution scripts for each platform that can run.
Generating run script for platform: centos7
======== Running and verifying test outputs on available platforms for
time_demux:
Performing test cases for ocpi.training.time_demux on platform centos7.
Functions are: run verify view
Executing case case00.00 using worker time_demux.rcc...
OCPI_LIBRARY_PATH=../../../lib/rcc:../../../lib/ocl:../../gen/assemblies:$OCPI_CDK_DIR/$OCPI_TOOL_DIR/artifacts
$OCPI_CDK_DIR/$OCPI_TOOL_DIR/bin/ocpirun -d -v -mtime_demux=rcc
-wtime_demux=time_demux -Ptime_demux=centos7
--sim-dir=case00.00.time_demux.rcc.simulation
--dump-file=case00.00.time_demux.rcc.props
-pfile_write_from_Data_Out=fileName=case00.00.time_demux.rcc.Data_Out.out
-pfile_write_from_Time_Out=fileName=case00.00.time_demux.rcc.Time_Out.out
../../gen/applications/case00.00.xml
Simulation HDL device lsim:xsim for xsim (UUID
7f145cbc-1823-11e9-b13d-a34c4663c689, dir
case00.00.time_demux.rcc.simulation/xsim.xsim.111335.0, ticks 100000000)
Available containers are: 0: lsim:xsim [model: hdl os: platform: xsim],
1: rcc0 [model: rcc os: linux platform: centos7]
Exiting for exception: No viable candidates found for instance
"file_write_from_Data_Out"
real 0m7.472s
user 0m6.677s
sys 0m0.804s
Execution FAILED(1) - see log in
run/centos7/case00.00.time_demux.rcc.log
make: *** [run] Error 1
make: Leaving directory `./training/training/components/time_demux.test'
```
The file time_demux.test/gen/applications/case00.00.xml had the following
content:
```
<application done='file_write_from_Data_Out'>
<instance component='ocpi.core.file_read' connect='time_demux_ms_Mux_In'>
<property name='filename' value='../../gen/inputs/case00.00.Mux_In'/>
<property name='messagesInFile' value='true'/>
</instance>
<instance component='ocpi.core.metadata_stressor'
name='time_demux_ms_Mux_In' connect='time_demux'>
</instance>
<instance component='ocpi.training.time_demux' name='time_demux'/>
<instance component='ocpi.core.backpressure' name='bp_from_Data_Out'
connect='file_write_from_Data_Out'>
<property name='enable_select' value='true'/>
</instance>
<instance component='ocpi.core.file_write'
name='file_write_from_Data_Out'/>
<connection>
<port instance='time_demux' name='Data_Out'/>
<port instance='file_write_from_Data_Out' name='in'/>
</connection>
<instance component='ocpi.core.backpressure' name='bp_from_Time_Out'
connect='file_write_from_Time_Out'>
<property name='enable_select' value='true'/>
</instance>
<instance component='ocpi.core.file_write'
name='file_write_from_Time_Out'/>
<connection>
<port instance='time_demux' name='Time_Out'/>
<port instance='file_write_from_Time_Out' name='in'/>
</connection>
</application>
```
The connections are attempting to reference "file_write_from_Data_Out" and
"file_write_from_Time_Out" which are already connected to the
"backpressure" components. These connections should instead reference the
"backpressure" components "bp_from_Data_Out" and "bp_from_Time_Out",
respectively.
*** Side Note ***
In Lab5, an incorrect port order for:
<Port name="Data_Out" producer="true"
protocol="iqstream_protocol"></Port>
<Port name="Time_Out" producer="true"
protocol="iqstream_with_sync_protocol"></Port>
Caused the unit test execution to hang. This port ordering requirement was
mentioned in the spec sheet PDF, but I missed it and spend quite a lot of
time debugging the execution hang. It would be nice to mention this port
order requirement in the lab presentation on page 6 (
https://github.com/opencpi/training/blob/master/PDFs/presentations/Lab5_TimeDemux.pdf
).
Thanks,
Josh Schindehette
Received on Mon Jan 14 2019 - 17:51:46 CST