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

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk/mpsoc/src_verilator/topology/custom
    from Rev 48 to Rev 54
    Reverse comparison

Rev 48 → Rev 54

/custom.h
0,0 → 1,6
//do not modify this line ===custom1===
#ifdef IS_custom1_noc
#include "custom1_noc.h"
#endif
/custom1_noc.h
1,155 → 1,241
 
 
 
 
void topology_connect_all_nodes (void){
//Connect R0 input ports 0 to T0 output ports 0
connect_r2e(1,0,0,0);
//Connect R0 input ports 1 to R14 output ports 3
conect_r2r(1,0,1,2,6,3);
void single_r2r0(void){conect_r2r(1,0,1,2,6,3);}
//Connect R0 input ports 2 to R13 output ports 3
conect_r2r(1,0,2,2,5,3);
//Connect R1 input ports 0 to T1 output ports 0
connect_r2e(1,1,0,1);
void single_r2r1(void){conect_r2r(1,0,2,2,5,3);}
//Connect R1 input ports 1 to R7 output ports 3
conect_r2r(1,1,1,2,3,3);
void single_r2r2(void){conect_r2r(1,1,1,2,3,3);}
//Connect R1 input ports 2 to R2 output ports 2
conect_r2r(1,1,2,1,2,2);
//Connect R2 input ports 0 to T2 output ports 0
connect_r2e(1,2,0,2);
void single_r2r3(void){conect_r2r(1,1,2,1,2,2);}
//Connect R2 input ports 1 to R15 output ports 2
conect_r2r(1,2,1,2,7,2);
void single_r2r4(void){conect_r2r(1,2,1,2,7,2);}
//Connect R2 input ports 2 to R1 output ports 2
conect_r2r(1,2,2,1,1,2);
//Connect R3 input ports 0 to T3 output ports 0
connect_r2e(1,3,0,3);
void single_r2r5(void){conect_r2r(1,2,2,1,1,2);}
//Connect R3 input ports 1 to R15 output ports 3
conect_r2r(1,3,1,2,7,3);
void single_r2r6(void){conect_r2r(1,3,1,2,7,3);}
//Connect R3 input ports 2 to R4 output ports 2
conect_r2r(1,3,2,2,0,2);
//Connect R4 input ports 0 to T4 output ports 0
connect_r2e(2,0,0,4);
void single_r2r7(void){conect_r2r(1,3,2,2,0,2);}
//Connect R4 input ports 1 to R9 output ports 2
conect_r2r(2,0,1,3,1,2);
void single_r2r8(void){conect_r2r(2,0,1,3,1,2);}
//Connect R4 input ports 2 to R3 output ports 2
conect_r2r(2,0,2,1,3,2);
void single_r2r9(void){conect_r2r(2,0,2,1,3,2);}
//Connect R4 input ports 3 to R6 output ports 3
conect_r2r(2,0,3,2,2,3);
//Connect R5 input ports 0 to T5 output ports 0
connect_r2e(2,1,0,5);
void single_r2r10(void){conect_r2r(2,0,3,2,2,3);}
//Connect R5 input ports 1 to R11 output ports 4
conect_r2r(2,1,1,3,3,4);
void single_r2r11(void){conect_r2r(2,1,1,3,3,4);}
//Connect R5 input ports 2 to R6 output ports 2
conect_r2r(2,1,2,2,2,2);
void single_r2r12(void){conect_r2r(2,1,2,2,2,2);}
//Connect R5 input ports 3 to R13 output ports 2
conect_r2r(2,1,3,2,5,2);
//Connect R6 input ports 0 to T6 output ports 0
connect_r2e(2,2,0,6);
void single_r2r13(void){conect_r2r(2,1,3,2,5,2);}
//Connect R6 input ports 1 to R9 output ports 3
conect_r2r(2,2,1,3,1,3);
void single_r2r14(void){conect_r2r(2,2,1,3,1,3);}
//Connect R6 input ports 2 to R5 output ports 2
conect_r2r(2,2,2,2,1,2);
void single_r2r15(void){conect_r2r(2,2,2,2,1,2);}
//Connect R6 input ports 3 to R4 output ports 3
conect_r2r(2,2,3,2,0,3);
//Connect R7 input ports 0 to T7 output ports 0
connect_r2e(2,3,0,7);
void single_r2r16(void){conect_r2r(2,2,3,2,0,3);}
//Connect R7 input ports 1 to R12 output ports 3
conect_r2r(2,3,1,2,4,3);
void single_r2r17(void){conect_r2r(2,3,1,2,4,3);}
//Connect R7 input ports 2 to R14 output ports 2
conect_r2r(2,3,2,2,6,2);
void single_r2r18(void){conect_r2r(2,3,2,2,6,2);}
//Connect R7 input ports 3 to R1 output ports 1
conect_r2r(2,3,3,1,1,1);
//Connect R12 input ports 0 to T8 output ports 0
connect_r2e(2,4,0,8);
void single_r2r19(void){conect_r2r(2,3,3,1,1,1);}
//Connect R12 input ports 1 to R8 output ports 4
conect_r2r(2,4,1,3,0,4);
void single_r2r20(void){conect_r2r(2,4,1,3,0,4);}
//Connect R12 input ports 2 to R10 output ports 3
conect_r2r(2,4,2,3,2,3);
void single_r2r21(void){conect_r2r(2,4,2,3,2,3);}
//Connect R12 input ports 3 to R7 output ports 1
conect_r2r(2,4,3,2,3,1);
//Connect R13 input ports 0 to T9 output ports 0
connect_r2e(2,5,0,9);
void single_r2r22(void){conect_r2r(2,4,3,2,3,1);}
//Connect R13 input ports 1 to R8 output ports 2
conect_r2r(2,5,1,3,0,2);
void single_r2r23(void){conect_r2r(2,5,1,3,0,2);}
//Connect R13 input ports 2 to R5 output ports 3
conect_r2r(2,5,2,2,1,3);
void single_r2r24(void){conect_r2r(2,5,2,2,1,3);}
//Connect R13 input ports 3 to R0 output ports 2
conect_r2r(2,5,3,1,0,2);
//Connect R14 input ports 0 to T10 output ports 0
connect_r2e(2,6,0,10);
void single_r2r25(void){conect_r2r(2,5,3,1,0,2);}
//Connect R14 input ports 1 to R8 output ports 3
conect_r2r(2,6,1,3,0,3);
void single_r2r26(void){conect_r2r(2,6,1,3,0,3);}
//Connect R14 input ports 2 to R7 output ports 2
conect_r2r(2,6,2,2,3,2);
void single_r2r27(void){conect_r2r(2,6,2,2,3,2);}
//Connect R14 input ports 3 to R0 output ports 1
conect_r2r(2,6,3,1,0,1);
//Connect R15 input ports 0 to T11 output ports 0
connect_r2e(2,7,0,11);
void single_r2r28(void){conect_r2r(2,6,3,1,0,1);}
//Connect R15 input ports 1 to R10 output ports 4
conect_r2r(2,7,1,3,2,4);
void single_r2r29(void){conect_r2r(2,7,1,3,2,4);}
//Connect R15 input ports 2 to R2 output ports 1
conect_r2r(2,7,2,1,2,1);
void single_r2r30(void){conect_r2r(2,7,2,1,2,1);}
//Connect R15 input ports 3 to R3 output ports 1
conect_r2r(2,7,3,1,3,1);
//Connect R8 input ports 0 to T12 output ports 0
connect_r2e(3,0,0,12);
void single_r2r31(void){conect_r2r(2,7,3,1,3,1);}
//Connect R8 input ports 1 to R11 output ports 1
conect_r2r(3,0,1,3,3,1);
void single_r2r32(void){conect_r2r(3,0,1,3,3,1);}
//Connect R8 input ports 2 to R13 output ports 1
conect_r2r(3,0,2,2,5,1);
void single_r2r33(void){conect_r2r(3,0,2,2,5,1);}
//Connect R8 input ports 3 to R14 output ports 1
conect_r2r(3,0,3,2,6,1);
void single_r2r34(void){conect_r2r(3,0,3,2,6,1);}
//Connect R8 input ports 4 to R12 output ports 1
conect_r2r(3,0,4,2,4,1);
//Connect R9 input ports 0 to T13 output ports 0
connect_r2e(3,1,0,13);
void single_r2r35(void){conect_r2r(3,0,4,2,4,1);}
//Connect R9 input ports 1 to R11 output ports 3
conect_r2r(3,1,1,3,3,3);
void single_r2r36(void){conect_r2r(3,1,1,3,3,3);}
//Connect R9 input ports 2 to R4 output ports 1
conect_r2r(3,1,2,2,0,1);
void single_r2r37(void){conect_r2r(3,1,2,2,0,1);}
//Connect R9 input ports 3 to R6 output ports 1
conect_r2r(3,1,3,2,2,1);
void single_r2r38(void){conect_r2r(3,1,3,2,2,1);}
//Connect R9 input ports 4 to R10 output ports 2
conect_r2r(3,1,4,3,2,2);
//Connect R10 input ports 0 to T14 output ports 0
connect_r2e(3,2,0,14);
void single_r2r39(void){conect_r2r(3,1,4,3,2,2);}
//Connect R10 input ports 1 to R11 output ports 2
conect_r2r(3,2,1,3,3,2);
void single_r2r40(void){conect_r2r(3,2,1,3,3,2);}
//Connect R10 input ports 2 to R9 output ports 4
conect_r2r(3,2,2,3,1,4);
void single_r2r41(void){conect_r2r(3,2,2,3,1,4);}
//Connect R10 input ports 3 to R12 output ports 2
conect_r2r(3,2,3,2,4,2);
void single_r2r42(void){conect_r2r(3,2,3,2,4,2);}
//Connect R10 input ports 4 to R15 output ports 1
conect_r2r(3,2,4,2,7,1);
//Connect R11 input ports 0 to T15 output ports 0
connect_r2e(3,3,0,15);
void single_r2r43(void){conect_r2r(3,2,4,2,7,1);}
//Connect R11 input ports 1 to R8 output ports 1
conect_r2r(3,3,1,3,0,1);
void single_r2r44(void){conect_r2r(3,3,1,3,0,1);}
//Connect R11 input ports 2 to R10 output ports 1
conect_r2r(3,3,2,3,2,1);
void single_r2r45(void){conect_r2r(3,3,2,3,2,1);}
//Connect R11 input ports 3 to R9 output ports 1
conect_r2r(3,3,3,3,1,1);
void single_r2r46(void){conect_r2r(3,3,3,3,1,1);}
//Connect R11 input ports 4 to R5 output ports 1
conect_r2r(3,3,4,2,1,1);
void single_r2r47(void){conect_r2r(3,3,4,2,1,1);}
 
 
//Connect R0 input ports 0 to T0 output ports 0
void single_r2e0(void) {connect_r2e(1,0,0,0);}
//Connect R1 input ports 0 to T1 output ports 0
void single_r2e1(void) {connect_r2e(1,1,0,1);}
//Connect R2 input ports 0 to T2 output ports 0
void single_r2e2(void) {connect_r2e(1,2,0,2);}
//Connect R3 input ports 0 to T3 output ports 0
void single_r2e3(void) {connect_r2e(1,3,0,3);}
//Connect R4 input ports 0 to T4 output ports 0
void single_r2e4(void) {connect_r2e(2,0,0,4);}
//Connect R5 input ports 0 to T5 output ports 0
void single_r2e5(void) {connect_r2e(2,1,0,5);}
//Connect R6 input ports 0 to T6 output ports 0
void single_r2e6(void) {connect_r2e(2,2,0,6);}
//Connect R7 input ports 0 to T7 output ports 0
void single_r2e7(void) {connect_r2e(2,3,0,7);}
//Connect R12 input ports 0 to T8 output ports 0
void single_r2e8(void) {connect_r2e(2,4,0,8);}
//Connect R13 input ports 0 to T9 output ports 0
void single_r2e9(void) {connect_r2e(2,5,0,9);}
//Connect R14 input ports 0 to T10 output ports 0
void single_r2e10(void) {connect_r2e(2,6,0,10);}
//Connect R15 input ports 0 to T11 output ports 0
void single_r2e11(void) {connect_r2e(2,7,0,11);}
//Connect R8 input ports 0 to T12 output ports 0
void single_r2e12(void) {connect_r2e(3,0,0,12);}
//Connect R9 input ports 0 to T13 output ports 0
void single_r2e13(void) {connect_r2e(3,1,0,13);}
//Connect R10 input ports 0 to T14 output ports 0
void single_r2e14(void) {connect_r2e(3,2,0,14);}
//Connect R11 input ports 0 to T15 output ports 0
void single_r2e15(void) {connect_r2e(3,3,0,15);}
 
 
 
void (*r2r_func_ptr[48])() = {
single_r2r0,single_r2r1,single_r2r2,single_r2r3,single_r2r4,single_r2r5,single_r2r6,single_r2r7,single_r2r8,single_r2r9
,single_r2r10,single_r2r11,single_r2r12,single_r2r13,single_r2r14,single_r2r15,single_r2r16,single_r2r17,single_r2r18,single_r2r19
,single_r2r20,single_r2r21,single_r2r22,single_r2r23,single_r2r24,single_r2r25,single_r2r26,single_r2r27,single_r2r28,single_r2r29
,single_r2r30,single_r2r31,single_r2r32,single_r2r33,single_r2r34,single_r2r35,single_r2r36,single_r2r37,single_r2r38,single_r2r39
,single_r2r40,single_r2r41,single_r2r42,single_r2r43,single_r2r44,single_r2r45,single_r2r46,single_r2r47};
void (*r2e_func_ptr[16])() = {
single_r2e0,single_r2e1,single_r2e2,single_r2e3,single_r2e4,single_r2e5,single_r2e6,single_r2e7,single_r2e8,single_r2e9
,single_r2e10,single_r2e11,single_r2e12,single_r2e13,single_r2e14,single_r2e15};
 
void topology_connect_r2r (int n){
(*r2r_func_ptr[n])();
}
 
void topology_connect_r2e (int n){
(*r2e_func_ptr[n])();
}
 
 
 
void topology_init(void){
router1[0]->current_r_addr=0;
router1[0]->current_r_id=0;
router1[1]->current_r_addr=1;
router1[1]->current_r_id=1;
router1[2]->current_r_addr=2;
router1[2]->current_r_id=2;
router1[3]->current_r_addr=3;
router1[3]->current_r_id=3;
router2[0]->current_r_addr=4;
router2[0]->current_r_id=4;
router2[1]->current_r_addr=5;
router2[1]->current_r_id=5;
router2[2]->current_r_addr=6;
router2[2]->current_r_id=6;
router2[3]->current_r_addr=7;
router2[3]->current_r_id=7;
router2[4]->current_r_addr=8;
router2[4]->current_r_id=8;
router2[5]->current_r_addr=9;
router2[5]->current_r_id=9;
router2[6]->current_r_addr=10;
router2[6]->current_r_id=10;
router2[7]->current_r_addr=11;
router2[7]->current_r_id=11;
router3[0]->current_r_addr=12;
router3[0]->current_r_id=12;
router3[1]->current_r_addr=13;
router3[1]->current_r_id=13;
router3[2]->current_r_addr=14;
router3[2]->current_r_id=14;
router3[3]->current_r_addr=15;
router3[3]->current_r_id=15;
r2r_cnt_all[0] =(r2r_cnt_table_t){.id1=0, .t1=1, .r1=0, .p1=1,.id2=10, .t2=2, .r2=6, .p2=3 };
r2r_cnt_all[1] =(r2r_cnt_table_t){.id1=0, .t1=1, .r1=0, .p1=2,.id2=9, .t2=2, .r2=5, .p2=3 };
r2r_cnt_all[2] =(r2r_cnt_table_t){.id1=1, .t1=1, .r1=1, .p1=1,.id2=7, .t2=2, .r2=3, .p2=3 };
r2r_cnt_all[3] =(r2r_cnt_table_t){.id1=1, .t1=1, .r1=1, .p1=2,.id2=2, .t2=1, .r2=2, .p2=2 };
r2r_cnt_all[4] =(r2r_cnt_table_t){.id1=2, .t1=1, .r1=2, .p1=1,.id2=11, .t2=2, .r2=7, .p2=2 };
r2r_cnt_all[5] =(r2r_cnt_table_t){.id1=2, .t1=1, .r1=2, .p1=2,.id2=1, .t2=1, .r2=1, .p2=2 };
r2r_cnt_all[6] =(r2r_cnt_table_t){.id1=3, .t1=1, .r1=3, .p1=1,.id2=11, .t2=2, .r2=7, .p2=3 };
r2r_cnt_all[7] =(r2r_cnt_table_t){.id1=3, .t1=1, .r1=3, .p1=2,.id2=4, .t2=2, .r2=0, .p2=2 };
r2r_cnt_all[8] =(r2r_cnt_table_t){.id1=4, .t1=2, .r1=0, .p1=1,.id2=13, .t2=3, .r2=1, .p2=2 };
r2r_cnt_all[9] =(r2r_cnt_table_t){.id1=4, .t1=2, .r1=0, .p1=2,.id2=3, .t2=1, .r2=3, .p2=2 };
r2r_cnt_all[10] =(r2r_cnt_table_t){.id1=4, .t1=2, .r1=0, .p1=3,.id2=6, .t2=2, .r2=2, .p2=3 };
r2r_cnt_all[11] =(r2r_cnt_table_t){.id1=5, .t1=2, .r1=1, .p1=1,.id2=15, .t2=3, .r2=3, .p2=4 };
r2r_cnt_all[12] =(r2r_cnt_table_t){.id1=5, .t1=2, .r1=1, .p1=2,.id2=6, .t2=2, .r2=2, .p2=2 };
r2r_cnt_all[13] =(r2r_cnt_table_t){.id1=5, .t1=2, .r1=1, .p1=3,.id2=9, .t2=2, .r2=5, .p2=2 };
r2r_cnt_all[14] =(r2r_cnt_table_t){.id1=6, .t1=2, .r1=2, .p1=1,.id2=13, .t2=3, .r2=1, .p2=3 };
r2r_cnt_all[15] =(r2r_cnt_table_t){.id1=6, .t1=2, .r1=2, .p1=2,.id2=5, .t2=2, .r2=1, .p2=2 };
r2r_cnt_all[16] =(r2r_cnt_table_t){.id1=6, .t1=2, .r1=2, .p1=3,.id2=4, .t2=2, .r2=0, .p2=3 };
r2r_cnt_all[17] =(r2r_cnt_table_t){.id1=7, .t1=2, .r1=3, .p1=1,.id2=8, .t2=2, .r2=4, .p2=3 };
r2r_cnt_all[18] =(r2r_cnt_table_t){.id1=7, .t1=2, .r1=3, .p1=2,.id2=10, .t2=2, .r2=6, .p2=2 };
r2r_cnt_all[19] =(r2r_cnt_table_t){.id1=7, .t1=2, .r1=3, .p1=3,.id2=1, .t2=1, .r2=1, .p2=1 };
r2r_cnt_all[20] =(r2r_cnt_table_t){.id1=8, .t1=2, .r1=4, .p1=1,.id2=12, .t2=3, .r2=0, .p2=4 };
r2r_cnt_all[21] =(r2r_cnt_table_t){.id1=8, .t1=2, .r1=4, .p1=2,.id2=14, .t2=3, .r2=2, .p2=3 };
r2r_cnt_all[22] =(r2r_cnt_table_t){.id1=8, .t1=2, .r1=4, .p1=3,.id2=7, .t2=2, .r2=3, .p2=1 };
r2r_cnt_all[23] =(r2r_cnt_table_t){.id1=9, .t1=2, .r1=5, .p1=1,.id2=12, .t2=3, .r2=0, .p2=2 };
r2r_cnt_all[24] =(r2r_cnt_table_t){.id1=9, .t1=2, .r1=5, .p1=2,.id2=5, .t2=2, .r2=1, .p2=3 };
r2r_cnt_all[25] =(r2r_cnt_table_t){.id1=9, .t1=2, .r1=5, .p1=3,.id2=0, .t2=1, .r2=0, .p2=2 };
r2r_cnt_all[26] =(r2r_cnt_table_t){.id1=10, .t1=2, .r1=6, .p1=1,.id2=12, .t2=3, .r2=0, .p2=3 };
r2r_cnt_all[27] =(r2r_cnt_table_t){.id1=10, .t1=2, .r1=6, .p1=2,.id2=7, .t2=2, .r2=3, .p2=2 };
r2r_cnt_all[28] =(r2r_cnt_table_t){.id1=10, .t1=2, .r1=6, .p1=3,.id2=0, .t2=1, .r2=0, .p2=1 };
r2r_cnt_all[29] =(r2r_cnt_table_t){.id1=11, .t1=2, .r1=7, .p1=1,.id2=14, .t2=3, .r2=2, .p2=4 };
r2r_cnt_all[30] =(r2r_cnt_table_t){.id1=11, .t1=2, .r1=7, .p1=2,.id2=2, .t2=1, .r2=2, .p2=1 };
r2r_cnt_all[31] =(r2r_cnt_table_t){.id1=11, .t1=2, .r1=7, .p1=3,.id2=3, .t2=1, .r2=3, .p2=1 };
r2r_cnt_all[32] =(r2r_cnt_table_t){.id1=12, .t1=3, .r1=0, .p1=1,.id2=15, .t2=3, .r2=3, .p2=1 };
r2r_cnt_all[33] =(r2r_cnt_table_t){.id1=12, .t1=3, .r1=0, .p1=2,.id2=9, .t2=2, .r2=5, .p2=1 };
r2r_cnt_all[34] =(r2r_cnt_table_t){.id1=12, .t1=3, .r1=0, .p1=3,.id2=10, .t2=2, .r2=6, .p2=1 };
r2r_cnt_all[35] =(r2r_cnt_table_t){.id1=12, .t1=3, .r1=0, .p1=4,.id2=8, .t2=2, .r2=4, .p2=1 };
r2r_cnt_all[36] =(r2r_cnt_table_t){.id1=13, .t1=3, .r1=1, .p1=1,.id2=15, .t2=3, .r2=3, .p2=3 };
r2r_cnt_all[37] =(r2r_cnt_table_t){.id1=13, .t1=3, .r1=1, .p1=2,.id2=4, .t2=2, .r2=0, .p2=1 };
r2r_cnt_all[38] =(r2r_cnt_table_t){.id1=13, .t1=3, .r1=1, .p1=3,.id2=6, .t2=2, .r2=2, .p2=1 };
r2r_cnt_all[39] =(r2r_cnt_table_t){.id1=13, .t1=3, .r1=1, .p1=4,.id2=14, .t2=3, .r2=2, .p2=2 };
r2r_cnt_all[40] =(r2r_cnt_table_t){.id1=14, .t1=3, .r1=2, .p1=1,.id2=15, .t2=3, .r2=3, .p2=2 };
r2r_cnt_all[41] =(r2r_cnt_table_t){.id1=14, .t1=3, .r1=2, .p1=2,.id2=13, .t2=3, .r2=1, .p2=4 };
r2r_cnt_all[42] =(r2r_cnt_table_t){.id1=14, .t1=3, .r1=2, .p1=3,.id2=8, .t2=2, .r2=4, .p2=2 };
r2r_cnt_all[43] =(r2r_cnt_table_t){.id1=14, .t1=3, .r1=2, .p1=4,.id2=11, .t2=2, .r2=7, .p2=1 };
r2r_cnt_all[44] =(r2r_cnt_table_t){.id1=15, .t1=3, .r1=3, .p1=1,.id2=12, .t2=3, .r2=0, .p2=1 };
r2r_cnt_all[45] =(r2r_cnt_table_t){.id1=15, .t1=3, .r1=3, .p1=2,.id2=14, .t2=3, .r2=2, .p2=1 };
r2r_cnt_all[46] =(r2r_cnt_table_t){.id1=15, .t1=3, .r1=3, .p1=3,.id2=13, .t2=3, .r2=1, .p2=1 };
r2r_cnt_all[47] =(r2r_cnt_table_t){.id1=15, .t1=3, .r1=3, .p1=4,.id2=5, .t2=2, .r2=1, .p2=1 };
 
R2R_TABLE_SIZ=48;
}
/mesh4x4_noc.h
0,0 → 1,187
 
 
 
 
void topology_connect_all_nodes (void){
//Connect R8 input ports 0 to T8 output ports 0
connect_r2e(1,0,0,8);
//Connect R8 input ports 1 to R9 output ports 3
conect_r2r(1,0,1,1,1,3);
//Connect R8 input ports 2 to R4 output ports 4
conect_r2r(1,0,2,1,8,4);
//Connect R8 port 3 to ground
connect_r2gnd(1,0,3);
//Connect R8 input ports 4 to R12 output ports 2
conect_r2r(1,0,4,1,12,2);
//Connect R9 input ports 0 to T9 output ports 0
connect_r2e(1,1,0,9);
//Connect R9 input ports 1 to R10 output ports 3
conect_r2r(1,1,1,1,2,3);
//Connect R9 input ports 2 to R5 output ports 4
conect_r2r(1,1,2,1,9,4);
//Connect R9 input ports 3 to R8 output ports 1
conect_r2r(1,1,3,1,0,1);
//Connect R9 input ports 4 to R13 output ports 2
conect_r2r(1,1,4,1,13,2);
//Connect R10 input ports 0 to T10 output ports 0
connect_r2e(1,2,0,10);
//Connect R10 input ports 1 to R11 output ports 3
conect_r2r(1,2,1,1,3,3);
//Connect R10 input ports 2 to R6 output ports 4
conect_r2r(1,2,2,1,10,4);
//Connect R10 input ports 3 to R9 output ports 1
conect_r2r(1,2,3,1,1,1);
//Connect R10 input ports 4 to R14 output ports 2
conect_r2r(1,2,4,1,14,2);
//Connect R11 input ports 0 to T11 output ports 0
connect_r2e(1,3,0,11);
//Connect R11 port 1 to ground
connect_r2gnd(1,3,1);
//Connect R11 input ports 2 to R7 output ports 4
conect_r2r(1,3,2,1,11,4);
//Connect R11 input ports 3 to R10 output ports 1
conect_r2r(1,3,3,1,2,1);
//Connect R11 input ports 4 to R15 output ports 2
conect_r2r(1,3,4,1,15,2);
//Connect R0 input ports 0 to T0 output ports 0
connect_r2e(1,4,0,0);
//Connect R0 input ports 1 to R1 output ports 3
conect_r2r(1,4,1,1,5,3);
//Connect R0 port 2 to ground
connect_r2gnd(1,4,2);
//Connect R0 port 3 to ground
connect_r2gnd(1,4,3);
//Connect R0 input ports 4 to R4 output ports 2
conect_r2r(1,4,4,1,8,2);
//Connect R1 input ports 0 to T1 output ports 0
connect_r2e(1,5,0,1);
//Connect R1 input ports 1 to R2 output ports 3
conect_r2r(1,5,1,1,6,3);
//Connect R1 port 2 to ground
connect_r2gnd(1,5,2);
//Connect R1 input ports 3 to R0 output ports 1
conect_r2r(1,5,3,1,4,1);
//Connect R1 input ports 4 to R5 output ports 2
conect_r2r(1,5,4,1,9,2);
//Connect R2 input ports 0 to T2 output ports 0
connect_r2e(1,6,0,2);
//Connect R2 input ports 1 to R3 output ports 3
conect_r2r(1,6,1,1,7,3);
//Connect R2 port 2 to ground
connect_r2gnd(1,6,2);
//Connect R2 input ports 3 to R1 output ports 1
conect_r2r(1,6,3,1,5,1);
//Connect R2 input ports 4 to R6 output ports 2
conect_r2r(1,6,4,1,10,2);
//Connect R3 input ports 0 to T3 output ports 0
connect_r2e(1,7,0,3);
//Connect R3 port 1 to ground
connect_r2gnd(1,7,1);
//Connect R3 port 2 to ground
connect_r2gnd(1,7,2);
//Connect R3 input ports 3 to R2 output ports 1
conect_r2r(1,7,3,1,6,1);
//Connect R3 input ports 4 to R7 output ports 2
conect_r2r(1,7,4,1,11,2);
//Connect R4 input ports 0 to T4 output ports 0
connect_r2e(1,8,0,4);
//Connect R4 input ports 1 to R5 output ports 3
conect_r2r(1,8,1,1,9,3);
//Connect R4 input ports 2 to R0 output ports 4
conect_r2r(1,8,2,1,4,4);
//Connect R4 port 3 to ground
connect_r2gnd(1,8,3);
//Connect R4 input ports 4 to R8 output ports 2
conect_r2r(1,8,4,1,0,2);
//Connect R5 input ports 0 to T5 output ports 0
connect_r2e(1,9,0,5);
//Connect R5 input ports 1 to R6 output ports 3
conect_r2r(1,9,1,1,10,3);
//Connect R5 input ports 2 to R1 output ports 4
conect_r2r(1,9,2,1,5,4);
//Connect R5 input ports 3 to R4 output ports 1
conect_r2r(1,9,3,1,8,1);
//Connect R5 input ports 4 to R9 output ports 2
conect_r2r(1,9,4,1,1,2);
//Connect R6 input ports 0 to T6 output ports 0
connect_r2e(1,10,0,6);
//Connect R6 input ports 1 to R7 output ports 3
conect_r2r(1,10,1,1,11,3);
//Connect R6 input ports 2 to R2 output ports 4
conect_r2r(1,10,2,1,6,4);
//Connect R6 input ports 3 to R5 output ports 1
conect_r2r(1,10,3,1,9,1);
//Connect R6 input ports 4 to R10 output ports 2
conect_r2r(1,10,4,1,2,2);
//Connect R7 input ports 0 to T7 output ports 0
connect_r2e(1,11,0,7);
//Connect R7 port 1 to ground
connect_r2gnd(1,11,1);
//Connect R7 input ports 2 to R3 output ports 4
conect_r2r(1,11,2,1,7,4);
//Connect R7 input ports 3 to R6 output ports 1
conect_r2r(1,11,3,1,10,1);
//Connect R7 input ports 4 to R11 output ports 2
conect_r2r(1,11,4,1,3,2);
//Connect R12 input ports 0 to T12 output ports 0
connect_r2e(1,12,0,12);
//Connect R12 input ports 1 to R13 output ports 3
conect_r2r(1,12,1,1,13,3);
//Connect R12 input ports 2 to R8 output ports 4
conect_r2r(1,12,2,1,0,4);
//Connect R12 port 3 to ground
connect_r2gnd(1,12,3);
//Connect R12 port 4 to ground
connect_r2gnd(1,12,4);
//Connect R13 input ports 0 to T13 output ports 0
connect_r2e(1,13,0,13);
//Connect R13 input ports 1 to R14 output ports 3
conect_r2r(1,13,1,1,14,3);
//Connect R13 input ports 2 to R9 output ports 4
conect_r2r(1,13,2,1,1,4);
//Connect R13 input ports 3 to R12 output ports 1
conect_r2r(1,13,3,1,12,1);
//Connect R13 port 4 to ground
connect_r2gnd(1,13,4);
//Connect R14 input ports 0 to T14 output ports 0
connect_r2e(1,14,0,14);
//Connect R14 input ports 1 to R15 output ports 3
conect_r2r(1,14,1,1,15,3);
//Connect R14 input ports 2 to R10 output ports 4
conect_r2r(1,14,2,1,2,4);
//Connect R14 input ports 3 to R13 output ports 1
conect_r2r(1,14,3,1,13,1);
//Connect R14 port 4 to ground
connect_r2gnd(1,14,4);
//Connect R15 input ports 0 to T15 output ports 0
connect_r2e(1,15,0,15);
//Connect R15 port 1 to ground
connect_r2gnd(1,15,1);
//Connect R15 input ports 2 to R11 output ports 4
conect_r2r(1,15,2,1,3,4);
//Connect R15 input ports 3 to R14 output ports 1
conect_r2r(1,15,3,1,14,1);
//Connect R15 port 4 to ground
connect_r2gnd(1,15,4);
 
}
 
void topology_init(void){
router1[0]->current_r_addr=0;
router1[1]->current_r_addr=1;
router1[2]->current_r_addr=2;
router1[3]->current_r_addr=3;
router1[4]->current_r_addr=4;
router1[5]->current_r_addr=5;
router1[6]->current_r_addr=6;
router1[7]->current_r_addr=7;
router1[8]->current_r_addr=8;
router1[9]->current_r_addr=9;
router1[10]->current_r_addr=10;
router1[11]->current_r_addr=11;
router1[12]->current_r_addr=12;
router1[13]->current_r_addr=13;
router1[14]->current_r_addr=14;
router1[15]->current_r_addr=15;
 
}

powered by: WebSVN 2.1.0

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