beautypg.com

Digilent Parallel Interface Model User Manual

Page 10

background image

Digilent Parallel Interface Model

Digilent, Inc.

www.digilentinc.com

Copyright Digilent, Inc.

Page 10

end if;

end process;


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

-- EPP Data registers

------------------------------------------------------------------------
-- The following processes implement the interface registers. These

-- registers just hold the value written so that it can be read back.

-- In a real design, the contents of these registers would drive additional

-- logic.

-- The ctlEppDwr signal is an output from the state machine that says

-- we are in a 'write data register' state. This is combined with the

-- address in the address register to determine which register to write.


process (clkMain, regEppAdr, ctlEppDwr, busEppIn)

begin

if clkMain = '1' and clkMain'Event then

if ctlEppDwr = '1' and regEppAdr = "0000" then

regData0 <= busEppIn;

end if;

end if;

end process;


process (clkMain, regEppAdr, ctlEppDwr, busEppIn)

begin

if clkMain = '1' and clkMain'Event then

if ctlEppDwr = '1' and regEppAdr = "0001" then

regData1 <= busEppIn;

end if;

end if;

end process;


process (clkMain, regEppAdr, ctlEppDwr, busEppIn)

begin

if clkMain = '1' and clkMain'Event then

if ctlEppDwr = '1' and regEppAdr = "0010" then

regData2 <= busEppIn;

end if;

end if;

end process;


process (clkMain, regEppAdr, ctlEppDwr, busEppIn)

begin

if clkMain = '1' and clkMain'Event then

if ctlEppDwr = '1' and regEppAdr = "0011" then

regData3 <= busEppIn;

end if;

end if;

end process;


process (clkMain, regEppAdr, ctlEppDwr, busEppIn)

begin

if clkMain = '1' and clkMain'Event then

if ctlEppDwr = '1' and regEppAdr = "0100" then

regData4 <= busEppIn;

end if;

end if;

end process;