3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-19 01:32:20 +00:00

Improvements in SF2 flow and demo

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2019-03-05 19:49:39 -08:00
parent d03780c3f4
commit da5181a3df
4 changed files with 25 additions and 9 deletions

View file

@ -33,18 +33,23 @@ struct Sf2IobsPass : public Pass {
log("\n");
log("Add SF2 I/O buffers to top module IOs as needed.\n");
log("\n");
log(" -noclkbuf\n");
log(" Do not insert clock buffers\n");
log("\n");
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
{
bool noclkbuf_mode = false;
log_header(design, "Executing sf2_iobs pass (insert IO buffers).\n");
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
{
// if (args[argidx] == "-singleton") {
// singleton_mode = true;
// continue;
// }
if (args[argidx] == "-noclkbuf") {
noclkbuf_mode = true;
continue;
}
break;
}
extra_args(args, argidx, design);
@ -94,7 +99,7 @@ struct Sf2IobsPass : public Pass {
if (wire->port_output) {
buf_type = "\\OUTBUF";
buf_port = "\\D";
} else if (clk_bits.count(canonical_bit)) {
} else if (clk_bits.count(canonical_bit) && !noclkbuf_mode) {
buf_type = "\\CLKBUF";
buf_port = "\\Y";
} else {