Changeset 320 for soft/giet_vm/giet_drivers/mwr_driver.c
- Timestamp:
- Jun 10, 2014, 12:33:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/mwr_driver.c
r295 r320 9 9 // 10 10 // This peripheral can be replicated (at most one component per cluster). 11 // /////////////////////////////////////////////////////////////////////////////////11 // 12 12 // The (virtual) base address of the associated segment is: 13 // SEG_MWR_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT 13 14 // 14 // seg_mwr_base + cluster_xy * vseg_cluster_increment 15 // 16 // The seg_mwr_base and vseg_cluster_increment values must be defined 17 // in the giet_vsegs.ld file. 15 // SEG_MWR_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h 18 16 //////////////////////////////////////////////////////////////////////////////// 19 17 20 18 #include <giet_config.h> 19 #include <hard_config.h> 21 20 #include <mwr_driver.h> 22 21 #include <utils.h> … … 36 35 #if !defined(Y_WIDTH) 37 36 # error: You must define X_WIDTH in the hard_config.h file 37 #endif 38 39 #if !defined(SEG_MWR_BASE) 40 # error: You must define SEG_MWR_BASE in the hard_config.h file 41 #endif 42 43 #if !defined(VSEG_CLUSTER_INCREMENT) 44 # error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file 38 45 #endif 39 46 … … 67 74 68 75 // compute base address 69 unsigned int* mwr_address = (unsigned int*) ( (unsigned int)&seg_mwr_base+70 (cluster_xy * (unsigned int)&vseg_cluster_increment));76 unsigned int* mwr_address = (unsigned int*) ( SEG_MWR_BASE + 77 (cluster_xy * VSEG_CLUSTER_INCREMENT) ); 71 78 72 79 unsigned int lsb = (unsigned int)channel_pbase;
Note: See TracChangeset
for help on using the changeset viewer.