-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Reverts keys to src and dst only. By using a 32-bit register for each, instead of a 64-bit for both, solves the problem with reading values from the controller. This commit includes some variable renaming to allow for a more intuitive read.
- Loading branch information
1 parent
da7a7b7
commit 72bf1b9
Showing
5 changed files
with
107 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
//key fields (MV SKETCH) | ||
register<bit<64>>(SKETCH_WIDTH) sketch_key0; //src, dst | ||
register<bit<64>>(SKETCH_WIDTH) sketch_key1; //sport, dport, proto | ||
//*------------------------------------------------------------------*// | ||
//*-----------------------------MV Sketch----------------------------*// | ||
//*------------------------------------------------------------------*// | ||
|
||
//count fields (MV SKETCH) | ||
register<int<32>>(SKETCH_WIDTH) sketch_count; //count for the mjrty | ||
register<bit<32>>(SKETCH_WIDTH) srcAddr; //key field: src | ||
register<bit<32>>(SKETCH_WIDTH) dstAddr; //key_field: dst | ||
|
||
//control-aux registers | ||
register<bit<1>>(1) sketch_flag; // 1 bit flag for forecasting sketch selection | ||
register<bit<32>>(SKETCH_DEPTH) extra_op_counter; // counter for extra operation | ||
register<bit<48>>(1) epoch; //timestamps require bit<48> | ||
register<bit<1>>(SKETCH_WIDTH*SKETCH_DEPTH) control_flag; // 1 bit flag sketch | ||
register<int<32>>(SKETCH_WIDTH) sketch_count; //count field for the mjrty | ||
|
||
//error and forecast sketches | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) forecast_sketch0; | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) forecast_sketch1; | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) error_sketch0; | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) error_sketch1; | ||
//*------------------------------------------------------------------*// | ||
//*---------------------------K-Ary Sketch---------------------------*// | ||
//*------------------------------------------------------------------*// | ||
|
||
register<bit<1>>(1) sketch_flag; // 1 bit flag for forecast sketch selection | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) forecast_sketch_f0; //forecast sketch used when the sketch flag is 0 | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) forecast_sketch_f1; //forecast sketch used when the sketch flag is 1 | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) error_sketch_f0; //error sketch used when the sketch flag is 0 | ||
register<int<32>>(SKETCH_WIDTH*SKETCH_DEPTH) error_sketch_f1; //error sketch used when the sketch flag is 1 | ||
register<bit<1>>(SKETCH_WIDTH*SKETCH_DEPTH) control_flag; // 1 bit control-flag sketch | ||
|
||
//*------------------------------------------------------------------*// | ||
//*-----------------------Application Registers----------------------*// | ||
//*------------------------------------------------------------------*// | ||
|
||
register<bit<48>>(1) epoch; //timestamps require bit<48> | ||
register<bit<32>>(SKETCH_DEPTH) extra_op_counter; // counter for extra operation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters