Note that there are some explanatory texts on larger screens.

plurals
  1. PODraw circle vhdl
    primarykey
    data
    text
    <p>How I can draw circle in VHDL? There is <a href="http://oi48.tinypic.com/o7kfts.jpg" rel="nofollow">my BDF design</a></p> <p>Sow, I need to draw red circle ~ 100 px radius. I think I should use some vector, but how?</p> <pre><code>entity VGAFrameTest is port( yrow, xcolumn : in unsigned(9 downto 0); -- row and column number of VGA video VGA_CLK : in std_logic; -- pixel clock VGA_R, VGA_G, VGA_B: out std_logic_vector(9 downto 0)); -- color information end; architecture rtl of VGAFrameTest is constant COLOR_ON : std_logic_vector(9 downto 0) := (others=&gt;'1'); constant COLOR_OFF : std_logic_vector(9 downto 0) := (others=&gt;'0'); constant ROW_HEIGHT : integer := 480; -- number of visible rows </code></pre> <blockquote> <pre><code>-- A test of visible range is recommended -- VGA 640x480@60Hz resolution is not natural for LCD monitors -- They support it but some monitors do not display all columns -- 1 or 2 last columns can be missing </code></pre> </blockquote> <pre><code>constant COLUMN_WIDTH : integer := 640 -1 ; -- number of visible columns - correction begin frame:process(VGA_CLK) begin if rising_edge(VGA_CLK) then VGA_R&lt;=COLOR_ON;VGA_G&lt;=COLOR_ON;VGA_B&lt;=COLOR_ON; --initilize color to white if (yrow = 240 and xcolumn = 320) then VGA_B&lt;=COLOR_OFF; VGA_G&lt;=COLOR_OFF; elsif yrow = 1 or yrow = ROW_HEIGHT-2 or xcolumn=1 or xcolumn = COLUMN_WIDTH-2 then VGA_R&lt;=COLOR_OFF; VGA_G&lt;=COLOR_OFF; VGA_B&lt;=COLOR_OFF; -- black frame elsif yrow = ROW_HEIGHT-1 then VGA_B&lt;=COLOR_OFF; VGA_G&lt;=COLOR_OFF; --last column is red end if; end if; end process; end; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload