Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix weights between router and node. #31

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6e2b938
fix weights between router and node.
Stfort52 Jan 5, 2022
b18105d
New GetSimTime
Stfort52 Jan 27, 2022
8f3c1cb
update .gitignore
Stfort52 Jan 27, 2022
17cc4de
remove legacy GetSimTime
Stfort52 Jan 27, 2022
b2ae00e
Fix implicit GetSimTime calls
Stfort52 Jan 27, 2022
43941ea
New constructors for BufferState and BufferPolicy
Stfort52 Jan 27, 2022
af65bca
Update BufferPolicy::New
Stfort52 Jan 27, 2022
1acb923
Change Module::_clock to protected
Stfort52 Jan 27, 2022
04c01bd
Update Bufferstate construction
Stfort52 Jan 27, 2022
e5bc006
Fixed Buffer Constructor
Stfort52 Jan 27, 2022
0327188
Fixed Buffer creations
Stfort52 Jan 27, 2022
337b5a6
Fixed fifo Constructor
Stfort52 Jan 27, 2022
06e1e1f
Fixed fifo creation
Stfort52 Jan 27, 2022
a566a76
Fixed Stats Constructor
Stfort52 Jan 27, 2022
4eb26d8
Fixed Stats creation
Stfort52 Jan 27, 2022
c8bbcbd
Getters for _clock in Module
Stfort52 Jan 27, 2022
72bcccc
Fixed TimedModule Constructor
Stfort52 Jan 27, 2022
6dd8214
Fixed Channel Constructor
Stfort52 Jan 27, 2022
7d07b5a
Fixed FlitChannel Constructor
Stfort52 Jan 27, 2022
1b02b2e
Fix Base, IQ, Chaos, Event Rotuers
Stfort52 Jan 27, 2022
cd69717
Fixed Network Base Class and Anynet, CMesh, Fly.
Stfort52 Jan 27, 2022
1fe585b
Fixed Network Topology DragonFly, FatTree, FFoC, KNCube, QTree, Tree4
Stfort52 Jan 27, 2022
f6492ff
Updated main to meet the new Network Class structure
Stfort52 Jan 27, 2022
8f5dcb0
Fixed Virtual Channel construction
Stfort52 Jan 27, 2022
fd7cf50
Fixed Base Arbiter and its Derived Arbiters
Stfort52 Jan 27, 2022
4cd4869
Fixed PriorityArbiter and its Creation in EventRouter
Stfort52 Jan 27, 2022
0c3a520
Fixed base Allocator and its derived iSLIP, LOA, PIM, MaxSizeMatch
Stfort52 Jan 27, 2022
2004b57
Fixed Seperable, SelAlloc, WaveFront allocators and updated allocator…
Stfort52 Jan 27, 2022
acdb29e
Fixed Power_Module constructor and its usage
Stfort52 Jan 27, 2022
27dbd10
Fix TrafficManager and BatchTrafficManager creation and usage
Stfort52 Jan 27, 2022
e70b9a3
Remove legacy code
Stfort52 Jan 27, 2022
d26789e
Fix mistakes
Stfort52 Jan 27, 2022
1f69296
remove legacy of Module
Stfort52 Jan 27, 2022
53d53d0
Integrate Network creation into TrafficManager
Stfort52 Jan 27, 2022
25bc314
New box class
Stfort52 Jan 28, 2022
bae671b
Put flits in boxes
Stfort52 Jan 28, 2022
6e3bff9
Update Trafficmanager to use flitbox
Stfort52 Jan 28, 2022
e58ce1e
Put PacketReplyInfo into Boxes
Stfort52 Jan 28, 2022
e332c86
Update TrafficManager to use PckReplyBox
Stfort52 Jan 28, 2022
79e0538
Put Credits in a box
Stfort52 Jan 28, 2022
1f0246a
Update TrafficManager out of statics
Stfort52 Jan 28, 2022
b9a288d
Update routers to access its trafficmanager's CreditBox
Stfort52 Jan 28, 2022
c0d7a3b
Update Networks to pass CreditBoxes through
Stfort52 Jan 28, 2022
6f4d425
Parser Fix is not viable - just added wrappers
Stfort52 Jan 28, 2022
c878498
remove global VC information and pack into RoutingConfig
Stfort52 Jan 28, 2022
54efd6b
Added RoutingConfig to Routers, VC, TrafficManager
Stfort52 Jan 28, 2022
aa4af3a
Update networks to use RoutingConfig
Stfort52 Jan 28, 2022
d95a723
Fix const static varialbes for saving router stall causes
Stfort52 Jan 29, 2022
cc4c33a
Update Router constructors to get Networks as parent and add _owner f…
Stfort52 Jan 30, 2022
c5841b0
Fix static functions and variables in topology CMesh.
Stfort52 Jan 30, 2022
6a03401
Fixed and removed globals on dragonfly topology
Stfort52 Jan 30, 2022
b591657
Remove static variables and fixed routing funcitons on FlatFlyOnChip
Stfort52 Feb 1, 2022
33411c9
Fix topology AnyNet and its routing
Stfort52 Feb 1, 2022
eb41023
Remove & integrate global variables gK, gN, and gC
Stfort52 Feb 1, 2022
ace3bb2
Remove & Integrate global gNodes
Stfort52 Feb 1, 2022
69e05ce
Merge pull request #1 from Stfort52/dev
Stfort52 Feb 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
._*
.Apple*
.DS_Store
.vscode/**
.local/**
**/.gdb*
**/peda*
30 changes: 15 additions & 15 deletions src/allocators/allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
//==================================================

