1919// TODO just mem map one big struct that gets changes
2020// needs more efficient code for muxing mem reads/writes to specific struct bytes
2121
22- #define MEM_MAP_BASE_ADDR 0x10000000
22+ // Needs to match link.ld (TODO how to share variables?)
23+ #define DMEM_ADDR_BIT_CHECK 30
24+ #define DMEM_BASE_ADDR ((uint32_t)((uint32_t)1<<DMEM_ADDR_BIT_CHECK))
25+ #define DMEM_SIZE 65536 // Must be decimal constant since VHDL+C literal
26+ #define IMEM_SIZE 65536 // Must be decimal constant since VHDL+C literal
27+ // Any addresses this high up will be mmio
28+ #define MEM_MAP_ADDR_BIT_CHECK 31
29+ #define MEM_MAP_BASE_ADDR ((uint32_t)((uint32_t)1<<MEM_MAP_ADDR_BIT_CHECK))
2330
2431#define N_THREADS_PER_BARREL 5
2532#define N_BARRELS 1
@@ -467,7 +474,7 @@ typedef struct dataflow_mm_t
467474#define DATAFLOW_MM_ADDR (KERNEL_VALID_OUT_ADDR + sizeof(uint32_t))
468475static volatile dataflow_mm_t * DATAFLOW_MM = (dataflow_mm_t * )DATAFLOW_MM_ADDR ;
469476
470- void do_shader_dataflow (uint32_t addr , int32_t x , int32_t y , uint32_t frame_count , uint32_t num_pixels ){
477+ /* void do_shader_dataflow(uint32_t addr, int32_t x, int32_t y, uint32_t frame_count, uint32_t num_pixels){
471478 // Configure dataflow network
472479 DATAFLOW_MM->addr = addr;
473480 DATAFLOW_MM->x = x;
@@ -482,4 +489,4 @@ void do_shader_dataflow(uint32_t addr, int32_t x, int32_t y, uint32_t frame_coun
482489 // Clear valid to reset
483490 DATAFLOW_MM->all_ports_dataflow_host = 0;
484491 DATAFLOW_MM->valid = 0;
485- }
492+ }*/
0 commit comments