Gecko3 - CCC Event Weblog
Gecko3 - CCC Event Weblog
Gecko3 - CCC Event Weblog
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
E. Quellcode<br />
−− | ( ) ) | | | | | | Information Technology<br />
−− ( / ’( ) ( ) ( )<br />
10 −−<br />
−−<br />
−− Author : Christoph Zimmermann<br />
−− Date o f c r e a t i o n : 8.11.2006<br />
−− D e s c r i p t i o n :<br />
15 −− FPGA Module to t e s t t h e communication between t h e EZ−USB and t h e FPGA.<br />
−− The EZ−USB sends data (16 b i t wide ) to t h e FPGA. t he y are s t o r e d and when<br />
−− t h e s e l e c t e d number o f data ( s e l e c t e d by t h e s w i t c h e s ) i s reached t h e FPGA<br />
−− s t a r t s to send back t h e data to t h e EZ−USB in r e v e r s e d order (FILO)<br />
−−<br />
20 −− Target Devices : X i l i n x Spartan3 FPGA’ s ( usage o f BlockRam in t h e Datapath )<br />
−− Tool v e r s i o n s : 8.2 i<br />
−− Dependencies :<br />
−−<br />
−−<br />
25 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />
library IEEE ;<br />
use IEEE . STD LOGIC 1164 .ALL;<br />
use IEEE . STD LOGIC ARITH .ALL;<br />
30 use IEEE . STD LOGIC UNSIGNED .ALL;<br />
−−−− Uncomment t h e f o l l o w i n g l i b r a r y d e c l a r a t i o n i f i n s t a n t i a t i n g<br />
−−−− any X i l i n x p r i m i t i v e s in t h i s code .<br />
library UNISIM ;<br />
35 use UNISIM . VComponents . a l l ;<br />
entity loopback i s<br />
port (<br />
DATA: inout s t d l o g i c v e c t o r (15 downto 0) ;<br />
40 CLK, RESET, WRU, RDYU: in s t d l o g i c ; −−r e s e t b u t t o n on development board i s 1<br />
when p r e s s e d<br />
WRX, RDYX, PW: out s t d l o g i c<br />
) ;<br />
end loopback ;<br />
45 architecture B e h a v i o r a l of loopback i s<br />
signal up , down , zero , writeEN , we : s t d l o g i c ;<br />
signal WRUint , RDYUint : s t d l o g i c ;<br />
50 component STM<br />
PORT (<br />
CLK, RDYU, RESET, WRU, z e r o : IN s t d l o g i c ;<br />
down , RDYX, up , we , writeEN , WRX : OUT s t d l o g i c<br />
) ;<br />
55 end component ;<br />
component datapath<br />
port (<br />
clk , r e s e t , we , up , down , writeEN : IN s t d l o g i c ;<br />
60 z e r o : OUT s t d l o g i c ;<br />
data : inout s t d l o g i c v e c t o r (15 downto 0)<br />
) ;<br />
end component ;<br />
65 begin<br />
PW