mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-14 04:48:46 +00:00
Fix spacing in opt_share tests, change wording in opt_share help
This commit is contained in:
parent
c075486c59
commit
280c4e7794
|
@ -2,6 +2,7 @@
|
||||||
* yosys -- Yosys Open SYnthesis Suite
|
* yosys -- Yosys Open SYnthesis Suite
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
|
* Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
|
||||||
|
* 2019 Bogdan Vukobratovic <bogdan.vukobratovic@gmail.com>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -308,17 +309,20 @@ void remove_multi_user_outbits(RTLIL::Module *module, dict<RTLIL::SigBit, RTLIL:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct OptRmdffPass : public Pass {
|
struct OptSharePass : public Pass {
|
||||||
OptRmdffPass() : Pass("opt_share", "merge arithmetic operators that share an operand") {}
|
OptSharePass() : Pass("opt_share", "merge arithmetic operators that share an operand") {}
|
||||||
void help() YS_OVERRIDE
|
void help() YS_OVERRIDE
|
||||||
{
|
{
|
||||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" opt_share [selection]\n");
|
log(" opt_share [selection]\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log("This pass identifies arithmetic operators that share an operand and whose\n");
|
|
||||||
log("results are used in mutually exclusive cases controlled by a multiplexer,\n");
|
log("This pass identifies mutually exclusive $alu arithmetic cells that:\n");
|
||||||
log("and merges them together by multiplexing the other operands.\n");
|
log(" (a) share an input operand\n");
|
||||||
|
log(" (b) drive the same $mux, $_MUX_, or $pmux multiplexing cell allowing\n");
|
||||||
|
log(" the $alu cell to be merged and the multiplexer to be moved from\n");
|
||||||
|
log(" multiplexing its output to multiplexing the non-shared input operands.\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
}
|
}
|
||||||
void execute(std::vector<std::string>, RTLIL::Design *design) YS_OVERRIDE
|
void execute(std::vector<std::string>, RTLIL::Design *design) YS_OVERRIDE
|
||||||
|
@ -454,6 +458,6 @@ struct OptRmdffPass : public Pass {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} OptRmdffPass;
|
} OptSharePass;
|
||||||
|
|
||||||
PRIVATE_NAMESPACE_END
|
PRIVATE_NAMESPACE_END
|
||||||
|
|
|
@ -6,7 +6,6 @@ module opt_share_test(
|
||||||
output reg signed [15:0] res
|
output reg signed [15:0] res
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
always @* begin
|
always @* begin
|
||||||
case(sel)
|
case(sel)
|
||||||
0: res = a + b;
|
0: res = a + b;
|
||||||
|
|
|
@ -6,7 +6,6 @@ module opt_share_test(
|
||||||
output reg [31:0] res
|
output reg [31:0] res
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
always @* begin
|
always @* begin
|
||||||
case(sel)
|
case(sel)
|
||||||
0: res = {a + b, a};
|
0: res = {a + b, a};
|
||||||
|
|
|
@ -7,7 +7,6 @@ module opt_share_test(
|
||||||
output reg [15:0] res
|
output reg [15:0] res
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
always @* begin
|
always @* begin
|
||||||
case(sel)
|
case(sel)
|
||||||
0: res = a + d;
|
0: res = a + d;
|
||||||
|
|
|
@ -6,7 +6,6 @@ module opt_share_test(
|
||||||
output reg [15:0] res
|
output reg [15:0] res
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
always @* begin
|
always @* begin
|
||||||
case(sel)
|
case(sel)
|
||||||
0: res = a + b;
|
0: res = a + b;
|
||||||
|
|
|
@ -6,7 +6,6 @@ module opt_share_test(
|
||||||
output reg [15:0] res
|
output reg [15:0] res
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
always @* begin
|
always @* begin
|
||||||
case(sel)
|
case(sel)
|
||||||
0: res = a + b;
|
0: res = a + b;
|
||||||
|
|
Loading…
Reference in a new issue