image storing into BRAM

dear all, i want to store image from PC to BRAM of an FPGA.i have image 192x96 size.

1) which type of interfacing should i use to transfer image into BRAM from PC

2) how to write a program for it? do you have any material on this please tell me.

and i wrote a program for it.it is synthesizer. but how to sending my pixel values i am not getting. see below my code.

library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all;

entity BRAM is port (CLK : in std_logic; WE : in std_logic; EN : in std_logic; ADDR : in std_logic_vector(14 downto 0); DI : in std_logic_vector(7 downto 0); DO : out std_logic_vector(7 downto 0)); end BRAM;

architecture syn of BRAM is type ram_type is array (18431 downto 0) of std_logic_vector (7 downto

0);

signal RAM: ram_type; begin

process (CLK) begin if CLK'event and CLK = '1' then if EN = '1' then if WE = '1' then RAM(conv_integer(ADDR))

Reply to
balajigec
Loading thread data ...

I remember there was a picoBlaze-related program that could update BRAM in a compiled bitstream with any userdata.

Reply to
valtih1978

Data2MEM is the tool I think you're thinking of.

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
 Click to see the full signature
Reply to
Martin Thompson

in a

I do hope the OP enjoys reading The Fine Data2mem Manual (UG437, for those of a curious turn of mind).

--------------------------------------- Posted through

formatting link

Reply to
RCIngham

Your question is very, very vague. It's not even clear what you're asking, though if I were to take a wild guess, I'd say you want to know how to get the data from the PC and store it in the BRAM.

This is very open-ended and depends on a lot of things, there are many ways you can do it.. no single answer here.

What communication protocol would you like to use? RS232, USB, something else? You need something in the FPGA that can receive your data stream.

Then, you can either write a state machine which takes the data that you've received and figures out where to put it, or you could put a soft CPU in there and write an embedded program that could do the same thing. My full answer to this would also depend on what FPGA vendor you're using, and what other hardware and interfaces are on board, assuming you are using some already existing dev board or something of that sort...

Supposing I was using a Xilinx FPGA to do this, I might go with a Picoblaze soft microcontroller and a simple UART or similar. If I want data faster than a UART can provide (sometimes I do), then I might use an FTDI chip FT245, which works just like a serial port on the host PC side, but gives the data to your device in parallel, 8-bits, and several times faster than the best you can probably do with a UART. If I still need something faster, then maybe I'd go for a Cypress FX2 USB controller, which many FPGA dev boards happen to have on board. That'd be overkill for what you're doing, but a good learning experience anyway, if you happen to be using a board that has this.

Anyway, be more specific about what you have to work with and what you're trying to do, and I'm sure I or somebody else here would be happy to point you in the right direction.

Steve

Reply to
GrizzlySteve

Hi,

I tried to respond to this yesterday but it seems that my post didn't show up? So I'll try again.

What you are actually trying to do, and what you are asking is very unclear, but I assume you mean that you would like to know how to load data into the memory from the PC side. There are a number of ways to do this, and it really depends on what hardware you have, what kind of data rate you want, etc.

Also from your code I see that you are using the same address input to control both the writing and the reading, but you can have separate address inputs for read/write, that will be much more convenient for what I think you are probably trying to do overall.

Lastly, what kind of hardware do you have, and what kind of interface do you want with the host PC side? USB? A regular old serial port? You can write a state machine in VHDL to process incoming communication, or you can use a soft microcontroller; For a small application like what I suspect you are possibly trying to do, I might use a Picoblaze core, if I was using a Xilinx FPGA.. for other vendors there are other solutions, or there are similar solutions that will work for all vendors (various soft CPUs available at OpenCores).

You will have to be more clear on what you're actually trying to do, if you would like help.. but hopefully what I've said here will give you at least an idea of what direction to take.

Steve

Reply to
GrizzlySteve

Oops, sorry about the double replies.

I don't have a usenet server, and Google Groups just plain sucks. It didn't even show me that there were a couple of replies already, and when my first one went through it said "post was successful" but even a day later the post didn't show up.

So I'll start using fpgarelated.com for now, since it seems to be better than Google Groups at least.

Anyway, my assumption is that the OP wants to load data into the bram at runtime, not when generating programming file? In that case data2mem doesn't help.

--------------------------------------- Posted through

formatting link

Reply to
sbattazzo

I use SeaMonkey as a news client, with Eternal September (free) as the server. Works well for me.

Reply to
Pete Fraser

Cool, thanks! I had looked around for free servers, but I missed over this one.

Reply to
Steve B

thanks for reply,

actually i am using nexys 2 board, and i have USB protocal.i want to send image pixels to BRAM of FPGA.

--------------------------------------- Posted through

formatting link

Reply to
balajigec

Hi Balaji,

were you able to get over your project, to be able to communicate with Nexys2 board via USB?

It will be great to hear from you. At the moment I am struggling with the same problem, where to start, what do do and so on.

I want to transfer a file from PC to Nexys 2 Bram via USB.

Hope you or anybody can help me

Thank you in advance. Best regards, Vidya.

Reply to
vidyasagar.kantamneni

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.