Allocator::Allocator( Module *parent, const string& name,
int inputs, int outputs ) :
Module( parent, name ), _inputs( inputs ), _outputs( outputs ), _dirty( false )
int inputs, int outputs, Module *clock ) :
Module( parent, name, clock ), _inputs( inputs ), _outputs( outputs ), _dirty( false )
{
_inmatch.resize(_inputs, -1);
_outmatch.resize(_outputs, -1);
Expand Down Expand Up @@ -112,8 +112,8 @@ void Allocator::PrintGrants( ostream * os ) const
//==================================================

DenseAllocator::DenseAllocator( Module *parent, const string& name,
int inputs, int outputs ) :
Allocator( parent, name, inputs, outputs )
int inputs, int outputs, Module *clock ) :
Allocator( parent, name, inputs, outputs, clock )
{
_request.resize(_inputs);

Expand Down Expand Up @@ -256,8 +256,8 @@ void DenseAllocator::PrintRequests( ostream * os ) const
//==================================================

SparseAllocator::SparseAllocator( Module *parent, const string& name,
int inputs, int outputs ) :
Allocator( parent, name, inputs, outputs )
int inputs, int outputs, Module *clock ) :
Allocator( parent, name, inputs, outputs, clock )
{
_in_req.resize(_inputs);
_out_req.resize(_outputs);
Expand Down Expand Up @@ -445,30 +445,30 @@ Allocator *Allocator::NewAllocator( Module *parent, const string& name,
}
}
if ( alloc_name == "max_size" ) {
a = new MaxSizeMatch( parent, name, inputs, outputs );
a = new MaxSizeMatch( parent, name, inputs, outputs, parent->GetClock() );
} else if ( alloc_name == "pim" ) {
int iters = param_str.empty() ? (config ? config->GetInt("alloc_iters") : 1) : atoi(param_str.c_str());
a = new PIM( parent, name, inputs, outputs, iters );
a = new PIM( parent, name, inputs, outputs, iters, parent->GetClock() );
} else if ( alloc_name == "islip" ) {
int iters = param_str.empty() ? (config ? config->GetInt("alloc_iters") : 1) : atoi(param_str.c_str());
a = new iSLIP_Sparse( parent, name, inputs, outputs, iters );
a = new iSLIP_Sparse( parent, name, inputs, outputs, iters, parent->GetClock() );
} else if ( alloc_name == "loa" ) {
a = new LOA( parent, name, inputs, outputs );
a = new LOA( parent, name, inputs, outputs, parent->GetClock() );
} else if ( alloc_name == "wavefront" ) {
a = new Wavefront( parent, name, inputs, outputs );
a = new Wavefront( parent, name, inputs, outputs, parent->GetClock() );
} else if ( alloc_name == "rr_wavefront" ) {
a = new Wavefront( parent, name, inputs, outputs, true );
a = new Wavefront( parent, name, inputs, outputs, parent->GetClock(), true );
} else if ( alloc_name == "select" ) {
int iters = param_str.empty() ? (config ? config->GetInt("alloc_iters") : 1) : atoi(param_str.c_str());
a = new SelAlloc( parent, name, inputs, outputs, iters );
a = new SelAlloc( parent, name, inputs, outputs, iters, parent->GetClock() );
} else if (alloc_name == "separable_input_first") {
string arb_type = param_str.empty() ? (config ? config->GetStr("arb_type") : "round_robin") : param_str;
a = new SeparableInputFirstAllocator( parent, name, inputs, outputs,
arb_type );
arb_type, parent->GetClock() );
} else if (alloc_name == "separable_output_first") {
string arb_type = param_str.empty() ? (config ? config->GetStr("arb_type") : "round_robin") : param_str;
a = new SeparableOutputFirstAllocator( parent, name, inputs, outputs,
arb_type );
arb_type, parent->GetClock() );
}

