100
168 ���SPARTAN�3AN � c l o c k 50MHz
169 �� s p i _ c l o c k : d i v i s o r _ c l o c k
170 �� g e n e r i c map (
171 �� DIVIDER_RATIO => �0 0 0 1 0� �� c l o c k = 6∗ c l k
172 �� )
173 �� p o r t map (
174 �� i n _ c l k => c l o c k ,
175 �� o u t _ c l k => s p i _ c l k
176 �� ) ;
177 �����������������
178
179 mod_tx : e n t i t y work . f r a m e _ t x
180 p o r t map (
181 c l o c k => c l o c k ,
182 p a y l o a d => p a yl o a d _ f r a m e T x ,
183 a d d r _ s o u r c e => a d d r _ s o u r c e _ f r a m e T x ,
184 a d d r _ d e s t => a d d r _ d e s t _ f r a m e T x ,
185 a d d r _ p a n => ad d r _ p a n _f r a m e T x ,
186 f r a m e _ t y p e => f r a m e _ t y p e _ f r a m e T x ,
187 f r a m e _ d a t a _ l e n g t h => d a t a _ l e n g t h _ f r a m e T x ,
188 f r a m e _ s e n d => send_frameTx ,
189 CCA_pin => CCA,
190 SFD_pin => SFD ,
191 fr a m e _ b u s y => bu s y _ f r ameTx ,
192 s p i _ R e s e t => s p i _ R e s e t _ f r a m e T x ,
193 s p i _ D a t a T x => s p i _ Da t a T x _f r a m e T x ,
194 s p i _ S t a r t => s p i _ S t a r t _ f r a m e T x ,
195 sp i _ D a t a R x => s p i _ d a t a R x ,
196 s p i _ R e a d y => s p i _ r e a d y
197 ) ;
198
199
200 mod_rx : e n t i t y work . f r a m e _ r x
201 p o r t map (
202 c l o c k => c l o c k ,
203 p a y l o a d => p a y l oad _ f r a m e Rx ,
204 a d d r _ s o u r c e => a d d r _ s o u r c e _ f r a m e R x ,
205 a d d r _ d e s t => a d d r _ d e s t _ f r a m e R x ,
206 f r a m e _ t y p e => f r a m e_ t y p e _ f r a m e R x ,
207 f r a m e _ d a t a _ l e n g t h => d a t a _ l e n g t h _ f r a m e R x ,
208 f r a m e _ s e q => f r a m e _se q _ f r a m eRx ,
209 f r a m e _ r s s i => f r a m e _ r s s i _ f r a m e R x ,
210 f r a m e _ r e c e i v e => r e c e i v e _ f r a m e R x ,
211 F IFO_p i n => FIFO ,
212 SFD_pin => SFD ,
213 f r a m e R x _ busy => bu s y_fra m eRx ,
214 s t a t u s _ e r r o r => s t a t u s _ e r r o r _ f r a m e R x ,
215 sp i _ D a t a R x => spi_DataRx_ f r a m e R x ,
216 s p i _ R e a d y => s p i _ r e a d y ,
217 s p i _ R e s e t => s p i _ R e s e t _ f r a m e R x ,
218 s p i _ D a t a T x => s p i _ D a t aTx_ f r a m e R x ,
219 s p i _ S t a r t => s p i _ S t a r t _ f r a m e R x
220
221 ) ;
222
223
224 m o d _ i n i t : e n t i t y work . m o d _ i n i t
225 p o r t map (
226 c l o c k => c l o c k ,
227 sp i _ D a t a R x => s p i _ d a t a R x ,
228 s p i _ R e a d y => s p i _ r e a d y ,
229 m o d u l e _ i n i t => m o d u l e _ i n i t ,
230 m o d u l e _ s t a t u s => modu l e _ r e a d y ,
231 s p i _ R e s e t => s p i _ R e s e t _ i n i t ,
232 s p i _ D a t a T x => s p i _ D a t a T x _ i n i t ,
233 s p i _ S t a r t => s p i _ S t a r t _ i n i t ,
234 RESETn => RESETn ,
235 VREG_en => VREG_en
236 ) ;
237
238
239 m o d _co n f i g : e n t i t y work . mo d _co n f i g
240 p o r t map (
241 c l o c k => c l o c k ,
242 d a t a _ c o n f i g => d a t a _ c o n f i g ,
243 sp i _ D a t a R x => s p i _ d a t a R x ,
244 s p i _ R e a d y => s p i _ r e a d y ,
245 m o d u l e _ i n i t => m o d u l e _ c o n f i g _ i n i t ,
246 s p i _ R e s e t => s p i _ R e s e t _ C o n f i g ,
247 s p i _ D a t a T x => s p i _ D a t a T x _ C o n f i g ,
248 s p i _ S t a r t => s p i _ S t a r t _ C o n f i g ,
249 m o d u l e _ s t a t u s => m o d u l e _ c o n f i g _ s t a t u s ,
250 d a t a _ s t a t u s => d a t a _ c o n f i g _ s t a t u s
251
252 ) ;
253
254 s p i : sp i _ c o m �� c u i d a r a r e s t r i ç ã o do CC2420 d e 10MHz em SCLK
255 g e n e r i c map(
256 DATA_WIDTH => SPI_DATA_WIDTH
257 )
258 p o r t map ( �� c o m p l e t a r a d e s c r i ç ã o
259 r e s e t => s p i _ r e s e t ,
260 c l k => s p i _ c l k , ��s p i _ c l k < 20MHz
261 SCLK => SCLK , ��SCLK = c l k / 2
262 CSn => CSn ,
263 MOSI => MOSI ,
264 MISO => MISO ,
265 Dat aTx => s p i _ d a t a T x ,
266 DataRx => s p i _ d a t a R x ,