3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00

ecp5_gsr -> lattice_gsr, change opt_lut_ins to accept lattice as tech

This commit is contained in:
Miodrag Milanovic 2023-08-22 10:50:11 +02:00
parent 4a475fa7a2
commit a8809989c4
6 changed files with 17 additions and 16 deletions

View file

@ -1,5 +1,5 @@
OBJS += techlibs/ecp5/synth_ecp5.o techlibs/ecp5/ecp5_gsr.o
OBJS += techlibs/ecp5/synth_ecp5.o
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/cells_ff.vh))
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/cells_io.vh))

View file

@ -359,7 +359,7 @@ struct SynthEcp5Pass : public ScriptPass
run("techmap -D NO_LUT -map +/ecp5/cells_map.v");
run("opt_expr -undriven -mux_undef");
run("simplemap");
run("ecp5_gsr");
run("lattice_gsr");
run("attrmvcp -copy -attr syn_useioff");
run("opt_clean");
}
@ -404,7 +404,7 @@ struct SynthEcp5Pass : public ScriptPass
run("techmap -map +/ecp5/cells_map.v", "(skip if -vpr)");
else if (!vpr)
run("techmap -map +/ecp5/cells_map.v");
run("opt_lut_ins -tech ecp5");
run("opt_lut_ins -tech lattice");
run("clean");
}

View file

@ -0,0 +1 @@
OBJS += techlibs/lattice/lattice_gsr.o

View file

@ -24,13 +24,13 @@
USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN
struct Ecp5GsrPass : public Pass {
Ecp5GsrPass() : Pass("ecp5_gsr", "ECP5: handle GSR") { }
struct LatticeGsrPass : public Pass {
LatticeGsrPass() : Pass("lattice_gsr", "Lattice: handle GSR") { }
void help() override
{
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n");
log(" ecp5_gsr [options] [selection]\n");
log(" lattice_gsr [options] [selection]\n");
log("\n");
log("Trim active low async resets connected to GSR and resolve GSR parameter,\n");
log("if a GSR or SGSR primitive is used in the design.\n");
@ -42,7 +42,7 @@ struct Ecp5GsrPass : public Pass {
}
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
log_header(design, "Executing ECP5_GSR pass (implement FF init values).\n");
log_header(design, "Executing LATTICE_GSR pass (implement FF init values).\n");
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
@ -130,6 +130,6 @@ struct Ecp5GsrPass : public Pass {
}
}
} Ecp5GsrPass;
} LatticeGsrPass;
PRIVATE_NAMESPACE_END

View file

@ -239,7 +239,7 @@ struct SynthMachXO2Pass : public ScriptPass
run("techmap -D NO_LUT -map +/machxo2/cells_map.v");
run("opt_expr -undriven -mux_undef");
run("simplemap");
run("ecp5_gsr");
run("lattice_gsr");
run("attrmvcp -copy -attr syn_useioff");
run("opt_clean");
}