OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_verilator/] [topology/] [topology_top.h] - Diff between revs 48 and 54

Show entire file | Details | Blame | View Log

Rev 48 Rev 54
Line 1... Line 1...
#ifndef TOPOLOGY_TOP_H
#ifndef TOPOLOGY_TOP_H
#define TOPOLOGY_TOP_H
#define TOPOLOGY_TOP_H
 
 
 
        unsigned int    R2R_TABLE_SIZ =0;
 
 
 
        #define CNT_R2R_SIZ  (NR * MAX_P)     //((NR1+NR2+1)*(K+1))
 
        #define CNT_R2E_SIZ  (NE+1)
 
 
 
        typedef struct R2R_CNT_TABLE {
 
                unsigned int id1;
 
                unsigned int t1;
 
                unsigned int r1;
 
                unsigned int p1;
 
                unsigned int id2;
 
                unsigned int t2;
 
                unsigned int r2;
 
                unsigned int p2;
 
        } r2r_cnt_table_t;
 
 
 
        r2r_cnt_table_t r2r_cnt_all[CNT_R2R_SIZ];
 
 
 
        typedef struct R2E_CNT_TABLE {
 
                unsigned int r1;
 
                unsigned int p1;
 
        } r2e_cnt_table_t;
 
 
 
        r2e_cnt_table_t r2e_cnt_all[CNT_R2E_SIZ];
 
 
 
 
        int get_router_num (int NR_num, int NR_id){
        int get_router_num (int NR_num, int NR_id){
                int offset=0;
                int offset=0;
                if(NR_num* sizeof(int) > sizeof(router_NRs)){
                if(NR_num* sizeof(int) > sizeof(router_NRs)){
                                fprintf(stderr,"ERROR: NR%u is not defined\n",NR_num);
                                fprintf(stderr,"ERROR: NR%u is not defined\n",NR_num);
                                exit(1);
                                exit(1);
Line 51... Line 77...
                        return  (id < NR1)? id : id-NR1;
                        return  (id < NR1)? id : id-NR1;
                }
                }
 
 
                #define         K T1
                #define         K T1
                #define     L T2 
                #define     L T2 
                #define CNT_R2R_SIZ  ((NR1+NR2+1)*(K+1)) 
 
                #define CNT_R2E_SIZ  (NE+1)
 
 
 
                typedef struct R2R_CNT_TABLE {
 
                        unsigned int t1;
 
                        unsigned int r1;
 
                        unsigned int p1;
 
                        unsigned int t2;
 
                        unsigned int r2;
 
                        unsigned int p2;
 
                } r2r_cnt_table_t;
 
 
 
                r2r_cnt_table_t r2r_cnt_all[CNT_R2R_SIZ];
 
 
 
                typedef struct R2E_CNT_TABLE {
 
                        unsigned int r1;
 
                        unsigned int p1;
 
                } r2e_cnt_table_t;
 
 
 
                r2e_cnt_table_t r2e_cnt_all[CNT_R2E_SIZ];
 
 
 
                inline void fattree_connect ( r2r_cnt_table_t in){
                inline void fattree_connect ( r2r_cnt_table_t in){
                        unsigned int t1 = in.t1;
                        unsigned int t1 = in.t1;
                        unsigned int r1 = in.r1;
                        unsigned int r1 = in.r1;
                        unsigned int p1 = in.p1;
                        unsigned int p1 = in.p1;
Line 103... Line 112...
 
 
 
 
 
 
 
 
        #if defined (IS_MESH) || defined (IS_FMESH) || defined (IS_TORUS) || defined (IS_LINE) || defined (IS_RING )
        #if defined (IS_MESH) || defined (IS_FMESH) || defined (IS_TORUS) || defined (IS_LINE) || defined (IS_RING )
 
 
 
 
 
 
 
 
                #include "mesh.h"
                #include "mesh.h"
        #elif  defined (IS_FATTREE)
        #elif  defined (IS_FATTREE)
                #include "fattree.h"
                #include "fattree.h"
        #elif  defined (IS_TREE)
        #elif  defined (IS_TREE)
                #include "tree.h"
                #include "tree.h"
Line 119... Line 132...
                }
                }
 
 
                unsigned int endp_addr_decoder (unsigned int code){
                unsigned int endp_addr_decoder (unsigned int code){
                        return code;
                        return code;
                }
                }
 
                #include "custom.h"
 
 
        #endif
        #endif
 
 
 
 
#endif
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.