Outils pour utilisateurs

Outils du site


en202:vga_bitmap

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
en202:vga_bitmap [2023/11/05 22:17] Yannick Bornaten202:vga_bitmap [2023/11/05 23:02] (Version actuelle) – [instanciation] Yannick Bornat
Ligne 1: Ligne 1:
 ====== Bitmap VGA output ====== ====== Bitmap VGA output ======
 +
 +**WARNING** : The module has recenty been updated... some information here might be obsolete... contact me for confirmation.
  
 Before the implementation of any of these modules, please, check if your design leaves enough memory resources for the required memory. Logic requirements are negligible and working frequency is high enough in most cases. Before the implementation of any of these modules, please, check if your design leaves enough memory resources for the required memory. Logic requirements are negligible and working frequency is high enough in most cases.
Ligne 11: Ligne 13:
   * reset is active high   * reset is active high
  
 +----
 +====instanciation====
 +
 +The most simple version is to be instanced with the following lines. Optional I/Os are not used, and might produce warnings, you can safely ignore them.
 +
 +
 +    display_module : entity work.vga_bitmap_640x480
 +        generic map(RAM_BPP  => 4,            -- number of bits per pixels
 +                    INDEXED  => 0,            -- do not used indexed colors
 +                    READBACK => 0)            -- read from bitmap memory disabled
 +                    
 +        port map(clk          => clk,         -- 100MHz system clock      
 +                 reset        => reset,       -- active high system reset
 +                 
 +                 VGA_hs       => VGA_hs,      -- VGA screen output
 +                 VGA_vs       => VGA_vs,
 +                 VGA_color    => VGA_color,
 +                 
 +                 pixel_x      => pixel_x,     -- pixel horizontal coordinate
 +                 pixel_y      => pixel_y,     -- pixel vertical coordinate
 +                 data_in      => data_in,     -- new color for the addressed pixel
 +                 data_write   => data_write); -- write order
 +
 +If data readback is required, it becomes :
 +  * **warning**: a 5 to 6 clock periods latency is necessary between the //data_read// assertion and //data_rout// assertion
 +  * data read requests can be pipelined
 +
 +
 +    display_module : entity work.vga_bitmap_640x480
 +        generic map(RAM_BPP  => 4,            -- number of bits per pixels
 +                    INDEXED  => 0,            -- do not used indexed colors
 +                    READBACK => 1)            -- read from bitmap memory enabled
 +                    
 +        port map(clk          => clk,         -- 100MHz system clock      
 +                 reset        => reset,       -- active high system reset
 +                 
 +                 VGA_hs       => VGA_hs,      -- VGA screen output
 +                 VGA_vs       => VGA_vs,
 +                 VGA_color    => VGA_color,
 +                 
 +                 pixel_x      => pixel_x,     -- pixel horizontal coordinate
 +                 pixel_y      => pixel_y,     -- pixel vertical coordinate
 +                 data_in      => data_in,     -- new color for the addressed pixel
 +                 data_write   => data_write,  -- write order
 +                 
 +                 data_read    => data_read,   -- read order
 +                 data_rout    => data_rout,   -- data read is ready
 +                 data_out     => data_out):   -- pixel read color
 +
 +The //end_of_frame// output signal might also be useful to synchronize display updates with screen refresh.
 ---- ----
 ==== addressing a pixel ==== ==== addressing a pixel ====
Ligne 78: Ligne 130:
  
 ===== memory usage (Artix 7) ===== ===== memory usage (Artix 7) =====
- 
-All combinations could not be tested, so the information below may be incomplete. Please not that the following values are given for the Artix 7 family synthetized with ISE 14.7 . 
-  * For 160x100, half RAM block use the ability to split a 36kb block into two 18kb blocks. So using the 3bpp color representation requires one 36kb block and one 18kb block (the second half of the 36kb block used is still available) 
-  * For 320x240, the synthetizer is not able to split blocks because of address counting, so using a 3bpp representation will actually require 8 blocks (7.5 rounded to 8). 
-  * For 640x480, memory requirements may be very high, resulting in very high implementation times.  
-  * Being only a machine, the synthetizer is not able to perform high optimizations. For example, it is possible to use only 5 36k-block RAMs to perform a 160x120 resolution with 8bpp, instead of 8 required by the synthetizer. Implementing this optimization could be a nice project :) 
  
 ^ resolution ^ ISE synthesis ^ greedy Vivado (v1.1 and previous) ^ ^ resolution ^ ISE synthesis ^ greedy Vivado (v1.1 and previous) ^
-^ 160x100 |  0.5 BRAM / bpp  | 0.5 BRAM / bpp  | 
-^ 160x120 |  1 BRAM / bpp    | 1 BRAM / bpp    | 
-^ 320x200 |  2 BRAM / bpp    | 2 BRAM / bpp    | 
 ^ 320x240 |  2.5 BRAM / bpp  | 4 BRAM / bpp    | ^ 320x240 |  2.5 BRAM / bpp  | 4 BRAM / bpp    |
 ^ 640x480 |  10 BRAM / bpp   | 16 BRAM / bpp   | ^ 640x480 |  10 BRAM / bpp   | 16 BRAM / bpp   |
Ligne 94: Ligne 137:
 ===== Files ===== ===== Files =====
  
-  * {{ en202:vga_bitmap_160x100.vhd | file for 160x100 pixels resolution}} 
-  * {{ en202:vga_bitmap_160x120.vhd | file for 160x120 pixels resolution}} 
-  * {{ en202:vga_bitmap_320x200.vhd | file for 320x200 pixels resolution}} 
   * {{ en202:vga_bitmap_320x240.vhd | file for 320x240 pixels resolution}}   * {{ en202:vga_bitmap_320x240.vhd | file for 320x240 pixels resolution}}
   * {{ en202:vga_bitmap_640x480.vhd | file for 640x480 pixels resolution}}   * {{ en202:vga_bitmap_640x480.vhd | file for 640x480 pixels resolution}}
en202/vga_bitmap.1699219056.txt.gz · Dernière modification : 2023/11/05 22:17 de Yannick Bornat