Code Monkey home page Code Monkey logo

Comments (4)

WillGreen avatar WillGreen commented on August 15, 2024

Peepo,

Thank you for your message. You've not said what FPGA you're using so it's hard to be specific, but I'll do my best to help.

Buffering Row
You can use ram to buffer rows of pixels as required. The dimensions of your buffer depend on the bit depth of the data, for example if you have a row of 320 x 8-bit pixels you need something like: reg [7:0] line_buffer [0:319]. This will use logic gates to create ram in Vivado; if you want to use block ram (see clock domain answer, below) then see the sram module in https://timetoexplore.net/blog/arty-fpga-vga-verilog-03

Pixel Doubling on Rows and Duplicating Rows
I'm guessing you're trying to scale 320x240 to 640x480 for display? Rather than scale your data up, you can adjust the co-ordinates generated by the vga640x480 module.

For example, to turn 640x480 into 320x240 use a right shift to divide by two:

wire [7:0] o_x_qvga = o_x >> 1;
wire [8:0] o_y_qvga = o_y >> 1;

That way every pixel of camera data will be shown on two pixels on the display.
To repeat a line use a buffering row as you've mentioned.

Horizontal Sync Fix
I'm not sure what you mean by this. Are you trying to match horizontal sync of the display to the camera?

Clock Domain Crossing
Clock domain crossing is a big and complex topic. However, you may be able to avoid the issue by using dual-port block ram (BRAM). For example, you can have your camera data written to port A at frequency X and the display controller read data from port B at frequency Y. If you're using Xilinx FPGAs then you can find a dual-port block ram template in Vivado.

from timetoexplore.

peepo avatar peepo commented on August 15, 2024

Will,

thanks for the prompt response,

as you suggest: I am trying to scale 320x240 to 640x480 for display,
and I cannot find an example anywhere...

I am still confused, after further consideration I think I forgot to include the requirement:
the end or start of blanking keeps the display in sync with camera,
and the display uses a counter to create its hsync and vsync
is that correct?

a working example would be great!

ie the input is say 6.28 mhz and display is 25.12mhz
and as I understand it the hsync will be timed differently,
ie ~262/frame from the camera and 525 to the display.

from timetoexplore.

WillGreen avatar WillGreen commented on August 15, 2024

Peepo,

I'm afraid this isn't something I can quickly rustle up a example for you.
Good luck with your project.

Will

from timetoexplore.

peepo avatar peepo commented on August 15, 2024

appreciated!

does seem extraordinary that binning is universal,
and its complement not found....

from timetoexplore.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.