help read a pixel for picture

hi every body , my problem is how to read a pixel for a picture (a pixel is composed by three component Red, Green and Blue ) to get the three component. this program is correct into syntax but i m not sure for the result please help me , i m a beginner and i m not sure with the result that gives me

-------------------------------------------------------------------------------------------------------------------------------------------------------------- entity lecteur_pixel is Port ( clk : in STD_LOGIC; composante : in STD_LOGIC_VECTOR (7 downto 0); R : out STD_LOGIC_VECTOR (7 downto 0); G : out STD_LOGIC_VECTOR (7 downto 0); B : out STD_LOGIC_VECTOR (7 downto 0)); end lecteur_pixel;

architecture architecture_lecteur of lecteur_pixel is signal count: STD_LOGIC_VECTOR (1 downto 0):="00";

--a meter that allows counting the number of clock top and decide the composing to read

begin

-- To the first clock top one reads the composing R, to the 2ND one reads G and to the third one reads B process(clk) begin if clk='1' and clk'event then count

Reply to
VHDL_HELP
Loading thread data ...

--------------------------------------------------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------------------------------------

Your process should have a reset to put your FFs in a known state. I'd also use rising_edge(clk).

Reply to
Brandon Jasionowski

There is a separate group for the VHDL questions : comp.lang.vhdl

I think what you want is a flip-flop with enable. I don't think "when" can be used in this context. The standard way of coding this would be as shown below:

process(clk) begin if clk='1' and clk'event then count

Reply to
MM

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.