cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
5,036 Views

Pixel on display

Hello,

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?

 

Thanks

0 Kudos
Reply
7 Replies
muzaffer
Teacher
Teacher
5,034 Views
Registered: ‎03-31-2012

If I understand the question correctly, the answer is that there is no "one pixel" display. Every time you have to paint the whole screen with something. If you want to apply a mask, you have to design your image display to draw, say black, for all bits which are set in the mask and the actual frame value for the bits in mask which are not black.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply
eilert
Teacher
Teacher
5,032 Views
Registered: ‎08-14-2007

Hi,

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.

e.g.

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.

   Eilert

0 Kudos
Reply
Anonymous
Not applicable
5,034 Views

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.

 

 

pixel.png

0 Kudos
Reply
Anonymous
Not applicable
5,027 Views

about MASK,

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?

0 Kudos
Reply
eilert
Teacher
Teacher
5,015 Views
Registered: ‎08-14-2007

Hi,

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=Ramdata;

else

 Pixeldata = RGB_Black_constant;

end

 

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

  Eilert

 

0 Kudos
Reply
eilert
Teacher
Teacher
5,014 Views
Registered: ‎08-14-2007

Hi,

don't be too hasty and mix things up.

Think carefully.

 

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

  Eilert

 

Anonymous
Not applicable
4,973 Views

Thanks for your guidance.

I've fixed the problem.

 

0 Kudos
Reply