Parses argument options for multiple operations.
33 selectedOptions = SelectedOptions();
34 selectedOptions.clk =
false;
35 selectedOptions.clb =
false;
36 selectedOptions.bram =
false;
37 selectedOptions.blank =
false;
38 selectedOptions.partialNotFull =
true;
39 selectedOptions.op = MergeOP::SET;
40 selectedOptions.skipUnused =
true;
41 selectedOptions.forceEndianness =
false;
42 selectedOptions.word =
false;
43 selectedOptions.intParam = 0;
44 replace(params.begin(), params.end(),
',',
' ');
45 std::stringstream ss(params);
49 if(param ==
"clock" || param ==
"clk")selectedOptions.clk =
true;
50 if(param ==
"logic" || param ==
"clb")selectedOptions.clb =
true;
51 if(param ==
"blockram" || param ==
"bram")selectedOptions.bram =
true;
52 if(param ==
"blank")selectedOptions.blank =
true;
53 if(param ==
"full")selectedOptions.partialNotFull =
false;
54 if(param ==
"partial")selectedOptions.partialNotFull =
true;
55 if(param ==
"word")selectedOptions.word =
true;
56 if(param ==
"set")selectedOptions.op = MergeOP::SET;
57 if(param ==
"xor")selectedOptions.op = MergeOP::XOR;
58 if(param ==
"or")selectedOptions.op = MergeOP::OR;
59 if(param ==
"and")selectedOptions.op = MergeOP::AND;
60 if(param ==
"bigendian"){
61 selectedOptions.forceEndianness =
true;
64 if(param ==
"littleendian"){
65 selectedOptions.forceEndianness =
true;
68 if(param ==
"bigendianwithbitswap"){
69 selectedOptions.forceEndianness =
true;
72 if(param ==
"littleendianwithbitswap"){
73 selectedOptions.forceEndianness =
true;
76 if(param ==
"nativeendian"){
77 selectedOptions.forceEndianness =
true;
83 selectedOptions.intParam = 0;
84 if(!selectedOptions.clk && !selectedOptions.clb && !selectedOptions.bram){
85 selectedOptions.clk = selectedOptions.bram = selectedOptions.clb =
true;
@ BE_BS
Big endian with bit swaps inside each byte.
@ LE_BS
Little endian with bit swaps inside each byte.
@ LE
Little endian ("LE" instead of full-er name, so it does not conflict with linux's reserved endianess ...
@ BE
Big endian ("BE" instead of full-er name, so it does not conflict with linux's reserved endianess wor...
@ NATIVE
System native will always be the fastest endianess to process.
bool multipleInts(std::stringstream &ss)
std::string replace(std::string str, char oldChar, char newChar)
Replaces all instances of oldChar in string str with newChar and returns the resulting string.