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
    from Rev 21 to Rev 22
    Reverse comparison

Rev 21 → Rev 22

/src_modelsim/testbench_modelsim.v
81,12 → 81,12
 
 
module testbench_sub #(
parameter V=4,
parameter V=1,
parameter P=5,
parameter B=5,
parameter NX=8,
parameter NY=8,
parameter C=2,
parameter C=1,
parameter Fpay=32,
parameter MUX_TYPE="ONE_HOT",
parameter VC_REALLOCATION_TYPE="NONATOMIC",
/perl_gui/lib/perl/mpsoc_gen.pl
28,7 → 28,19
require "hdr_file_gen.pl";
 
 
sub get_pos{
my ($item,@list)=@_;
my $pos=0;
foreach my $p (@list){
#print "$p eq $item\n";
if ($p eq $item){return $pos;}
$pos++;
}
return undef;
}
 
 
sub noc_param_widget{
my ($mpsoc,$name,$param, $default,$type,$content,$info, $state,$table,$row,$show)=@_;
my $label =gen_label_in_left(" $name");
52,7 → 64,12
}
elsif ($type eq "Combo-box"){
my @combo_list=split(",",$content);
my $pos=get_item_pos($value, @combo_list);
my $pos=get_pos($value, @combo_list);
if(!defined $pos){
$mpsoc->mpsoc_add_param($param,$default);
$pos=get_item_pos($default, @combo_list);
}
#print " my $pos=get_item_pos($value, @combo_list);\n";
$widget=gen_combo(\@combo_list, $pos);
$widget-> signal_connect("changed" => sub{
731,6 → 748,19
$table->attach_defaults ( $b1 , 0, 4, $row,$row+1);$row++;
}
#Router type
$label='Router Type';
$param='ROUTER_TYPE';
$default='"VC_BASED"';
$content='"INPUT_QUEUED","VC_BASED"';
$type='Combo-box';
$info=" Input-queued: simple router with low performance and does not support fully adaptive routing.
VC-based routers offer higher performance, fully adaptive routing and traffic isolation for different packet classes.";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
my $router_type=$mpsoc->mpsoc_get_param("ROUTER_TYPE");
#P port number
$label= 'Port Number';
$param= 'P';
740,6 → 770,7
$type= 'Spin-button';
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
 
#Routers per row
$label= 'Routers per row';
761,23 → 792,31
$type= 'Spin-button';
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
 
#VC number per port
$label='VC number per port';
$param='V';
$default='2';
$type='Spin-button';
$content='2,16,1';
$info='Number of Virtual Channel per each router port';
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
if($router_type eq '"VC_BASED"'){
#VC number per port
my $v=$mpsoc->mpsoc_get_param('V');
$mpsoc->mpsoc_add_param('V',2) if($v eq 1);
$label='VC number per port';
$param='V';
$default='2';
$type='Spin-button';
$content='2,16,1';
$info='Number of Virtual Channel per each router port';
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
} else {
$mpsoc->mpsoc_add_param('V',1);
$mpsoc->mpsoc_add_param('C',0);
}
#buffer width per VC
$label='Buffer flits per VC';
$label=($router_type eq '"VC_BASED"')? 'Buffer flits per VC': "Buffer flits";
$param='B';
$default='4';
$content='2,256,1';
$type='Spin-button';
$info='Buffer queue per VC in flits';
$info=($router_type eq '"VC_BASED"')? 'Buffer queue size per VC in flits' : 'Buffer queue size in flits';
$row= noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
#packet payload width
803,8 → 842,16
$label='Routing Algorithm';
$param="ROUTE_NAME";
$type="Combo-box";
$content=($topology eq '"MESH"')? '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST","DUATO"' :
'"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST","TRANC_DUATO"';
if($router_type eq '"VC_BASED"'){
$content=($topology eq '"MESH"')? '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST","DUATO"' :
'"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST","TRANC_DUATO"';
}else{
$content=($topology eq '"MESH"')? '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST"' :
'"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST"';
}
$default=($topology eq '"MESH"')? '"XY"':'"TRANC_XY"';
$info="Select the routing algorithm: XY(DoR) , partially adaptive (Turn models). Fully adaptive (Duato) ";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
840,15 → 887,31
$type="Spin-button";
$content="0,12,1";
$info="Congestion index determines how congestion information is collected from neighboring routers. Please refer to the usere manual for more information";
$default=7;
$default=3;
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
}
#Fully adaptive routing setting
if( $route eq '"TRANC_DUATO"' or $route eq '"DUATO"' ){
my $v=$mpsoc->mpsoc_get_param("V");
$label="Select Escap VC";
$param="ESCAP_VC_MASK";
$type="Check-box";
$content=$v;
$default="$v\'b";
for (my $i=1; $i<=$v-1; $i++){$default= "${default}0";}
$default= "${default}1";
$info="Select the escap VC for fully adaptive routing.";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
}
# VC reallocation type
$label='VC reallocation type';
$label=($router_type eq '"VC_BASED"')? 'VC reallocation type': 'Queue reallocation type';
$param='VC_REALLOCATION_TYPE';
$info="VC reallocation type: Atomic: A VC can be allocated when it is empty. Nonatomic a VC is allocated when the tail flit is injected in.";
$info="VC reallocation type: If set as atomic only empty VCs can be allocated for new packets. Whereas, in non-atomic a non-empty VC which has received the last packet tail flit can accept a new packet";
$default='"NONATOMIC"';
$content='"ATOMIC","NONATOMIC"';
$type='Combo-box';
857,17 → 920,18
 
 
 
 
if ($router_type eq '"VC_BASED"'){
#vc/sw allocator type
$label = 'VC/SW combination type';
$param='COMBINATION_TYPE';
$default='"COMB_SPEC1"';
$default='"COMB_NONSPEC"';
$content='"BASELINE","COMB_SPEC1","COMB_SPEC2","COMB_NONSPEC"';
$type='Combo-box';
$info="The joint VC/ switch allocator type. using canonical combination is not recommanded";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
 
 
}
# Crossbar mux type
$label='Crossbar mux type';
$param='MUX_TYPE';
877,7 → 941,7
$info="Crossbar multiplexer type";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
if($router_type eq '"VC_BASED"'){
#class
$label='class number';
$param='C';
908,35 → 972,10
}
 
 
#Fully adaptive routing setting
if( $route eq '"TRANC_DUATO"' or $route eq '"DUATO"' ){
my $v=$mpsoc->mpsoc_get_param("V");
$label="Select Escap VC";
$param="ESCAP_VC_MASK";
$type="Check-box";
$content=$v;
$default="$v\'b";
for (my $i=1; $i<=$v-1; $i++){$default= "${default}0";}
$default= "${default}1";
$info="Select the escap VC for fully adaptive routing.";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
}
}#($router_type eq '"VC_BASED"')
# non determinstic
if( $route ne '"TRANC_XY"' or $route eq '"XY"' ){
#CONGESTION_INDEX
$label='congestion index';
$param='CONGESTION_INDEX';
$default= 3;
$info='Congestion index determins how congestion information must be extracted from the router.';
$content='0,12,1';
$type="Spin-button";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
}
 