//==================================================
Expand Down
6 changes: 3 additions & 3 deletions src/allocators/allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Allocator : public Module {
};

Allocator( Module *parent, const string& name,
int inputs, int outputs );
int inputs, int outputs, Module *clock );

virtual void Clear( );

Expand Down Expand Up @@ -98,7 +98,7 @@ class DenseAllocator : public Allocator {

public:
DenseAllocator( Module *parent, const string& name,
int inputs, int outputs );
int inputs, int outputs, Module *clock );

void Clear( );

Expand Down Expand Up @@ -134,7 +134,7 @@ class SparseAllocator : public Allocator {

public:
SparseAllocator( Module *parent, const string& name,
int inputs, int outputs );
int inputs, int outputs, Module *clock );

void Clear( );

Expand Down
4 changes: 2 additions & 2 deletions src/allocators/islip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
//#define DEBUG_ISLIP

iSLIP_Sparse::iSLIP_Sparse( Module *parent, const string& name,
int inputs, int outputs, int iters ) :
SparseAllocator( parent, name, inputs, outputs ),
int inputs, int outputs, int iters, Module *clock ) :
SparseAllocator( parent, name, inputs, outputs, clock ),
_iSLIP_iter(iters)
{
_gptrs.resize(_outputs, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/islip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class iSLIP_Sparse : public SparseAllocator {

public:
iSLIP_Sparse( Module *parent, const string& name,
int inputs, int outputs, int iters );
int inputs, int outputs, int iters, Module *clock );

void Allocate( );
};
Expand Down
4 changes: 2 additions & 2 deletions src/allocators/loa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include "random_utils.hpp"

LOA::LOA( Module *parent, const string& name,
int inputs, int outputs ) :
DenseAllocator( parent, name, inputs, outputs )
int inputs, int outputs, Module *clock ) :
DenseAllocator( parent, name, inputs, outputs, clock )
{
_req.resize(inputs);
_counts.resize(outputs);
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/loa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LOA : public DenseAllocator {

public:
LOA( Module *parent, const string& name,
int inputs, int outputs );
int inputs, int outputs, Module *clock );

void Allocate( );
};
Expand Down
4 changes: 2 additions & 2 deletions src/allocators/maxsize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
//#define PRINT_MATCHING

MaxSizeMatch::MaxSizeMatch( Module *parent, const string& name,
int inputs, int outputs ) :
DenseAllocator( parent, name, inputs, outputs )
int inputs, int outputs, Module *clock ) :
DenseAllocator( parent, name, inputs, outputs, clock )
{
_from.resize(outputs);
_s = new int [inputs];
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/maxsize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MaxSizeMatch : public DenseAllocator {

public:
MaxSizeMatch( Module *parent, const string& name,
int inputs, int ouputs );
int inputs, int ouputs, Module *clock );
~MaxSizeMatch( );

void Allocate( );
Expand Down
4 changes: 2 additions & 2 deletions src/allocators/pim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
//#define DEBUG_PIM

PIM::PIM( Module *parent, const string& name,
int inputs, int outputs, int iters ) :
DenseAllocator( parent, name, inputs, outputs ),
int inputs, int outputs, int iters, Module *clock ) :
DenseAllocator( parent, name, inputs, outputs, clock ),
_PIM_iter(iters)
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/pim.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PIM : public DenseAllocator {

public:
PIM( Module *parent, const string& name,
int inputs, int outputs, int iters );
int inputs, int outputs, int iters, Module *clock );

