DSPRelated.com
Forums

Query regarding Simulating LinkPorts for 21060 using VDSP++

Started by pnswamy February 1, 2002
Hi,
I am trying to write functions to transmit and receive data thru Linkports
using DMA.
As I am working on the simulator, I am assigning same port to both the Tx and Rx
Link Buffers. I am performing the following functions:
1. LAR settings to assign a port TxBuf and RxBuf.
2. LCOM setting
3. Transmit()
{
i. Initialize DMA parameter registers corresponding to TxBuf.
ii. Enable TxBuf in Tx mode with DMA enabled, by writing appropriate
bits of LCTL.
(RxLBUF is not yet enabled).
}
4. Receive()
{
i. Initialize DMA parameter registers corresponding to RxBuf.
ii. Enable RxBuf in Rx mode with DMA enabled, by writing appropriate
bits of LCTL.
(RxLBUF is enabled now).
iii. Enable interrupt on Receive buffer.
} What is happening is, after enabling TxBuf, it gives an error message reading
"Port doesn't exist or isn't opened", and halts.

What could be the reason for this?
If I perform a loopback by enabling both the buffers simultaneously, it's
working fine.

Could anybody plz explain me the reasons behind it.

Thanks and Regards,
P Narayana Swamy



I haven't read up on the 21160 chips yet, but I'm not sure what you
are trying to do by assigning the same port to both receive and
transmit?? This won't work.
The way to simulate serial and link port dmas is to either put them
in loopback mode or use the Simulator and setup a file stream. (under
Settings-> Streams).
You can specify a file with data in it and assign that to your port.

The error you mentioned is typically generated when you don't set
this up in the simulator or, your port control settings are
conflicting.

Cheers
Bhaskar

--- In adsp@y..., "pnswamy" <pnswamy@s...> wrote:
> Hi,
> I am trying to write functions to transmit and receive data
thru Linkports using DMA.
> As I am working on the simulator, I am assigning same port to both
the Tx and Rx Link Buffers. I am performing the following functions:
> 1. LAR settings to assign a port TxBuf and RxBuf.
> 2. LCOM setting
> 3. Transmit()
> {
> i. Initialize DMA parameter registers corresponding to
TxBuf.
> ii. Enable TxBuf in Tx mode with DMA enabled, by writing
appropriate bits of LCTL.
> (RxLBUF is not yet enabled).
> }
> 4. Receive()
> {
> i. Initialize DMA parameter registers corresponding to
RxBuf.
> ii. Enable RxBuf in Rx mode with DMA enabled, by writing
appropriate bits of LCTL.
> (RxLBUF is enabled now).
> iii. Enable interrupt on Receive buffer.
> } > What is happening is, after enabling TxBuf, it gives an error
message reading "Port doesn't exist or isn't opened", and halts.
>
> What could be the reason for this?
> If I perform a loopback by enabling both the buffers
simultaneously, it's working fine.
>
> Could anybody plz explain me the reasons behind it.
>
> Thanks and Regards,
> P Narayana Swamy