Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

send data from pc to FPGA & vice versa through RS232 serial cable

Status
Not open for further replies.

ritu.vlsi

Newbie level 3
Joined
May 9, 2012
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,315
I want to send values of two matrix from two seperate .txt files to Spartan 3 starter FPGA kit through RS232 cable after that I want to add those matrix.Resultant matrix will be shown from hyperterminal.
I have already designed the hardware using MicroBlaze Processor in xilinx edk 10.1i and made the connection between PC to FPGA using RS232 During this process I am getting a C file as shown below before generating the bit file,
* Your XPS project directory is at:

* C:\sankha\

*/





// Located in: microblaze_0/include/xparameters.h

#include "xparameters.h"



#include "stdio.h"



#include "xutil.h"



//====================================================



int main (void) {





/*

* Enable and initialize cache

*/

#if XPAR_MICROBLAZE_0_USE_ICACHE

microblaze_init_icache_range(0, XPAR_MICROBLAZE_0_CACHE_BYTE_SIZE);

microblaze_enable_icache();

#endif



#if XPAR_MICROBLAZE_0_USE_DCACHE

microblaze_init_dcache_range(0, XPAR_MICROBLAZE_0_DCACHE_BYTE_SIZE);

microblaze_enable_dcache();

#endif



print("-- Entering main() --\r\n");



/*

* MemoryTest routine will not be run for the memory at

* 0x00000000 (dlmb_cntlr)

* because it is being used to hold a part of this application program

*/



/*

* Disable cache and reinitialize it so that other

* applications can be run with no problems

*/

#if XPAR_MICROBLAZE_0_USE_DCACHE

microblaze_disable_dcache();

microblaze_init_dcache_range(0, XPAR_MICROBLAZE_0_DCACHE_BYTE_SIZE);

#endif



#if XPAR_MICROBLAZE_0_USE_ICACHE

microblaze_disable_icache();

microblaze_init_icache_range(0, XPAR_MICROBLAZE_0_CACHE_BYTE_SIZE);

#endif





print("-- Exiting main() --\r\n");

return 0;

}



After generating bitfile & downloading it I can see the output in hyperterminal as "Exiting main() Exiting main()" what C code I have to put to get the matrix addition result which will be shown in hyperterminal. Pls reply me!!!!!!
 

Look at this way first fo all you need to use two scanf statement in the loop for getting the matrix entries.......then you need to send matrix that you are saying as an input parameter to the scanf statement.... then you need to have some mechanisum to identify the matrix numbers like r u sening coloum wise or row-wise from the hyper terminal...... then you need a logic for adding two matrix and...... then you can use a printf statement in the loop for displaying matrix on hyperterminal.....

Good Luck
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top