Hi, Would someone explainme why and how to correct the following: Using the ADSP-2116x simulator for ADSP-21160, if I set the SPEN bit on SRCTL1 the simulator shows a dialog where stands "Port doesn't exist or isn't opened". I set for example like this: And when stepping after tha last instruction I get the message. How can I simulate usage of this serial port? Thanks! Jaime Andr Aranguren Cardona /">Yahoo! Mail. |
|
Simulating Serial Ports in VDSP++2.0 for SHARC
Hello, All the following below my signaure is from a former thread in comp.dsp. It is for me well understood how to set up the serial port streaming simulation in VDSP++. I simulate the code from EE- 104 "Setting Up Streams with the VisualDSP Debugger - Release 4.x", which I fully understand, and it works flawlessly. I can even write the data back to another stream, and it is ok, the data is received and transmitted. Now I try to do the same for a 21065L (in the simulator). The actual data written for configuring the SRCTL0 and STCTL0 is the same, in order to achieve the same functionality than for the 21062, which is the DSP originally simulated in EE-104. I checked bit-by-bit on both manuals (for 062 and 065L), and with the settings in the original program for 062, it should work for 065L. Here is the actual setup code for 065L, using RX0_B: r0=0x001F0001; /* customer test settings yields 2000 cycles for 30 values*/ dm(RDIV0)=r0; /* sclock=CLKIN/8, framerate=sclock/20.*/ r0=0x001F0001; /* customer test settings */ dm(TDIV0)=r0; /* sclock=CLKIN/8, framerate=sclock/20.*/ r0=0x010065f0; /* SRCTL0 Register:*/ dm(SRCTL0)=r0; /* SPEN=1,(SPORT enabled)*/ /* SLEN1 (32-bit word)*/ /* ICLK=1, (internal rx clock)*/ /* RFSR=1, (require RFS)*/ /* IRFS=1, (internal RFS)*/ r0=0x010065f0; /* STCTL0 Register:*/ dm(STCTL0)=r0; /* SPEN=1,(SPORT enabled)*/ /* SLEN1 (32-bit word)*/ /* ICLK=1, (internal tx clock)*/ /* TFSR=1, (require TFS)*/ /* ITFS=1, (internal TFS)*/ /* DITFS=0,(data dependent FS), all other bits=0*/ bit set imask SPR0I; /* Enable sport 0 rx interrupt.*/ bit set mode1 IRPTEN; /* Global interrupt enable.*/ r0=0x0; /* Write first value into tx to kick off sport. */ dm(TX0_B)=r0; I set upt the streams in VDSP, but when I run the program a Dialog appears saying "*** Port doesn't exist or isn't opened ***" Why, if it worked for the other DSP (21062)? Niether works if using RX0_A (and changing the values for SRCTL0 and STCTL0 to 0x000065f1) Please guys, I need your help. Furthermore, if one of you is able to _succesfully_ use the Serial Port stream simulation functionality for an ADSP-21160, even better. I wanted to start with the "working example", but haven't been able to get it running for other processors different than the 21062. Kindest regards from the tropics, JaaC "winger" <> wrote in message news:. > Jim Thomas <> wrote in message news:<>... > > winger wrote: > > > > > > Now I am just testing the function,but I have no emulator,so all i can > > > do is simulation.Below is my question: > > > how to read the bitstream from a file(.dat),the data is very big,no > > > way to put them in on_chip/off_chip memory. > > > visual dsp debugger application 2.3 > > > on the same time how to write the result to a file? > > > > > > is there anybody can help? > > > > > > thanks in advance! > > > > > > winger > > > > You could set up a serial port as the data source. The > > Settings->Streams menu inthe simulator will allow you to "connect" a > > serial port to a file for reading or for writing. > > thx Jim > I also wanna write the result to a file when read the source from a source file. > But the simulator only do one job,how can do? The simulator can simultaneously read and write to 2 different files if you 'connect' serial ports to the files using Jim's suggestions. In your program, you need to setup the serial port and write to it. The simulator can take this data and write it to a file. The read works similarly. Cheers Bhaskar |
|
Hi i had tried the simulation of serial port transmission in visual dsp++ 2.0 simulator environment for the 21065L. it works properly. my configuration is not as same as ur configuration. for my specific application i configured TX1_A and RX1_A for communication at multichannel mode. The vdsp2.0 tool is itself have a problem for DMA simulation for 21065L (pls check : http://www.analog.com/Analog_Root/sitePage/mainSectionContent/0% 2C2132%2Clevel4%253D%25252D1%2526ContentID%253D10928%2526level1% 253D205%2526level2%253D%25252D1%2526level3%253D%25252D1%2C00.html Anomaly no. : 9268 but for my case i first tried the absolute address of receive and transmit buffers are written to the index registers of corresponding DMA channels. but on simulation the first data recieved frm RX1_A or transmitted through TX1_A is not properly written to their respective location.(receive buffer for RX1_A and output file for TX1_A). but when i change the address to absolute address - 0x8000(starting address of 21065L) , the steaming simulation is working properly. i also encountered the same problem "*** Port doesn't exist or isn't opened ***" , when i am not properly configuring the streaming parameter. (The data acquisition routine is for a AC97 complaint codec. 8-32bit word array for total 256bit frame) below is my register and TCB configuration for simulation from C- routine // Set up tansmit DMA tcb xmit_tcb[7] = (int)tx_buff - 0x8000; // internal dma address xmit_tcb[6] = 1; // internal modifier xmit_tcb[5] = 5; // internal count xmit_tcb[4] = (((int)&xmit_tcb[7])&0x0001ffff)|0x00020000; // set the pci bit on transmit block chain pointer xmit_tcb[3] = 0; xmit_tcb[2] = 0; xmit_tcb[1] = 0; xmit_tcb[0] = 0; // Set up receive DMA tcb rcv_tcb[7] = (int)rx_buff - 0x8000;// internal dma address rcv_tcb[6] = 1; // internal modifier rcv_tcb[5] = 3; // internal count rcv_tcb[4] = (((int)&rcv_tcb[7])&0x0001ffff); // receive block chain pointer rcv_tcb[3] = 0; rcv_tcb[2] = 0; rcv_tcb[1] = 0; rcv_tcb[0] = 0; *((int *)MTCS1) =0x001f; // 5 channels enabled // transmit on 0,1,2,3,4 *((int *)MRCS1) = 0x0007; //3 channels enabled // receive on 0,1,2 *((int *)MTCCS1) = 0; // no companding on transmit *((int *)MRCCS1) = 0; // no companding on receive *((int *)RDIV1) = 0x00FF0001; *((int *)TDIV1) = 0x00FF0001; *((int *)STCTL1) = 0x001c11f2; // slen = 31, sden & schen enabled *((int *)SRCTL1) = 0x078c45f2; *((int*)CPT1A) = xmit_tcb[4]; // DMA transfer starts *((int*)CPR1A) = rcv_tcb[4]; // DMA reception starts i think this may help u. regards ajith --- In , "jaime_aranguren <jaime_aranguren@y...>" <jaime_aranguren@y...> wrote: > Hello, > > All the following below my signaure is from a former thread in > comp.dsp. It is for me well understood how to set up the serial port > streaming simulation in VDSP++. I simulate the code from EE- > 104 "Setting Up Streams with the VisualDSP Debugger - Release 4.x", > which I fully understand, and it works flawlessly. I can even write > the data back to another stream, and it is ok, the data is received > and transmitted. > > Now I try to do the same for a 21065L (in the simulator). The actual > data written for configuring the SRCTL0 and STCTL0 is the same, in > order to achieve the same functionality than for the 21062, which is > the DSP originally simulated in EE-104. I checked bit-by-bit on both > manuals (for 062 and 065L), and with the settings in the original > program for 062, it should work for 065L. Here is the actual setup > code for 065L, using RX0_B: > > r0=0x001F0001; /* customer test settings yields 2000 cycles for 30 > values*/ > dm(RDIV0)=r0; /* sclock=CLKIN/8, framerate=sclock/20.*/ > > r0=0x001F0001; /* customer test settings */ > dm(TDIV0)=r0; /* sclock=CLKIN/8, framerate=sclock/20.*/ > > r0=0x010065f0; /* SRCTL0 Register:*/ > dm(SRCTL0)=r0; /* SPEN=1,(SPORT enabled)*/ > /* SLEN1 (32-bit word)*/ > /* ICLK=1, (internal rx clock)*/ > /* RFSR=1, (require RFS)*/ > /* IRFS=1, (internal RFS)*/ > > r0=0x010065f0; /* STCTL0 Register:*/ > dm(STCTL0)=r0; /* SPEN=1,(SPORT enabled)*/ > /* SLEN1 (32-bit word)*/ > /* ICLK=1, (internal tx clock)*/ > /* TFSR=1, (require TFS)*/ > /* ITFS=1, (internal TFS)*/ > /* DITFS=0,(data dependent FS), all other bits=0*/ > > bit set imask SPR0I; /* Enable sport 0 rx interrupt.*/ > bit set mode1 IRPTEN; /* Global interrupt enable.*/ > > r0=0x0; /* Write first value into tx to kick off sport. */ > dm(TX0_B)=r0; > > I set upt the streams in VDSP, but when I run the program a Dialog > appears saying "*** Port doesn't exist or isn't opened ***" Why, if > it worked for the other DSP (21062)? Niether works if using RX0_A > (and changing the values for SRCTL0 and STCTL0 to 0x000065f1) > > Please guys, I need your help. Furthermore, if one of you is able to > _succesfully_ use the Serial Port stream simulation functionality for > an ADSP-21160, even better. I wanted to start with the "working > example", but haven't been able to get it running for other > processors different than the 21062. > > Kindest regards from the tropics, > > JaaC > > "winger" <iambull@2...> wrote in message > news:44810a46.0205211904.4dd75584@p... > > Jim Thomas <jthomas@b...> wrote in message > news:<3CEA5566.5CAB25E3@b...>... > > > winger wrote: > > > > > > > > Now I am just testing the function,but I have no emulator,so > all i can > > > > do is simulation.Below is my question: > > > > how to read the bitstream from a file(.dat),the data is very > big,no > > > > way to put them in on_chip/off_chip memory. > > > > visual dsp debugger application 2.3 > > > > on the same time how to write the result to a file? > > > > > > > > is there anybody can help? > > > > > > > > thanks in advance! > > > > > > > > winger > > > > > > You could set up a serial port as the data source. The > > > Settings->Streams menu inthe simulator will allow you > to "connect" a > > > serial port to a file for reading or for writing. > > > > thx Jim > > I also wanna write the result to a file when read the source from a > source file. > > But the simulator only do one job,how can do? > > The simulator can simultaneously read and write to 2 different files > if you > 'connect' serial ports to the files using Jim's suggestions. > In your program, you need to setup the serial port and write to it. > The > simulator can take this data and write it to a file. > The read works similarly. > > Cheers > Bhaskar |
|
Thanks folks. Fortunately I got it solved. Even got it working properly for chained DMA acquisition, ideal for block processing (which is what I really need). Kindest regards, JaaC "ajith_pc <a...@yahoo.com>" <a...@yahoo.com> wrote: Hi Jaime Andr Aranguren Cardona |