~PIM( );

Expand Down
4 changes: 2 additions & 2 deletions src/allocators/selalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
//#define DEBUG_SELALLOC

SelAlloc::SelAlloc( Module *parent, const string& name,
int inputs, int outputs, int iters ) :
SparseAllocator( parent, name, inputs, outputs )
int inputs, int outputs, int iters, Module *clock ) :
SparseAllocator( parent, name, inputs, outputs, clock )
{
_iter = iters;

Expand Down
2 changes: 1 addition & 1 deletion src/allocators/selalloc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SelAlloc : public SparseAllocator {

public:
SelAlloc( Module *parent, const string& name,
int inputs, int outputs, int iters );
int inputs, int outputs, int iter, Module *clock );

void Allocate( );

Expand Down
5 changes: 2 additions & 3 deletions src/allocators/separable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
#include "arbiter.hpp"

SeparableAllocator::SeparableAllocator( Module* parent, const string& name,
int inputs, int outputs,
const string& arb_type )
: SparseAllocator( parent, name, inputs, outputs )
int inputs, int outputs,const string& arb_type, Module *clock )
: SparseAllocator( parent, name, inputs, outputs, clock )
{

_input_arb.resize(inputs);
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/separable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class SeparableAllocator : public SparseAllocator {
public:

SeparableAllocator( Module* parent, const string& name, int inputs,
int outputs, const string& arb_type ) ;
int outputs, const string& arb_type, Module *clock ) ;

virtual ~SeparableAllocator() ;

Expand Down
4 changes: 2 additions & 2 deletions src/allocators/separable_input_first.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

SeparableInputFirstAllocator::
SeparableInputFirstAllocator( Module* parent, const string& name, int inputs,
int outputs, const string& arb_type )
: SeparableAllocator( parent, name, inputs, outputs, arb_type )
int outputs, const string& arb_type, Module *clock )
: SeparableAllocator( parent, name, inputs, outputs, arb_type, clock )
{}

void SeparableInputFirstAllocator::Allocate() {
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/separable_input_first.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SeparableInputFirstAllocator : public SeparableAllocator {
public:

SeparableInputFirstAllocator( Module* parent, const string& name, int inputs,
int outputs, const string& arb_type ) ;
int outputs, const string& arb_type, Module *clock ) ;

virtual void Allocate() ;

Expand Down
4 changes: 2 additions & 2 deletions src/allocators/separable_output_first.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

SeparableOutputFirstAllocator::
SeparableOutputFirstAllocator( Module* parent, const string& name, int inputs,
int outputs, const string& arb_type )
: SeparableAllocator( parent, name, inputs, outputs, arb_type )
int outputs, const string& arb_type, Module *clock )
: SeparableAllocator( parent, name, inputs, outputs, arb_type, clock )
{}

