forked from pulp-platform/snitch_cluster
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* xdma wrapper template * Upgrade xdmaTop generator * Another bug fix in xdmaTop generator * integrated generation of xdma * add the xdma configuration * Renaming major module of xdma * xdma integration * Compiled, not tested * xdma runtime finished, untest ed * Small bug fix + debug function * Fix typo in xdma-memset.c and update xdma CSR address calculation * Fix xdma_start() to return task ID and update printf statement * bug-fix: Update snitch_cluster_wrapper.sv.tpl and snax-xdma-lib.c * chore: Refactor xdma unit test job name and add system test job * Formatting python script * Add license header * Fix formatting of C code * Fix formatting of scala code * Fix ci format * chore: Add generated xdma files to SNAX_GEN list in Makefile * chore: Update ci.yml to include snax-xdma-run.yaml in the run command * chore: Remove unnecessary code in AddressGenUnit.scala * chore: Update .gitignore to include missing newline at end of file * Move ArgParser to utils * chore: Update snitch_cluster_wrapper.sv.tpl to remove the incrementation of pref_snax_count at the generation of xdma * Improve the comment * Improve comments * chore: Refactor xdma error handling * chore: Update ci.yml and remove erroneous Chisel Generation CI * Update scala unit test
- Loading branch information
Showing
34 changed files
with
1,548 additions
and
120 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package snax.utils | ||
|
||
object ArgParser { | ||
|
||
/* | ||
* Function to parse the arguments provided to the program | ||
* Arguments are expected to be in the form of --arg_name arg_value or --arg_name | ||
* Returns a map of argument names to their values | ||
*/ | ||
def parse(args: Array[String]): collection.mutable.Map[String, String] = { | ||
val parsed_args = collection.mutable.Map[String, String]() | ||
var i = 0 | ||
while (i < args.length) { | ||
if (args(i)(0) == '-' && args(i)(1) == '-') { | ||
if ( | ||
i == args.length - 1 || (args(i + 1)(0) == '-' && args(i + 1)( | ||
1 | ||
) == '-') | ||
) { | ||
// Last argument or next argument is also a flag | ||
parsed_args(args(i).substring(2)) = "NoArg" | ||
} else parsed_args(args(i).substring(2)) = args(i + 1) | ||
} | ||
i += 1 | ||
} | ||
if (parsed_args.size == 0) { | ||
println("No arguments provided. Please provide arguments") | ||
sys.exit(1) | ||
} | ||
parsed_args | ||
} | ||
} |
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
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
Oops, something went wrong.