10-13-2013 11:53 PM
I have a question about showing color bar on display.
I have two dualram. They are image buffer.
I read color data from this 2 DRAM and show on screen.
Vcounter and Hcounter of display counter are mapped to address of memory.
I have set the read adress of both memory to a unique number,for example (170,170).
and I want to show just this pixel, but in this way it doesn't show me any thing.
Could you please guide me is it pssible to show just one pixel on display?
10-13-2013 11:57 PM
10-14-2013 12:12 AM - edited 10-14-2013 12:13 AM
your goal is to keep the data sent to the screen constant, by keeping the read adress constant.
Basically a good idea, but:
What about the writing adress and data? The value at the reading position might be overwritten.
Also it depends on the rest of your architecture.
Is the read adress used in the sync generation later on?
If you made it wrong the syncs will have a bad timing, so nothing will be seen on the screen.
If you want to do hardware debugging on this level, make it in a save way.
Create a 2:1 mux, that feeds the video data from the RAM or some constant value.
Drive the mux selector from a constant or a generic.
Thus the synthesis will either create nothing (Mux input set to BRAM)
or it will disconnect the BRAM output and tie the data input to constants (Mux input set to constant).
You might get some warnings about open BRAM outputs but you know when to ignore them.
However, you should always do some simulations first.
Have a nice synthesis.
10-14-2013 01:04 AM - edited 10-14-2013 01:05 AM
Thanks for your replies.
I think it's better to explain more about my goal.
I have attached my code and and a paint to show as something that I need.
The data was written into DRAMs from ROM. It means I have 2 DRAM full of color data, and now I don't want to show all the data on screen and I want to have just one pixel on screen.
I'm going to show just this pixel(as an example) and other pixels remain black.
The vtc_demo is out of XAPP495.
I have added DRAM and select DATA parts -as I wrote in my code- to it.
I thought about mux, but I wasn't sure that is it the efficiet way or not.
10-14-2013 01:16 AM - edited 10-14-2013 01:21 AM
I'm going to read data from memory. How can I do that? How can I make my design to draw something on screen?
is there ay users guide about it? Now I will search about it.
about MUX, I think I should have a big MUX, the number of selector bits should be equal the number of address bit. to select the selected address that I want to show on screen. Am I right?
10-14-2013 05:49 AM
ok, to acheive the stuff shown in the picture you neen a mux and some comparators for vertical and horizontal position (or address).
In some behavioral pseudocode it will look like this:
if (vpos=170) and (hpos=170) then
Pixeldata = RGB_Black_constant;
It looks like you changed a lot of things in the code you have posted, so you surely know where to place this mux-code.
The reference design seems to be some mighty code, capable of handling a lot of Video-modes and timings.
I hope there isn't just some simple typing error (e.g. wrong clock) that causes the strange behavior.
Have a nice synthesis
10-14-2013 05:59 AM
don't be too hasty and mix things up.
There is some picture RAM in the design.
In order to get that picture on the screen, you need to synchronize the reading of the RAM with the position on the display.
It depends on the system design if there is a easy correlation between these values, so the same counter might be used for that purpose.
The RAM should be Dual-Ported, which comes for free in Xilinx FPGAs.
Thus you can write to the RAM independently from the reading and update the video memory to draw new stuff to the screen.
How to generate that data is up to you.
If you have some MUX where the number of selector bits is equal to the number of address bits you use, you eitehr end up in some extreme waste of logic or... a RAM again. Because that's how a RAM works, Multiplexing (or adressing) from a number of constants.
The proposed extra MUX is just for debugging purposes, together with the adress mask to identify a single pixel on the screen.
Have a nice synthesis