#simulation debuge enable
$label='Debug enable';
957,7 → 996,7
$content=1;
$default="1\'b0";
$info="If ebabled it adds a pipline register at the output port of the router.";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
$label="Add pipeline reg befor crossbar";
966,7 → 1005,7
$content=1;
$default="1\'b0";
$info="If ebabled it adds a pipline register after the input memory sd ram.";
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
$row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
 
/perl_gui/lib/perl/soc_gen.pl
102,7 → 102,7
my ($soc,$instance_id,$soc_state)=@_;
$soc->soc_remove_instance($instance_id);
$soc->soc_remove_from_instance_order($instance_id);
set_state($soc_state,"refresh_soc",1);
set_state($soc_state,"refresh_soc",0);
}
 
 
227,7 → 227,7
}#plugs
set_state($soc_state,"refresh_soc",1);
set_state($soc_state,"refresh_soc",0);
#$$refresh_soc->clicked;
});
344,7 → 344,7
});
$up->signal_connect (clicked => sub{
$soc->soc_decrease_instance_order($instance_id);
set_state($soc_state,"refresh_soc",1);
set_state($soc_state,"refresh_soc",0);
});
363,7 → 363,7
});
$dwn->signal_connect (clicked => sub{
$soc->soc_increase_instance_order($instance_id);
set_state($soc_state,"refresh_soc",1);
set_state($soc_state,"refresh_soc",0);
});
634,7 → 634,9
 
 
$$refresh_ref-> signal_connect("clicked" => sub{
$dev_table->destroy;
select(undef, undef, undef, 0.1); #wait 10 ms
$dev_table = generate_dev_table($soc,$ip,$infc,$soc_state,$info);
#$box->attach_defaults ($dev_table, 0, 1, 0, 1);#( $dev_table, FALSE, FALSE, 3);
$scrolled_win->add_with_viewport($dev_table);
/perl_gui/lib/perl/interface_gen.pl
603,6 → 603,7
 
$$refresh_ref-> signal_connect("clicked" => sub{
$dev_table->destroy;
select(undef, undef, undef, 0.1); #wait 10 ms
$dev_table = dev_box_gen($infc_gen,$soc_state,$info);
#$box->attach_defaults ($dev_table, 0, 1, 0, 1);#( $dev_table, FALSE, FALSE, 3);
$scrolled_win->add_with_viewport($dev_table);
/perl_gui/lib/perl/ip_gen.pl
490,6 → 490,7
 
$$refresh_ref-> signal_connect("clicked" => sub{
$table->destroy;
select(undef, undef, undef, 0.1); #wait 10 ms
$table = interface_info_box($intfc,$ipgen,$soc_state,$info,$info);
$scrolled_win->add_with_viewport($table);
/src_noc/noc.v
7,7 → 7,7
 
 
module noc #(
parameter V = 4, // V
parameter V = 2, // V
parameter P = 5, // router port num
parameter B = 4, // buffer space :flit per VC
parameter NX = 2, // number of node in x axis
16,7 → 16,7
parameter Fpay = 32,
parameter MUX_TYPE = "BINARY", //"ONE_HOT" or "BINARY"
parameter VC_REALLOCATION_TYPE = "NONATOMIC",// "ATOMIC" , "NONATOMIC"
parameter COMBINATION_TYPE= "BASELINE",// "BASELINE", "COMB_SPEC1", "COMB_SPEC2", "COMB_NONSPEC"
parameter COMBINATION_TYPE= "COMB_NONSPEC",// "BASELINE", "COMB_SPEC1", "COMB_SPEC2", "COMB_NONSPEC"
parameter FIRST_ARBITER_EXT_P_EN = 1,
parameter TOPOLOGY = "MESH",//"MESH","TORUS"
parameter ROUTE_TYPE = "DETERMINISTIC",// "DETERMINISTIC", "FULL_ADAPTIVE", "PAR_ADAPTIVE"
/src_noc/arbiter.v
94,8 → 94,12
input reset;
input priority_en;
generate
if(ARBITER_WIDTH<=4) begin :w4
if(ARBITER_WIDTH==1) begin: w1
assign grant= request;
assign any_grant =request;
end else if(ARBITER_WIDTH<=4) begin: w4
//my own arbiter
my_one_hot_arbiter_priority_en #(
.ARBITER_WIDTH (ARBITER_WIDTH)
/src_noc/traffic_gen.v
98,7 → 98,8
localparam RATIOw= log2(100),
VC_NUM_BCD_WIDTH = log2(V);
Vw = (V==1)? 1 : log2(V);
reg [2:0] ps,ns;
178,7 → 179,7
wire [X_Y_IN_HDR_WIDTH-1 : 0] rd_des_x_addr, rd_des_y_addr,rd_src_x_addr,rd_src_y_addr;
reg [CLK_CNTw-1 : 0] rsv_counter,last_pck_time;
reg [CLK_CNTw-1 : 0] clk_counter;
wire [VC_NUM_BCD_WIDTH-1 : 0] rd_vc_bin,wr_vc_bin;
wire [Vw-1 : 0] rd_vc_bin,wr_vc_bin;
reg [CLK_CNTw-1 : 0] rsv_time_stamp[V-1:0];
wire [V-1 : 0] rd_vc;
wire wr_vc_is_full,wr_vc_avb,wr_vc_is_empty;
324,9 → 325,14
.dest_y(current_y),
.distance(distance)
);
generate
if(V==1) begin : v1
assign rd_vc_bin=1'b0;
assign wr_vc_bin=1'b0;
end else begin :vother
 
one_hot_to_bin #( .ONE_HOT_WIDTH (V)) conv1
one_hot_to_bin #( .ONE_HOT_WIDTH (V)) conv1
(
.one_hot_code (rd_vc),
.bin_code (rd_vc_bin)
337,6 → 343,8
.one_hot_code (wr_vc),
.bin_code (wr_vc_bin)
);
end
endgenerate
assign ovc_wr_in = (flit_out_wr ) ? wr_vc : {V{1'b0}};

powered by: WebSVN 2.1.0

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