• 0
trian

Basys3 Memory

Question

For a project, I need to store the data comes from a camera and another data image from a laptop in Basys3. I am quite new at these stuff so I couldn't be sure if I can store both of them to make effects and combine them. Can I do it on Basys3? Can SPI Flash memory and SRAM based memory cells in it be used?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

@trian,

Truly answering this question is rather complex and will likely depend upon more details than you have shared.  You'll need to check the camera and display's I/O capabilities, the FPGAs I/O capabilities, pixel clock rates, the size of the display in pixels, your memory bandwidth and more.  If you intend to have a CPU on board, you'll also need to make sure you allocate space for it's memory.  That's a lot of analysis you'll need to do.  It's doable, but expect to make a couple mistakes along the way.  We all do.  Some of us seem to make more than others ...

I personally tried to do something similar (framebuffer to VGA output) using the Basys3 only to discover in hindsight that it doesn't have a lot of internal RAM.  The Basys3 doesn't come with any off-chip RAM, so if you want RAM all you have to work with is the block RAM.  In my own design, I only managed to scrounge 128kB together before running out of resources on chip.  I was then sadly disappointed when I couldn't fit any decent sized framebuffer on the Basys3.  What good is a VGA when you don't have a framebuffer?

Instead, I used flash memory as a ROM-based framebuffer.  Flash, however, is slow so it took a lot of work to get it fast enough.  (I compressed my images)  This allowed me to present a basic slide-show at 640x480.  I haven't tried higher resolutions (yet).  At the time, I thought I'd never do any better and gave up trying.

I later discovered that someone on Digilent's staff (I'll let her remain nameless ...) and often on the forum had managed to get a lot of PacMan running in this small memory space.  (The project was never complete, collision detection I hear didn't (yet) work by the time the project needed to be handed in.  Probably why she doesn't share more ...)  So, careful engineering can overcome a lot of problems.  You may find yourself limited by your creativity.  Certainly necessity is the mother of many inventions.

In light of all of this, I'd recommend looking into an off-chip RAM of some-type.  Perhaps a hyperRAM?  Be aware, though, if you are new at this then you'll have a challenge ahead of you to get something you are unfamiliar with working--even if you choose to use someone else's "proven" core.

Dan

Share this post


Link to post
Share on other sites
  • 0

Do your homework when selecting external memory. HyperRam is OK if you are doing memory operations with significant burst lengths. For random read-write operations it's likely to disappoint.

16 hours ago, D@n said:

That's a lot of analysis you'll need to do.

Well this is good advice for almost every project. Make sure that your platform can support the requirements of your project needs.

Share this post


Link to post
Share on other sites
  • 0

Thank you so much for your answers. Now at least I know what to look for. 

I am trying to do the green screen effect using BASYS3. I thought I can get the background image that will replace the green screen from a computer by the connection from UART but at first, I think I need to convert the image into a binary text file for BASYS3. Then, by the help of a camera (OV7670), I think I can get the foreground object's data. OV7670 already gives me 640x480 pixel image at most. So, by compressing the image (like 1 pixel for every 4 pixel), blockRAM should be enough I guess?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now