UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor awetman
Visitor
9,861 Views
Registered: ‎05-05-2009

How to import data into SRAM?How to export data from SRAM

I use Spartan3 Starter Board,which has a fast,asynchronous SRAM.

I want to design a circuit which gets some input data from SRAM,processes them,and then store the results into SRAM.Is this feasible?

Question:

#1 How to import the original input data into SRAM from a data file?Can we control it in command line?

#2 How to export the result data from SRAM and put them into a data file?Can we control it in command line?

#3 If we cannot do them,how can we verify our circuit?Any advice is welcome.

0 Kudos
9 Replies
Historian
Historian
9,834 Views
Registered: ‎02-25-2008

Re: How to import data into SRAM?How to export data from SRAM


awetman wrote:

I use Spartan3 Starter Board,which has a fast,asynchronous SRAM.

I want to design a circuit which gets some input data from SRAM,processes them,and then store the results into SRAM.Is this feasible?

Question:

#1 How to import the original input data into SRAM from a data file?Can we control it in command line?

#2 How to export the result data from SRAM and put them into a data file?Can we control it in command line?

#3 If we cannot do them,how can we verify our circuit?Any advice is welcome.


#1 What is the source of the "original data"? What "command line"?

#2 Where should this data file live? What "command line"?

 

-a

----------------------------Yes, I do this for a living.
0 Kudos
Visitor awetman
Visitor
9,831 Views
Registered: ‎05-05-2009

Re: How to import data into SRAM?How to export data from SRAM

The input data is stored in a file.For example, when we do the simulation,we can call the system task $readmemb and import the input data into our internal registers.I want to do the in-circuit verification after getting the bitstream file of our design.But how can our circuit get the input data?We just use some switch or buttons on the FPGA board?That is not good.

I think our circuit should fetch input data from SRAM.But where do data in SRAM come from?Is there a command for control?I know xst is a command for synthesis,ngdbuild for translation,map for map,par for place and route,bitgen for generating bitstream file.What is the command for importing data into SRAM?

And,when we generate some results,we store them into the SRAM?How can export them?What is the command?

0 Kudos
Historian
Historian
9,810 Views
Registered: ‎02-25-2008

Re: How to import data into SRAM?How to export data from SRAM


awetman wrote:

The input data is stored in a file.For example, when we do the simulation,we can call the system task $readmemb and import the input data into our internal registers.I want to do the in-circuit verification after getting the bitstream file of our design.But how can our circuit get the input data?We just use some switch or buttons on the FPGA board?That is not good.

I think our circuit should fetch input data from SRAM.But where do data in SRAM come from?Is there a command for control?I know xst is a command for synthesis,ngdbuild for translation,map for map,par for place and route,bitgen for generating bitstream file.What is the command for importing data into SRAM?

And,when we generate some results,we store them into the SRAM?How can export them?What is the command?


So the data are stored in a file. Where is this file? On your computer? In the cat box?

 

You have to determine the connection between where the file lives and your design. Only then can you address the issue of getting it into your memory.

 

-a

----------------------------Yes, I do this for a living.
0 Kudos
Visitor awetman
Visitor
9,805 Views
Registered: ‎05-05-2009

Re: How to import data into SRAM?How to export data from SRAM

The data file is stored in my computer.

I wish to import it into the memory before our in-circuit verification, and export the result from the memory after all data are processed and store it in my computer.

Can IMPACT help me?Is there a command?

Thanks a lot.

0 Kudos
Explorer
Explorer
9,789 Views
Registered: ‎11-07-2008

Re: How to import data into SRAM?How to export data from SRAM

Hi,

I have a suggestion, though I dont know if its feasible or any valuable.

If the data for your SDRAM is in binary format:

1. You could design in a MIG (Memory Interface Generator) in your design and may be with some kind of flip/switch mechanism you can write data (the input data which you want to store on RAM) to your SDRAM after you configure your FPGA.

2. When done with that process, you could flip back the switch and allow normal operation. Now when you process your data in your application, with the help of same MIG you can write the processed data back to the SDRAM.

 

hope this helps.

 

Shax

0 Kudos
Visitor rwmage
Visitor
9,706 Views
Registered: ‎05-17-2009

Re: How to import data into SRAM?How to export data from SRAM

I would implement an interface via ethernet or serial port. You need a deign on the FPGA to communicate a file via serial port to block in RAM and vice versa. You can even implement XModem, YModem, Kermit. Or TFTP on ethernet.

 

It all depends on if you have a CPU core or other suitable logic on the FPGA (A serial buffer for UART and counters etc to RAM adress is a simple scheme with out CPU, perhaps an I2C style or similar RAM addressing protocol via the UART with suitable registers/counters on the FPGA)

 

But Impact is for JTAG. It can't easily transfer to any device not on a JTAG chain.

 

0 Kudos
Visitor awetman
Visitor
9,525 Views
Registered: ‎05-05-2009

How does computer communicate with FPGA

we hope to generate  signas in computer,and send the signals to FPGA.

The latter generate the received signals and process them.

After processing,it sends generated signals to computer.

In computer, we want to draw the wave of signals from FPGA

 simple example:

module lnot (input a,output b);
    assign b=~a;
endmodule

We want to generate a in computer,and send it to FPGA.The "lnot" circuits is downloaded into FPGA board.It need signal a and will generate signal b.I hope FPGA board can send b to computer so that computer can receive the signal b and verify its correctness.

 

Is there any available tool which can do that?

0 Kudos
Visitor atatt2020
Visitor
9,449 Views
Registered: ‎05-01-2009

Re: How to import data into SRAM?How to export data from SRAM

Hi to all...

 

I have the same problem as awetman but in less questions:

 

in the part that related to load a SRAM by data signal i used MATLAB to convert it into binary form aand load it from workspace into a file with txt extension (simply can created with note pad) in a specified format and i used the core generator to create the ram and to load this data (the format of the data can be obtain from the block memory generator ip core ).

 

but my question is :

How can i get the data after processing in my designed cct to MATLAB again (or any were in my computer) , I want to read this data from ISE after simulation , not from the kit after downloading to fpga.

 

Thanks

0 Kudos
Visitor atatt2020
Visitor
9,448 Views
Registered: ‎05-01-2009

Re: How to import data into SRAM?How to export data from SRAM

also, the processed data was written to the same ram.
0 Kudos