void SeparableOutputFirstAllocator::Allocate() {
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/separable_output_first.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SeparableOutputFirstAllocator : public SeparableAllocator {
public:

SeparableOutputFirstAllocator( Module* parent, const string& name, int inputs,
int outputs, const string& arb_type ) ;
int outputs, const string& arb_type, Module *clock ) ;

virtual void Allocate() ;

Expand Down
4 changes: 2 additions & 2 deletions src/allocators/wavefront.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#include "wavefront.hpp"

Wavefront::Wavefront( Module *parent, const string& name,
int inputs, int outputs, bool skip_diags ) :
DenseAllocator( parent, name, inputs, outputs ),
int inputs, int outputs, Module *clock, bool skip_diags ) :
DenseAllocator( parent, name, inputs, outputs, clock ),
_last_in(-1), _last_out(-1), _skip_diags(skip_diags),
_square(max(inputs, outputs)), _pri(0), _num_requests(0)
{
Expand Down
2 changes: 1 addition & 1 deletion src/allocators/wavefront.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Wavefront : public DenseAllocator {

public:
Wavefront( Module *parent, const string& name,
int inputs, int outputs, bool skip_diags = false );
int inputs, int outputs, Module *clock, bool skip_diags = false );

virtual void AddRequest( int in, int out, int label = 1,
int in_pri = 0, int out_pri = 0 );
Expand Down
10 changes: 5 additions & 5 deletions src/arbiters/arbiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

using namespace std ;

Arbiter::Arbiter( Module *parent, const string &name, int size )
: Module( parent, name ),
Arbiter::Arbiter( Module *parent, const string &name, int size, Module *clock )
: Module( parent, name, clock ),
_size(size), _selected(-1), _highest_pri(numeric_limits<int>::min()),
_best_input(-1), _num_reqs(0)
{
Expand Down Expand Up @@ -93,9 +93,9 @@ Arbiter *Arbiter::NewArbiter( Module *parent, const string& name,
{
Arbiter *a = NULL;
if(arb_type == "round_robin") {
a = new RoundRobinArbiter( parent, name, size );
a = new RoundRobinArbiter( parent, name, size, parent->GetClock() );
} else if(arb_type == "matrix") {
a = new MatrixArbiter( parent, name, size );
a = new MatrixArbiter( parent, name, size, parent->GetClock() );
} else if(arb_type.substr(0, 5) == "tree(") {
size_t left = 4;
size_t middle = arb_type.find_first_of(',');
Expand All @@ -105,7 +105,7 @@ Arbiter *Arbiter::NewArbiter( Module *parent, const string& name,
string groups_str = arb_type.substr(left+1, middle-left-1);
int groups = atoi(groups_str.c_str());
string sub_arb_type = arb_type.substr(middle+1, right-middle-1);
a = new TreeArbiter( parent, name, size, groups, sub_arb_type );
a = new TreeArbiter( parent, name, size, groups, sub_arb_type, parent->GetClock() );
} else assert(false);
return a;
}
2 changes: 1 addition & 1 deletion src/arbiters/arbiter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Arbiter : public Module {
public:
int _num_reqs ;
// Constructors
Arbiter( Module *parent, const string &name, int size ) ;
Arbiter( Module *parent, const string &name, int size, Module *clock ) ;

// Print priority matrix to standard output
virtual void PrintState() const = 0 ;
Expand Down
4 changes: 2 additions & 2 deletions src/arbiters/matrix_arb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#include <iostream>
using namespace std ;

MatrixArbiter::MatrixArbiter( Module *parent, const string &name, int size )
: Arbiter( parent, name, size ), _last_req(-1) {
MatrixArbiter::MatrixArbiter( Module *parent, const string &name, int size, Module *clock )
: Arbiter( parent, name, size, clock ), _last_req(-1) {
_matrix.resize(size);
for ( int i = 0 ; i < size ; i++ ) {
_matrix[i].resize(size);
Expand Down
2 changes: 1 addition & 1 deletion src/arbiters/matrix_arb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MatrixArbiter : public Arbiter {
public:

// Constructors
MatrixArbiter( Module *parent, const string &name, int size ) ;
MatrixArbiter( Module *parent, const string &name, int size, Module *clock ) ;

// Print priority matrix to standard output
virtual void PrintState() const ;
Expand Down
4 changes: 2 additions & 2 deletions src/arbiters/prio_arb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

PriorityArbiter::PriorityArbiter( const Configuration &config,
Module *parent, const string& name,
int inputs )
: Module( parent, name ), _rr_ptr(0), _inputs( inputs )
int inputs, Module * clock )
: Module( parent, name, clock ), _rr_ptr(0), _inputs( inputs )
{

}
Expand Down
2 changes: 1 addition & 1 deletion src/arbiters/prio_arb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PriorityArbiter : public Module {
public:
PriorityArbiter( const Configuration &config,
Module *parent, const string& name,
int inputs );
int inputs, Module * clock );

void Clear( );

Expand Down
4 changes: 2 additions & 2 deletions src/arbiters/roundrobin_arb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
using namespace std ;

RoundRobinArbiter::RoundRobinArbiter( Module *parent, const string &name,
int size )
: Arbiter( parent, name, size ), _pointer( 0 ) {
int size, Module *clock )
: Arbiter( parent, name, size, clock ), _pointer( 0 ) {
}

void RoundRobinArbiter::PrintState() const {
Expand Down
2 changes: 1 addition & 1 deletion src/arbiters/roundrobin_arb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RoundRobinArbiter : public Arbiter {
public:

// Constructors
RoundRobinArbiter( Module *parent, const string &name, int size ) ;
RoundRobinArbiter( Module *parent, const string &name, int size, Module *clock ) ;

// Print priority matrix to standard output
virtual void PrintState() const ;
Expand Down
Loading