From 0bb7d1373f33a8db0f6ab8b6a2586102178e3750 Mon Sep 17 00:00:00 2001 From: C77874 Date: Thu, 4 Jul 2024 08:53:41 -0700 Subject: [PATCH] changes made to filenames + references --- passes/pmgen/Makefile.inc | 16 +- .../pmgen/{mchp_dsp.cc => microchip_dsp.cc} | 115 ++++++------- .../pmgen/{mchp_dsp.pmg => microchip_dsp.pmg} | 4 +- ...hp_dsp_CREG.pmg => microchip_dsp_CREG.pmg} | 10 +- ..._cascade.pmg => microchip_dsp_cascade.pmg} | 4 +- techlibs/{mchp => microchip}/LSRAM.txt | 0 techlibs/{mchp => microchip}/LSRAM_map.v | 0 techlibs/{mchp => microchip}/Makefile.inc | 22 +-- techlibs/{mchp => microchip}/arith_map.v | 4 +- techlibs/{mchp => microchip}/brams_defs.vh | 0 techlibs/{mchp => microchip}/cells_map.v | 8 +- techlibs/{mchp => microchip}/cells_sim.v | 6 +- .../microchip_dffopt.cc} | 86 +++++----- .../polarfire_dsp_map.v} | 0 .../synth_microchip.cc} | 152 +++++++++--------- .../tests/Registers/Registers.v | 0 .../tests/Registers/Registers.ys | 2 +- .../tests/carryout/carryout.v | 0 .../tests/carryout/carryout.ys | 2 +- .../tests/cascade/cascade.v | 0 .../tests/cascade/cascade.ys | 2 +- .../tests/dff_opt/dff_opt.v | 0 .../tests/dff_opt/dff_opt.ys | 2 +- .../tests/full_dsp/full_dsp.v | 0 .../tests/full_dsp/full_dsp.ys | 2 +- .../tests/large_mult/large_mult.v | 0 .../tests/large_mult/large_mult.ys | 2 +- techlibs/{mchp => microchip}/tests/mac/mac.v | 0 techlibs/{mchp => microchip}/tests/mac/mac.ys | 2 +- .../tests/postAdd_mult/postAdd_mult.v | 0 .../tests/postAdd_mult/postAdd_mult.ys | 2 +- .../tests/post_adder/post_adder.v | 0 .../tests/post_adder/post_adder.ys | 2 +- .../tests/pre_adder_dsp/pre_adder_dsp.v | 0 .../tests/pre_adder_dsp/pre_adder_dsp.ys | 2 +- .../tests/ram_SDP/ram_SDP.v | 0 .../tests/ram_SDP/ram_SDP.ys | 2 +- .../tests/ram_TDP/ram_TDP.v | 0 .../tests/ram_TDP/ram_TDP.ys | 2 +- .../{mchp => microchip}/tests/reduce/reduce.v | 0 .../tests/reduce/reduce.ys | 2 +- .../{mchp => microchip}/tests/reg_c/reg_c.v | 0 .../{mchp => microchip}/tests/reg_c/reg_c.ys | 2 +- .../tests/reg_test/reg_test.v | 0 .../tests/reg_test/reg_test.ys | 2 +- .../tests/signed_mult/signed_mult.v | 0 .../tests/signed_mult/signed_mult.ys | 2 +- .../tests/simple_ram/simple_ram.v | 0 .../tests/simple_ram/simple_ram.ys | 2 +- .../tests/unsigned_mult/unsigned_mult.v | 0 .../tests/unsigned_mult/unsigned_mult.ys | 2 +- .../tests/uram_ar/uram_ar.v | 0 .../tests/uram_ar/uram_ar.ys | 2 +- .../tests/uram_sr/uram_sr.v | 0 .../tests/uram_sr/uram_sr.ys | 2 +- .../tests/widemux/widemux.v | 0 .../tests/widemux/widemux.ys | 2 +- techlibs/{mchp => microchip}/uSRAM.txt | 0 techlibs/{mchp => microchip}/uSRAM_map.v | 0 59 files changed, 228 insertions(+), 241 deletions(-) rename passes/pmgen/{mchp_dsp.cc => microchip_dsp.cc} (80%) rename passes/pmgen/{mchp_dsp.pmg => microchip_dsp.pmg} (99%) rename passes/pmgen/{mchp_dsp_CREG.pmg => microchip_dsp_CREG.pmg} (93%) rename passes/pmgen/{mchp_dsp_cascade.pmg => microchip_dsp_cascade.pmg} (98%) rename techlibs/{mchp => microchip}/LSRAM.txt (100%) rename techlibs/{mchp => microchip}/LSRAM_map.v (100%) rename techlibs/{mchp => microchip}/Makefile.inc (50%) rename techlibs/{mchp => microchip}/arith_map.v (96%) rename techlibs/{mchp => microchip}/brams_defs.vh (100%) rename techlibs/{mchp => microchip}/cells_map.v (92%) rename techlibs/{mchp => microchip}/cells_sim.v (98%) rename techlibs/{mchp/mchp_dffopt.cc => microchip/microchip_dffopt.cc} (88%) rename techlibs/{mchp/pf_dsp_map.v => microchip/polarfire_dsp_map.v} (100%) rename techlibs/{mchp/synth_mchp.cc => microchip/synth_microchip.cc} (80%) rename techlibs/{mchp => microchip}/tests/Registers/Registers.v (100%) rename techlibs/{mchp => microchip}/tests/Registers/Registers.ys (93%) rename techlibs/{mchp => microchip}/tests/carryout/carryout.v (100%) rename techlibs/{mchp => microchip}/tests/carryout/carryout.ys (93%) rename techlibs/{mchp => microchip}/tests/cascade/cascade.v (100%) rename techlibs/{mchp => microchip}/tests/cascade/cascade.ys (93%) rename techlibs/{mchp => microchip}/tests/dff_opt/dff_opt.v (100%) rename techlibs/{mchp => microchip}/tests/dff_opt/dff_opt.ys (93%) rename techlibs/{mchp => microchip}/tests/full_dsp/full_dsp.v (100%) rename techlibs/{mchp => microchip}/tests/full_dsp/full_dsp.ys (93%) rename techlibs/{mchp => microchip}/tests/large_mult/large_mult.v (100%) rename techlibs/{mchp => microchip}/tests/large_mult/large_mult.ys (93%) rename techlibs/{mchp => microchip}/tests/mac/mac.v (100%) rename techlibs/{mchp => microchip}/tests/mac/mac.ys (94%) rename techlibs/{mchp => microchip}/tests/postAdd_mult/postAdd_mult.v (100%) rename techlibs/{mchp => microchip}/tests/postAdd_mult/postAdd_mult.ys (92%) rename techlibs/{mchp => microchip}/tests/post_adder/post_adder.v (100%) rename techlibs/{mchp => microchip}/tests/post_adder/post_adder.ys (93%) rename techlibs/{mchp => microchip}/tests/pre_adder_dsp/pre_adder_dsp.v (100%) rename techlibs/{mchp => microchip}/tests/pre_adder_dsp/pre_adder_dsp.ys (92%) rename techlibs/{mchp => microchip}/tests/ram_SDP/ram_SDP.v (100%) rename techlibs/{mchp => microchip}/tests/ram_SDP/ram_SDP.ys (93%) rename techlibs/{mchp => microchip}/tests/ram_TDP/ram_TDP.v (100%) rename techlibs/{mchp => microchip}/tests/ram_TDP/ram_TDP.ys (91%) rename techlibs/{mchp => microchip}/tests/reduce/reduce.v (100%) rename techlibs/{mchp => microchip}/tests/reduce/reduce.ys (93%) rename techlibs/{mchp => microchip}/tests/reg_c/reg_c.v (100%) rename techlibs/{mchp => microchip}/tests/reg_c/reg_c.ys (93%) rename techlibs/{mchp => microchip}/tests/reg_test/reg_test.v (100%) rename techlibs/{mchp => microchip}/tests/reg_test/reg_test.ys (93%) rename techlibs/{mchp => microchip}/tests/signed_mult/signed_mult.v (100%) rename techlibs/{mchp => microchip}/tests/signed_mult/signed_mult.ys (92%) rename techlibs/{mchp => microchip}/tests/simple_ram/simple_ram.v (100%) rename techlibs/{mchp => microchip}/tests/simple_ram/simple_ram.ys (93%) rename techlibs/{mchp => microchip}/tests/unsigned_mult/unsigned_mult.v (100%) rename techlibs/{mchp => microchip}/tests/unsigned_mult/unsigned_mult.ys (92%) rename techlibs/{mchp => microchip}/tests/uram_ar/uram_ar.v (100%) rename techlibs/{mchp => microchip}/tests/uram_ar/uram_ar.ys (93%) rename techlibs/{mchp => microchip}/tests/uram_sr/uram_sr.v (100%) rename techlibs/{mchp => microchip}/tests/uram_sr/uram_sr.ys (93%) rename techlibs/{mchp => microchip}/tests/widemux/widemux.v (100%) rename techlibs/{mchp => microchip}/tests/widemux/widemux.ys (93%) rename techlibs/{mchp => microchip}/uSRAM.txt (100%) rename techlibs/{mchp => microchip}/uSRAM_map.v (100%) diff --git a/passes/pmgen/Makefile.inc b/passes/pmgen/Makefile.inc index 581ce2416..ef6bffb11 100644 --- a/passes/pmgen/Makefile.inc +++ b/passes/pmgen/Makefile.inc @@ -37,14 +37,14 @@ $(eval $(call add_extra_objs,passes/pmgen/xilinx_dsp_cascade_pm.h)) # -------------------------------------- -OBJS += passes/pmgen/mchp_dsp.o -GENFILES += passes/pmgen/mchp_dsp_pm.h -GENFILES += passes/pmgen/mchp_dsp_CREG_pm.h -GENFILES += passes/pmgen/mchp_dsp_cascade_pm.h -passes/pmgen/mchp_dsp.o: passes/pmgen/mchp_dsp_pm.h passes/pmgen/mchp_dsp_CREG_pm.h passes/pmgen/mchp_dsp_cascade_pm.h -$(eval $(call add_extra_objs,passes/pmgen/mchp_dsp_pm.h)) -$(eval $(call add_extra_objs,passes/pmgen/mchp_dsp_CREG_pm.h)) -$(eval $(call add_extra_objs,passes/pmgen/mchp_dsp_cascade_pm.h)) +OBJS += passes/pmgen/microvhip.o +GENFILES += passes/pmgen/microchip_dsp_pm.h +GENFILES += passes/pmgen/microchip_dsp_CREG_pm.h +GENFILES += passes/pmgen/microchip_dsp_cascade_pm.h +passes/pmgen/microchip_dsp.o: passes/pmgen/microchip_dsp_pm.h passes/pmgen/microchip_dsp_CREG_pm.h passes/pmgen/microchip_dsp_cascade_pm.h +$(eval $(call add_extra_objs,passes/pmgen/microchip_dsp_pm.h)) +$(eval $(call add_extra_objs,passes/pmgen/microchip_dsp_CREG_pm.h)) +$(eval $(call add_extra_objs,passes/pmgen/microchip_dsp_cascade_pm.h)) # -------------------------------------- diff --git a/passes/pmgen/mchp_dsp.cc b/passes/pmgen/microchip_dsp.cc similarity index 80% rename from passes/pmgen/mchp_dsp.cc rename to passes/pmgen/microchip_dsp.cc index 8a1bf0b3c..8207f4be3 100644 --- a/passes/pmgen/mchp_dsp.cc +++ b/passes/pmgen/microchip_dsp.cc @@ -16,25 +16,25 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "kernel/yosys.h" #include "kernel/sigtools.h" +#include "kernel/yosys.h" #include USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -#include "passes/pmgen/mchp_dsp_pm.h" -#include "passes/pmgen/mchp_dsp_CREG_pm.h" -#include "passes/pmgen/mchp_dsp_cascade_pm.h" +#include "passes/pmgen/microchip_dsp_CREG_pm.h" +#include "passes/pmgen/microchip_dsp_cascade_pm.h" +#include "passes/pmgen/microchip_dsp_pm.h" -void mchp_dsp_pack(mchp_dsp_pm &pm) +void microchip_dsp_pack(microchip_dsp_pm &pm) { - auto &st = pm.st_mchp_dsp_pack; + auto &st = pm.st_microchip_dsp_pack; - log("Analysing %s.%s for MCHP MACC_PA packing.\n", log_id(pm.module), log_id(st.dsp)); + log("Analysing %s.%s for Microchip MACC_PA packing.\n", log_id(pm.module), log_id(st.dsp)); Cell *cell = st.dsp; - //pack pre-adder + // pack pre-adder if (st.preAdderStatic) { SigSpec &pasub = cell->connections_.at(ID(PASUB)); log(" static PASUB preadder %s (%s)\n", log_id(st.preAdderStatic), log_id(st.preAdderStatic->type)); @@ -42,8 +42,7 @@ void mchp_dsp_pack(mchp_dsp_pm &pm) bool B_SIGNED = st.preAdderStatic->getParam(ID::A_SIGNED).as_bool(); st.sigB.extend_u0(18, B_SIGNED); st.sigD.extend_u0(18, D_SIGNED); - if (st.moveBtoA) - { + if (st.moveBtoA) { cell->setPort(ID::A, st.sigA); // if pre-adder feeds into A, original sigB will be moved to port A } cell->setPort(ID::B, st.sigB); @@ -59,7 +58,7 @@ void mchp_dsp_pack(mchp_dsp_pm &pm) pm.autoremove(st.preAdderStatic); } - //pack post-adder + // pack post-adder if (st.postAdderStatic) { log(" postadder %s (%s)\n", log_id(st.postAdderStatic), log_id(st.postAdderStatic->type)); SigSpec &sub = cell->connections_.at(ID(SUB)); @@ -73,28 +72,25 @@ void mchp_dsp_pack(mchp_dsp_pm &pm) log_assert(!"strange post-adder type"); if (st.useFeedBack) { - cell->setPort(ID(CDIN_FDBK_SEL), {State::S0, State::S1}); + cell->setPort(ID(CDIN_FDBK_SEL), {State::S0, State::S1}); } else { st.sigC.extend_u0(48, st.postAdderStatic->getParam(ID::A_SIGNED).as_bool()); - cell->setPort(ID::C, st.sigC); + cell->setPort(ID::C, st.sigC); } - pm.autoremove(st.postAdderStatic); } - + // pack registers - if (st.clock != SigBit()) - { + if (st.clock != SigBit()) { cell->setPort(ID::CLK, st.clock); // function to absorb a register - auto f = [&pm,cell](SigSpec &A, Cell* ff, IdString ceport, IdString rstport, IdString bypass) { - + auto f = [&pm, cell](SigSpec &A, Cell *ff, IdString ceport, IdString rstport, IdString bypass) { // input/output ports SigSpec D = ff->getPort(ID::D); SigSpec Q = pm.sigmap(ff->getPort(ID::Q)); - + if (!A.empty()) A.replace(Q, D); if (rstport != IdString()) { @@ -118,21 +114,19 @@ void mchp_dsp_pack(mchp_dsp_pm &pm) bool cepol = ff->getParam(ID::EN_POLARITY).as_bool(); // enables are all active high cell->setPort(ceport, cepol ? ce : pm.module->Not(NEW_ID, ce)); - } - else { + } else { // enables are all active high - cell->setPort(ceport, State::S1); + cell->setPort(ceport, State::S1); } // bypass set to 0 - cell->setPort(bypass, State::S0); - + cell->setPort(bypass, State::S0); for (auto c : Q.chunks()) { auto it = c.wire->attributes.find(ID::init); if (it == c.wire->attributes.end()) continue; - for (int i = c.offset; i < c.offset+c.width; i++) { + for (int i = c.offset; i < c.offset + c.width; i++) { log_assert(it->second[i] == State::S0 || it->second[i] == State::Sx); it->second[i] = State::Sx; } @@ -164,7 +158,7 @@ void mchp_dsp_pack(mchp_dsp_pm &pm) } else { f(D, st.ffD, ID(D_EN), ID(D_SRST_N), ID(D_BYPASS)); } - + pm.add_siguser(D, cell); cell->setPort(ID::D, D); } @@ -189,29 +183,27 @@ void mchp_dsp_pack(mchp_dsp_pm &pm) SigSpec P = st.sigP; if (GetSize(P) < 48) - P.append(pm.module->addWire(NEW_ID, 48-GetSize(P))); + P.append(pm.module->addWire(NEW_ID, 48 - GetSize(P))); cell->setPort(ID::P, P); pm.blacklist(cell); } // For packing cascaded DSPs -void mchp_dsp_packC(mchp_dsp_CREG_pm &pm) +void microchip_dsp_packC(microchip_dsp_CREG_pm &pm) { - auto &st = pm.st_mchp_dsp_packC; + auto &st = pm.st_microchip_dsp_packC; - log_debug("Analysing %s.%s for MCHP DSP packing (REG_C).\n", log_id(pm.module), log_id(st.dsp)); + log_debug("Analysing %s.%s for Microchip DSP packing (REG_C).\n", log_id(pm.module), log_id(st.dsp)); log_debug("ffC: %s\n", log_id(st.ffC, "--")); Cell *cell = st.dsp; - if (st.clock != SigBit()) - { + if (st.clock != SigBit()) { cell->setPort(ID::CLK, st.clock); // same function as above, used for the last CREG we need to absorb - auto f = [&pm,cell](SigSpec &A, Cell* ff, IdString ceport, IdString rstport, IdString bypass) { - + auto f = [&pm, cell](SigSpec &A, Cell *ff, IdString ceport, IdString rstport, IdString bypass) { // input/output ports SigSpec D = ff->getPort(ID::D); SigSpec Q = pm.sigmap(ff->getPort(ID::Q)); @@ -240,18 +232,17 @@ void mchp_dsp_packC(mchp_dsp_CREG_pm &pm) cell->setPort(ceport, cepol ? ce : pm.module->Not(NEW_ID, ce)); } else { // enables are all active high - cell->setPort(ceport, State::S1); + cell->setPort(ceport, State::S1); } // bypass set to 0 - cell->setPort(bypass, State::S0); - + cell->setPort(bypass, State::S0); for (auto c : Q.chunks()) { auto it = c.wire->attributes.find(ID::init); if (it == c.wire->attributes.end()) continue; - for (int i = c.offset; i < c.offset+c.width; i++) { + for (int i = c.offset; i < c.offset + c.width; i++) { log_assert(it->second[i] == State::S0 || it->second[i] == State::Sx); it->second[i] = State::Sx; } @@ -260,7 +251,7 @@ void mchp_dsp_packC(mchp_dsp_CREG_pm &pm) if (st.ffC) { SigSpec C = cell->getPort(ID::C); - + if (st.ffC->type.in(ID($adff), ID($adffe))) { f(C, st.ffC, ID(C_EN), ID(C_ARST_N), ID(C_BYPASS)); } else { @@ -280,17 +271,17 @@ void mchp_dsp_packC(mchp_dsp_CREG_pm &pm) pm.blacklist(cell); } -struct MchpDspPass : public Pass { - MchpDspPass() : Pass("mchp_dsp", "MCHP: pack resources into DSPs") { } +struct MicrochipDspPass : public Pass { + MicrochipDspPass() : Pass("microchip_dsp", "MICROCHIP: pack resources into DSPs") {} void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" mchp_dsp [options] [selection]\n"); + log(" microchip_dsp [options] [selection]\n"); log("\n"); log("Pack input registers 'A', 'B', 'C', and 'D' (with optional enable/reset),\n"); log("output register 'P' (with optional enable/reset), pre-adder and/or post-adder into\n"); - log("MCHP DSP resources.\n"); + log("Microchip DSP resources.\n"); log("\n"); log("Multiply-accumulate operations using the post-adder with feedback on the 'C'\n"); log("input will be folded into the DSP. In this scenario only, the 'C' input can be\n"); @@ -303,24 +294,23 @@ struct MchpDspPass : public Pass { log("implement wide multipliers). Cascade chains are limited to a mazimum length \n"); log("of 24 cells, corresponding to PolarFire (pf) devices.\n"); log("\n"); - log("This pass is a no-op if the scratchpad variable 'mchp_dsp.multonly' is set\n"); + log("This pass is a no-op if the scratchpad variable 'microchip_dsp.multonly' is set\n"); log("to 1.\n"); log("\n"); log("\n"); - log(" -family {pf}\n"); + log(" -family {polarfire}\n"); log(" select the family to target\n"); - log(" default: pf\n"); + log(" default: polarfire\n"); log("\n"); } void execute(std::vector args, RTLIL::Design *design) override { - log_header(design, "Executing MCHP_DSP pass (pack resources into DSPs).\n"); + log_header(design, "Executing MICROCHIP_DSP pass (pack resources into DSPs).\n"); - std::string family = "pf"; + std::string family = "polarfire"; size_t argidx; - for (argidx = 1; argidx < args.size(); argidx++) - { - if ((args[argidx] == "-family") && argidx+1 < args.size()) { + for (argidx = 1; argidx < args.size(); argidx++) { + if ((args[argidx] == "-family") && argidx + 1 < args.size()) { family = args[++argidx]; continue; } @@ -330,7 +320,7 @@ struct MchpDspPass : public Pass { for (auto module : design->selected_modules()) { - if (design->scratchpad_get_bool("mchp_dsp.multonly")) + if (design->scratchpad_get_bool("microchip_dsp.multonly")) continue; { @@ -338,13 +328,13 @@ struct MchpDspPass : public Pass { // the "PolarFire FPGA Macro Library Guide" // Main pattern matching step to capture a DSP cell. - // Match for pre-adder, post-adder, as well as + // Match for pre-adder, post-adder, as well as // registers 'A', 'B', 'D', and 'P'. Additionally, // check for an accumulator pattern based on whether // a post-adder and PREG are both present AND - // if PREG feeds into this post-adder. - mchp_dsp_pm pm(module, module->selected_cells()); - pm.run_mchp_dsp_pack(mchp_dsp_pack); + // if PREG feeds into this post-adder. + microchip_dsp_pm pm(module, module->selected_cells()); + pm.run_microchip_dsp_pack(microchip_dsp_pack); } // Separating out CREG packing is necessary since there @@ -356,18 +346,17 @@ struct MchpDspPass : public Pass { // PREG of an upstream DSP that had not been visited // yet { - mchp_dsp_CREG_pm pm(module, module->selected_cells()); - pm.run_mchp_dsp_packC(mchp_dsp_packC); + microchip_dsp_CREG_pm pm(module, module->selected_cells()); + pm.run_microchip_dsp_packC(microchip_dsp_packC); } // Lastly, identify and utilise PCOUT -> PCIN chains { - mchp_dsp_cascade_pm pm(module, module->selected_cells()); - pm.run_mchp_dsp_cascade(); + microchip_dsp_cascade_pm pm(module, module->selected_cells()); + pm.run_microchip_dsp_cascade(); } - } } -} MchpDspPass; +} MicrochipDspPass; PRIVATE_NAMESPACE_END diff --git a/passes/pmgen/mchp_dsp.pmg b/passes/pmgen/microchip_dsp.pmg similarity index 99% rename from passes/pmgen/mchp_dsp.pmg rename to passes/pmgen/microchip_dsp.pmg index 41acf8c4e..1c22bb317 100644 --- a/passes/pmgen/mchp_dsp.pmg +++ b/passes/pmgen/microchip_dsp.pmg @@ -16,7 +16,7 @@ // This file describes the main pattern matcher setup (of three total) that -// forms the `mchp_dsp` pass described in mchp_dsp.cc +// forms the `microchip_dsp` pass described in microchip_dsp.cc // At a high level, it works as follows: // ( 1) Starting from a DSP cell. Capture DSP configurations as states // ( 2) Match for pre-adder @@ -31,7 +31,7 @@ // |MULT|------ | adder | +----+ // +----+ \-------/ -pattern mchp_dsp_pack +pattern microchip_dsp_pack state clock state sigA sigB sigC sigD sigP diff --git a/passes/pmgen/mchp_dsp_CREG.pmg b/passes/pmgen/microchip_dsp_CREG.pmg similarity index 93% rename from passes/pmgen/mchp_dsp_CREG.pmg rename to passes/pmgen/microchip_dsp_CREG.pmg index 114201073..baa586962 100644 --- a/passes/pmgen/mchp_dsp_CREG.pmg +++ b/passes/pmgen/microchip_dsp_CREG.pmg @@ -16,7 +16,7 @@ // This file describes the second of three pattern matcher setups that -// forms the `mchp_dsp` pass described in mchp_dsp.cc +// forms the `microchip_dsp` pass described in microchip_dsp.cc // At a high level, it works as follows: // (1) Starting from a DSP cell that (a) doesn't have a CREG already, // and (b) uses the 'C' port @@ -24,21 +24,21 @@ // (attached to at most two $mux cells that implement clock-enable or // reset functionality, using a subpattern discussed below) // Notes: -// - Running CREG packing after mchp_dsp_pack is necessary since there is no +// - Running CREG packing after microchip_dsp_pack is necessary since there is no // guarantee that the cell ordering corresponds to the "expected" case (i.e. // the order in which they appear in the source) thus the possiblity existed // where a register got packed as a CREG into a downstream DSP, while it should // have otherwise been a PREG of an upstream DSP that had not been visited. // yet. -// - The reason this is separated out from the mchp_dsp.pmg file is +// - The reason this is separated out from the microchip_dsp.pmg file is // for efficiency --- each *.pmg file creates a class of the same basename, // which when constructed, creates a custom database tailored to the // pattern(s) contained within. Since the pattern in this file must be -// executed after the pattern contained in mchp_dsp.pmg, it is necessary +// executed after the pattern contained in microchip_dsp.pmg, it is necessary // to reconstruct this database. Separating the two patterns into // independent files causes two smaller, more specific, databases. -pattern mchp_dsp_packC +pattern microchip_dsp_packC udata > unextend state clock diff --git a/passes/pmgen/mchp_dsp_cascade.pmg b/passes/pmgen/microchip_dsp_cascade.pmg similarity index 98% rename from passes/pmgen/mchp_dsp_cascade.pmg rename to passes/pmgen/microchip_dsp_cascade.pmg index 4ea9df758..d7ea5911e 100644 --- a/passes/pmgen/mchp_dsp_cascade.pmg +++ b/passes/pmgen/microchip_dsp_cascade.pmg @@ -16,7 +16,7 @@ // This file describes the third of three pattern matcher setups that -// forms the `mchp_dsp` pass described in mchp_dsp.cc +// forms the `microchip_dsp` pass described in microchip_dsp.cc // At a high level, it works as follows: // (1) Starting from a DSP cell that // (a) CDIN_FDBK_SEL is set to default "00" @@ -32,7 +32,7 @@ // height of a DSP column) with each DSP in each chunk being rewritten // to use [ABP]COUT -> [ABP]CIN cascading as appropriate -pattern mchp_dsp_cascade +pattern microchip_dsp_cascade udata > unextend udata >> chain longest_chain diff --git a/techlibs/mchp/LSRAM.txt b/techlibs/microchip/LSRAM.txt similarity index 100% rename from techlibs/mchp/LSRAM.txt rename to techlibs/microchip/LSRAM.txt diff --git a/techlibs/mchp/LSRAM_map.v b/techlibs/microchip/LSRAM_map.v similarity index 100% rename from techlibs/mchp/LSRAM_map.v rename to techlibs/microchip/LSRAM_map.v diff --git a/techlibs/mchp/Makefile.inc b/techlibs/microchip/Makefile.inc similarity index 50% rename from techlibs/mchp/Makefile.inc rename to techlibs/microchip/Makefile.inc index a716caa9f..f6f34ccd3 100644 --- a/techlibs/mchp/Makefile.inc +++ b/techlibs/microchip/Makefile.inc @@ -16,16 +16,16 @@ -OBJS += techlibs/mchp/synth_mchp.o -OBJS += techlibs/mchp/mchp_dffopt.o +OBJS += techlibs/microchip/synth_microchip.o +OBJS += techlibs/microchip/microchip_dffopt.o -$(eval $(call add_share_file,share/mchp,techlibs/mchp/arith_map.v)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/cells_map.v)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/cells_sim.v)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/pf_dsp_map.v)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/arith_map.v)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/cells_map.v)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/cells_sim.v)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/pf_dsp_map.v)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/brams_defs.vh)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/LSRAM_map.v)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/LSRAM.txt)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/uSRAM_map.v)) -$(eval $(call add_share_file,share/mchp,techlibs/mchp/uSRAM.txt)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/brams_defs.vh)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/LSRAM_map.v)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/LSRAM.txt)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/uSRAM_map.v)) +$(eval $(call add_share_file,share/microchip,techlibs/microchip/uSRAM.txt)) diff --git a/techlibs/mchp/arith_map.v b/techlibs/microchip/arith_map.v similarity index 96% rename from techlibs/mchp/arith_map.v rename to techlibs/microchip/arith_map.v index d6c289c92..c21f34f44 100644 --- a/techlibs/mchp/arith_map.v +++ b/techlibs/microchip/arith_map.v @@ -21,7 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. (* techmap_celltype = "$_MUX4_" *) -module \$__mchp_MUX4_ (A, B, C, D, S, T, Y); +module \$__microchip_MUX4_ (A, B, C, D, S, T, Y); input A, B, C, D, S, T; output Y; MX4 _TECHMAP_REPLACE_.MUX4(.D3(D), .D2(C), .D1(B), .D0(A), .S1(T), .S0(S), .Y(Y)); @@ -30,7 +30,7 @@ endmodule (* techmap_celltype = "$reduce_xor" *) -module \$__mchp_XOR8_ (A, Y); +module \$__microchip_XOR8_ (A, Y); parameter A_SIGNED = 0; parameter A_WIDTH = 0; parameter Y_WIDTH = 0; diff --git a/techlibs/mchp/brams_defs.vh b/techlibs/microchip/brams_defs.vh similarity index 100% rename from techlibs/mchp/brams_defs.vh rename to techlibs/microchip/brams_defs.vh diff --git a/techlibs/mchp/cells_map.v b/techlibs/microchip/cells_map.v similarity index 92% rename from techlibs/mchp/cells_map.v rename to techlibs/microchip/cells_map.v index 9194b023b..6425d594f 100644 --- a/techlibs/mchp/cells_map.v +++ b/techlibs/microchip/cells_map.v @@ -28,11 +28,11 @@ endmodule // for sync set/reset registers, we can pass them into ABC9. So we need to follow the simplification idiom // and map to intermediate cell types module \$_SDFFCE_PN0P_ (input D, C, R, E, output Q); - MCHP_SYNC_RESET_DFF _TECHMAP_REPLACE_ (.D(D), .CLK(C), .Reset(R), .En(E), .Q(Q)); + MICROCHIP_SYNC_RESET_DFF _TECHMAP_REPLACE_ (.D(D), .CLK(C), .Reset(R), .En(E), .Q(Q)); endmodule module \$_SDFFCE_PN1P_ (input D, C, R, E, output Q); - MCHP_SYNC_SET_DFF _TECHMAP_REPLACE_ (.D(D), .CLK(C), .Set(R), .En(E), .Q(Q)); + MICROCHIP_SYNC_SET_DFF _TECHMAP_REPLACE_ (.D(D), .CLK(C), .Set(R), .En(E), .Q(Q)); endmodule @@ -52,7 +52,7 @@ endmodule // map intermediate flops to SLE `ifdef FINAL_MAP -module MCHP_SYNC_SET_DFF( +module MICROCHIP_SYNC_SET_DFF( input D, input CLK, input Set, @@ -61,7 +61,7 @@ module MCHP_SYNC_SET_DFF( SLE _TECHMAP_REPLACE_ (.D(D), .CLK(CLK), .EN(En), .ALn(1'b1), .ADn(1'b0), .SLn(Set), .SD(1'b1), .LAT(1'b0), .Q(Q)); endmodule -module MCHP_SYNC_RESET_DFF( +module MICROCHIP_SYNC_RESET_DFF( input D, input CLK, input Reset, diff --git a/techlibs/mchp/cells_sim.v b/techlibs/microchip/cells_sim.v similarity index 98% rename from techlibs/mchp/cells_sim.v rename to techlibs/microchip/cells_sim.v index a89f17843..47586a8a2 100644 --- a/techlibs/mchp/cells_sim.v +++ b/techlibs/microchip/cells_sim.v @@ -155,11 +155,11 @@ endmodule // sequential elements -// MCHP_SYNC_SET_DFF and MCHP_SYNC_RESET_DFF are intermediate cell types to implement the simplification idiom for abc9 flow +// MICROCHIP_SYNC_SET_DFF and MICROCHIP_SYNC_RESET_DFF are intermediate cell types to implement the simplification idiom for abc9 flow // see: https://yosyshq.readthedocs.io/projects/yosys/en/latest/yosys_internals/extending_yosys/abc_flow.html (* abc9_flop, lib_whitebox *) -module MCHP_SYNC_SET_DFF( +module MICROCHIP_SYNC_SET_DFF( input D, input CLK, input Set, @@ -185,7 +185,7 @@ module MCHP_SYNC_SET_DFF( endmodule (* abc9_flop, lib_whitebox *) -module MCHP_SYNC_RESET_DFF( +module MICROCHIP_SYNC_RESET_DFF( input D, input CLK, input Reset, diff --git a/techlibs/mchp/mchp_dffopt.cc b/techlibs/microchip/microchip_dffopt.cc similarity index 88% rename from techlibs/mchp/mchp_dffopt.cc rename to techlibs/microchip/microchip_dffopt.cc index 474e9275d..4193eb469 100644 --- a/techlibs/mchp/mchp_dffopt.cc +++ b/techlibs/microchip/microchip_dffopt.cc @@ -16,8 +16,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "kernel/yosys.h" #include "kernel/sigtools.h" +#include "kernel/yosys.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN @@ -25,7 +25,8 @@ PRIVATE_NAMESPACE_BEGIN typedef std::pair> LutData; // Compute a LUT implementing (select ^ select_inv) ? alt_data : data. Returns true if successful. -bool merge_lut(LutData &result, const LutData &data, const LutData select, bool select_inv, SigBit alt_data, int max_lut_size) { +bool merge_lut(LutData &result, const LutData &data, const LutData select, bool select_inv, SigBit alt_data, int max_lut_size) +{ // First, gather input signals -- insert new signals at the beginning // of the vector, so they don't disturb the likely-critical D LUT input // timings. @@ -97,13 +98,13 @@ bool merge_lut(LutData &result, const LutData &data, const LutData select, bool return true; } -struct MchpDffOptPass : public Pass { - MchpDffOptPass() : Pass("mchp_dffopt", "MCHP: optimize FF control signal usage") { } +struct MicrochipDffOptPass : public Pass { + MicrochipDffOptPass() : Pass("microchip_dffopt", "MICROCHIP: optimize FF control signal usage") {} void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" mchp_dffopt [options] [selection]\n"); + log(" microchip_dffopt [options] [selection]\n"); log("\n"); log("Converts hardware clock enable and set/reset signals on FFs to emulation\n"); log("using LUTs, if doing so would improve area. Operates on post-techmap LUT, DFF\n"); @@ -112,15 +113,14 @@ struct MchpDffOptPass : public Pass { } void execute(std::vector args, RTLIL::Design *design) override { - log_header(design, "Executing MCHP_DFFOPT pass (optimize FF control signal usage).\n"); + log_header(design, "Executing MICROCHIP_DFFOPT pass (optimize FF control signal usage).\n"); size_t argidx; int max_lut_size = 4; - + extra_args(args, argidx, design); - for (auto module : design->selected_modules()) - { + for (auto module : design->selected_modules()) { log("Optimizing FFs in %s.\n", log_id(module)); SigMap sigmap(module); @@ -128,8 +128,7 @@ struct MchpDffOptPass : public Pass { dict bit_uses; // Gather LUTs. - for (auto cell : module->selected_cells()) - { + for (auto cell : module->selected_cells()) { for (auto port : cell->connections()) for (auto bit : port.second) bit_uses[sigmap(bit)]++; @@ -153,8 +152,8 @@ struct MchpDffOptPass : public Pass { if (cell->type == ID(CFG3)) goto lut_sigin_done; sigin.push_back(sigmap(cell->getPort(ID(D)))); - -lut_sigin_done: + + lut_sigin_done: bit_to_lut[sigout] = make_pair(LutData(init, sigin), cell); } } @@ -164,8 +163,7 @@ lut_sigin_done: bit_uses[sigmap(SigBit(wire, i))]++; // Iterate through FFs. - for (auto cell : module->selected_cells()) - { + for (auto cell : module->selected_cells()) { if (!cell->type.in(ID(SLE))) // not a SLE continue; @@ -174,13 +172,12 @@ lut_sigin_done: if (cell->get_bool_attribute(ID::keep)) // keep attribute continue; if (!cell->getPort(ID(ALn)).is_fully_ones()) // async FF - continue; + continue; - const bool hasSyncLoad = cell->getPort(ID(SLn)).is_wire(); const bool has_s = hasSyncLoad && cell->getPort(ID(SD)).is_fully_ones(); const bool has_r = hasSyncLoad && cell->getPort(ID(SD)).is_fully_zero(); - + // SLE cannot have both synchronous set and reset implemented at the same time log_assert(!(has_s && has_r)); @@ -196,7 +193,6 @@ lut_sigin_done: LutData lut_d = it_D->second.first; Cell *cell_d = it_D->second.second; - LutData lut_d_post_ce; LutData lut_d_post_s; LutData lut_d_post_r; @@ -216,7 +212,8 @@ lut_sigin_done: if (!merge_lut(lut_d_post_ce, lut_d, lut_ce, true, sig_Q, max_lut_size)) continue; - // If this gets rid of a CE LUT, it's worth it. If not, it still may be worth it, if we can remove set/reset as well. + // If this gets rid of a CE LUT, it's worth it. If not, it still may be worth it, if we can remove set/reset + // as well. if (it_CE != bit_to_lut.end()) worthy_post_ce = true; } else if (sig_CE.data != State::S1) { @@ -231,7 +228,7 @@ lut_sigin_done: if (has_s) { SigBit sig_S = sigmap(cell->getPort(ID(SLn))); LutData lut_s = LutData(Const(2, 2), {sig_S}); // INIT = 10 - bool inv_s = true; // active low + bool inv_s = true; // active low auto it_S = bit_to_lut.find(sig_S); if (it_S != bit_to_lut.end()) lut_s = it_S->second.first; @@ -253,7 +250,7 @@ lut_sigin_done: if (has_r) { SigBit sig_R = sigmap(cell->getPort(ID(SLn))); LutData lut_r = LutData(Const(2, 2), {sig_R}); // INIT = 10 - bool inv_r = true; // active low + bool inv_r = true; // active low auto it_R = bit_to_lut.find(sig_R); if (it_R != bit_to_lut.end()) lut_r = it_R->second.first; @@ -270,7 +267,7 @@ lut_sigin_done: } } -unmap: + unmap: // SLE cannot have both synchronous set and reset implemented at the same time log_assert(!(worthy_post_r && worthy_post_s)); @@ -288,10 +285,14 @@ unmap: } std::string ports; - if (worthy_post_r) ports += " + R"; - if (worthy_post_s) ports += " + S"; - if (worthy_post_ce) ports += " + CE"; - log(" Merging D%s LUTs for %s/%s (%d -> %d)\n", ports.c_str(), log_id(cell), log_id(sig_Q.wire), GetSize(lut_d.second), GetSize(final_lut.second)); + if (worthy_post_r) + ports += " + R"; + if (worthy_post_s) + ports += " + S"; + if (worthy_post_ce) + ports += " + CE"; + log(" Merging D%s LUTs for %s/%s (%d -> %d)\n", ports.c_str(), log_id(cell), log_id(sig_Q.wire), + GetSize(lut_d.second), GetSize(final_lut.second)); // Okay, we're doing it. Unmap ports. if ((has_s && worthy_post_s) || worthy_post_r) { @@ -304,20 +305,20 @@ unmap: // Create the new LUT. Cell *lut_cell = nullptr; switch (GetSize(final_lut.second)) { - case 1: - lut_cell = module->addCell(NEW_ID, ID(CFG1)); - break; - case 2: - lut_cell = module->addCell(NEW_ID, ID(CFG2)); - break; - case 3: - lut_cell = module->addCell(NEW_ID, ID(CFG3)); - break; - case 4: - lut_cell = module->addCell(NEW_ID, ID(CFG4)); - break; - default: - log_assert(!"unknown lut size"); + case 1: + lut_cell = module->addCell(NEW_ID, ID(CFG1)); + break; + case 2: + lut_cell = module->addCell(NEW_ID, ID(CFG2)); + break; + case 3: + lut_cell = module->addCell(NEW_ID, ID(CFG3)); + break; + case 4: + lut_cell = module->addCell(NEW_ID, ID(CFG4)); + break; + default: + log_assert(!"unknown lut size"); } lut_cell->attributes = cell_d->attributes; Wire *lut_out = module->addWire(NEW_ID); @@ -334,7 +335,6 @@ unmap: } } } -} MchpDffOptPass; +} MicrochipDffOptPass; PRIVATE_NAMESPACE_END - diff --git a/techlibs/mchp/pf_dsp_map.v b/techlibs/microchip/polarfire_dsp_map.v similarity index 100% rename from techlibs/mchp/pf_dsp_map.v rename to techlibs/microchip/polarfire_dsp_map.v diff --git a/techlibs/mchp/synth_mchp.cc b/techlibs/microchip/synth_microchip.cc similarity index 80% rename from techlibs/mchp/synth_mchp.cc rename to techlibs/microchip/synth_microchip.cc index e5fe7d484..b3764ed7c 100644 --- a/techlibs/mchp/synth_mchp.cc +++ b/techlibs/microchip/synth_microchip.cc @@ -16,23 +16,22 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "kernel/register.h" #include "kernel/celltypes.h" -#include "kernel/rtlil.h" #include "kernel/log.h" +#include "kernel/register.h" +#include "kernel/rtlil.h" USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -struct SynthMchpPass : public ScriptPass -{ - SynthMchpPass() : ScriptPass("synth_mchp", "synthesis for Microchip FPGAs") { } +struct SynthMicrochipPass : public ScriptPass { + SynthMicrochipPass() : ScriptPass("synth_microchip", "synthesis for Microchip FPGAs") {} void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" synth_mchp [options]\n"); + log(" synth_microchip [options]\n"); log("\n"); log("This command runs synthesis for Microchip FPGAs. Operating on\n"); log("partly selected designs is not supported (you must submit a fully-selected \n"); @@ -54,7 +53,7 @@ struct SynthMchpPass : public ScriptPass log("\n"); log(" -blif \n"); log(" Write the design to the specified BLIF file. Writing of an output file\n"); - log(" is omitted if this parameter is not specified.\n"); + log(" is omitted if this parameter is not specified.\n"); log("\n"); log(" -nobram\n"); log(" Do not use block RAM cells in output netlist\n"); @@ -137,30 +136,29 @@ struct SynthMchpPass : public ScriptPass clear_flags(); size_t argidx; - for (argidx = 1; argidx < args.size(); argidx++) - { - if (args[argidx] == "-top" && argidx+1 < args.size()) { + for (argidx = 1; argidx < args.size(); argidx++) { + if (args[argidx] == "-top" && argidx + 1 < args.size()) { top_opt = "-top " + args[++argidx]; continue; } - if ((args[argidx] == "-family" || args[argidx] == "-arch") && argidx+1 < args.size()) { + if ((args[argidx] == "-family" || args[argidx] == "-arch") && argidx + 1 < args.size()) { family = args[++argidx]; continue; } - if (args[argidx] == "-edif" && argidx+1 < args.size()) { + if (args[argidx] == "-edif" && argidx + 1 < args.size()) { edif_file = args[++argidx]; continue; } - if (args[argidx] == "-blif" && argidx+1 < args.size()) { + if (args[argidx] == "-blif" && argidx + 1 < args.size()) { blif_file = args[++argidx]; continue; } - if (args[argidx] == "-run" && argidx+1 < args.size()) { - size_t pos = args[argidx+1].find(':'); + if (args[argidx] == "-run" && argidx + 1 < args.size()) { + size_t pos = args[argidx + 1].find(':'); if (pos == std::string::npos) break; run_from = args[++argidx].substr(0, pos); - run_to = args[argidx].substr(pos+1); + run_to = args[argidx].substr(pos + 1); continue; } if (args[argidx] == "-flatten") { @@ -231,7 +229,7 @@ struct SynthMchpPass : public ScriptPass lut_size = 4; } else { log_cmd_error("Invalid Microchip -family setting: '%s'.\n", family.c_str()); - } + } if (!design->full_selection()) log_cmd_error("This command only operates on fully selected designs!\n"); @@ -239,8 +237,7 @@ struct SynthMchpPass : public ScriptPass if (abc9 && retime) log_cmd_error("-retime option not currently compatible with -abc9!\n"); - - log_header(design, "Executing SYNTH_MCHP pass.\n"); + log_header(design, "Executing SYNTH_MICROCHIP pass.\n"); log_push(); run_script(design, run_from, run_to); @@ -256,7 +253,7 @@ struct SynthMchpPass : public ScriptPass if (check_label("begin")) { std::string read_args; - read_args += " -lib -specify +/mchp/cells_sim.v"; + read_args += " -lib -specify +/microchip/cells_sim.v"; run("read_verilog" + read_args); run(stringf("hierarchy -check %s", top_opt.c_str())); @@ -286,29 +283,29 @@ struct SynthMchpPass : public ScriptPass if (check_label("map_dsp", "(skip if '-nodsp')")) { if (!nodsp || help_mode) { - run("memory_dff"); // mchp_dsp will merge registers, reserve memory port registers first + run("memory_dff"); // microchip_dsp will merge registers, reserve memory port registers first if (help_mode) - run("techmap -map +/mul2dsp.v -map +/mchp/{family}_dsp_map.v {options}"); + run("techmap -map +/mul2dsp.v -map +/microchip/{family}_dsp_map.v {options}"); else if (family == "pf") // Microchip - map multipliers to DSP - run("techmap -map +/mul2dsp.v -map +/mchp/pf_dsp_map.v -D DSP_A_MAXWIDTH=18 -D DSP_B_MAXWIDTH=18 " - "-D DSP_A_MAXWIDTH_PARTIAL=18 " // Partial multipliers are intentionally - // limited to 18x18 in order to take - // advantage of the (PCOUT >> 17) -> PCIN - // dedicated cascade chain capability - "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 " // Blocks Nx1 multipliers - "-D DSP_Y_MINWIDTH=9 " - "-D DSP_SIGNEDONLY=1 -D DSP_NAME=$__MUL18X18"); - + run("techmap -map +/mul2dsp.v -map +/microchip/pf_dsp_map.v -D DSP_A_MAXWIDTH=18 -D DSP_B_MAXWIDTH=18 " + "-D DSP_A_MAXWIDTH_PARTIAL=18 " // Partial multipliers are intentionally + // limited to 18x18 in order to take + // advantage of the (PCOUT >> 17) -> PCIN + // dedicated cascade chain capability + "-D DSP_A_MINWIDTH=2 -D DSP_B_MINWIDTH=2 " // Blocks Nx1 multipliers + "-D DSP_Y_MINWIDTH=9 " + "-D DSP_SIGNEDONLY=1 -D DSP_NAME=$__MUL18X18"); + run("select a:mul2dsp"); run("setattr -unset mul2dsp"); run("opt_expr -fine"); run("wreduce"); run("select -clear"); if (help_mode) - run("mchp_dsp -family "); + run("microchip_dsp -family "); else if (family == "pf") // Microchip - absorb cells into DSP - run("mchp_dsp -family " + family); - + run("microchip_dsp -family " + family); + run("chtype -set $mul t:$__soft_mul"); } } @@ -324,41 +321,44 @@ struct SynthMchpPass : public ScriptPass if (check_label("map_memory")) { std::string params = ""; - std::string LSRAM_map = "+/mchp/LSRAM_map.v"; - std::string uSRAM_map = "+/mchp/uSRAM_map.v"; - if (debug_memory) run("write_verilog -noexpr memory_map_pre.vm"); + std::string LSRAM_map = "+/microchip/LSRAM_map.v"; + std::string uSRAM_map = "+/microchip/uSRAM_map.v"; + if (debug_memory) + run("write_verilog -noexpr memory_map_pre.vm"); if (help_mode) { params = " [...]"; } else { if (family == "pf") { // cost of a single bit for memory lowered to soft logic - params += " -logic-cost-rom 0.015625"; + params += " -logic-cost-rom 0.015625"; - params += " -lib +/mchp/LSRAM.txt"; - params += " -lib +/mchp/uSRAM.txt"; - LSRAM_map = "+/mchp/LSRAM_map.v"; - uSRAM_map = "+/mchp/uSRAM_map.v"; + params += " -lib +/microchip/LSRAM.txt"; + params += " -lib +/microchip/uSRAM.txt"; + LSRAM_map = "+/microchip/LSRAM_map.v"; + uSRAM_map = "+/microchip/uSRAM_map.v"; } - if (nobram) params += " -no-auto-block"; + if (nobram) + params += " -no-auto-block"; } // transform memories into intermediate cells // Cost based transformation. The cost is assigned by us for each cell. run("memory_libmap" + params); - if (debug_memory) run("write_verilog -noexpr memory_map_libmap.vm"); + if (debug_memory) + run("write_verilog -noexpr memory_map_libmap.vm"); // map intermediate cells to actual RAM macros // NOTE: order doesnt matter here run("techmap -map " + LSRAM_map); run("techmap -map " + uSRAM_map); - if (debug_memory) run("write_verilog -noexpr memory_map_final.vm"); + if (debug_memory) + run("write_verilog -noexpr memory_map_final.vm"); } if (check_label("map_ffram")) { run("opt -fast -full"); - // blast unmapped RAM to flops or LUTs run("memory_map"); } @@ -366,7 +366,8 @@ struct SynthMchpPass : public ScriptPass if (check_label("fine")) { run("opt -full"); - if (debug_carry) run("write_verilog -noexpr ARI1_cells.vm"); + if (debug_carry) + run("write_verilog -noexpr ARI1_cells.vm"); if (!nocarry) { // converts $mux -> $_MUX_ to allow muxcover to work @@ -376,21 +377,24 @@ struct SynthMchpPass : public ScriptPass run("simplemap t:$xor"); // only mapping reduce_xor // mapping based on Yosys internal gates - if (debug_carry) run("write_verilog -noexpr ARI1_pre.vm"); + if (debug_carry) + run("write_verilog -noexpr ARI1_pre.vm"); // collapse $_AND_/$_OR_/$_XOR_ chains into reduction cells run("extract_reduce"); - if (debug_carry) run("write_verilog -noexpr ARI1_extract_reduce.vm"); - + if (debug_carry) + run("write_verilog -noexpr ARI1_extract_reduce.vm"); + // pack mux trees into $_MUX4_ run("muxcover -nodecode -mux4=220"); - if (debug_carry) run("write_verilog -noexpr ARI1_muxcover.vm"); - - run("techmap -map +/mchp/arith_map.v"); - if (debug_carry) run("write_verilog -noexpr ARI1_post.vm"); - + if (debug_carry) + run("write_verilog -noexpr ARI1_muxcover.vm"); + + run("techmap -map +/microchip/arith_map.v"); + if (debug_carry) + run("write_verilog -noexpr ARI1_post.vm"); } // convert all remaining cells to gates @@ -403,10 +407,11 @@ struct SynthMchpPass : public ScriptPass // Needs to be done before logic optimization, so that inverters (inserted // here because of negative-polarity output enable) are handled. if (help_mode || !noiopad) { - run("iopadmap -bits -inpad INBUF Y:PAD -outpad OUTBUF D:PAD -toutpad TRIBUFF E:D:PAD -tinoutpad BIBUF E:Y:D:PAD", "(unless -noiobs)"); + run("iopadmap -bits -inpad INBUF Y:PAD -outpad OUTBUF D:PAD -toutpad TRIBUFF E:D:PAD -tinoutpad BIBUF E:Y:D:PAD", + "(unless -noiobs)"); } - - std::string techmap_args = "-map +/techmap.v -map +/mchp/cells_map.v"; + + std::string techmap_args = "-map +/techmap.v -map +/microchip/cells_map.v"; run("techmap " + techmap_args); run("clean"); } @@ -447,14 +452,12 @@ struct SynthMchpPass : public ScriptPass // $_DLATCH_[NP][NP][01]_ (D-latch + reset to 0/1) // $_DLATCHSR_[NP][NP][NP]_ (D-latch + set + reset) - if (family == "pf") { std::string params = ""; - // D-flop with async reset and enable // posedge CLK, active low reset to 1 or 0, active high EN - params += " -cell $_DFFE_PN?P_ 01"; + params += " -cell $_DFFE_PN?P_ 01"; // D-flop with sync reset and enable, enable takes priority over reset // posedge CLK, active low reset to 1 or 0, active high EN @@ -466,12 +469,11 @@ struct SynthMchpPass : public ScriptPass run("dfflegalize" + params, "(Converts FFs to supported types)"); } - if (abc9 || help_mode) { if (dff || help_mode) run("zinit -all w:* t:$_SDFFCE_*", "('-dff' only)"); - run("techmap -D NO_LUT -map +/mchp/cells_map.v", "('-abc9' only)"); + run("techmap -D NO_LUT -map +/microchip/cells_map.v", "('-abc9' only)"); } } @@ -482,10 +484,10 @@ struct SynthMchpPass : public ScriptPass if (help_mode) run("abc -luts 2:2,3,6:5[,10,20] [-dff] [-D 1]", "(option for '-nowidelut', '-dff', '-retime')"); else if (abc9) { - + std::string abc9_opts; // for the if command in abc to specify wire delay between adjects LUTs (default = 0) - // NOTE: should not have 0 wire delay between LUTs, + // NOTE: should not have 0 wire delay between LUTs, // otherwise abc might use LUT2+LUT3 instead of single LUT4 abc9_opts += " -W 300"; if (nowidelut) @@ -493,8 +495,7 @@ struct SynthMchpPass : public ScriptPass if (dff) abc9_opts += " -dff"; run("abc9" + abc9_opts); - } - else { + } else { std::string abc_opts = " -lut " + lut_size_s; if (dff) abc_opts += " -dff"; @@ -505,21 +506,18 @@ struct SynthMchpPass : public ScriptPass run("clean"); if (help_mode || !abc9) - run("techmap -D NO_LUT -map +/mchp/cells_map.v", "(only if not '-abc9')"); - std::string techmap_args = "-map +/mchp/cells_map.v -D FINAL_MAP"; + run("techmap -D NO_LUT -map +/microchip/cells_map.v", "(only if not '-abc9')"); + std::string techmap_args = "-map +/microchip/cells_map.v -D FINAL_MAP"; techmap_args += " -D LUT_WIDTH=" + lut_size_s; run("techmap " + techmap_args); - - if (help_mode || lut_size == 4) - run("mchp_dffopt"); - + if (help_mode || lut_size == 4) + run("microchip_dffopt"); } - run("clkbufmap -buf CLKINT Y:A -inpad CLKBUF Y:PAD"); - - run("clean -purge"); + run("clkbufmap -buf CLKINT Y:A -inpad CLKBUF Y:PAD"); + run("clean -purge"); if (check_label("check")) { run("hierarchy -check"); @@ -538,6 +536,6 @@ struct SynthMchpPass : public ScriptPass run(stringf("write_blif %s", blif_file.c_str())); } } -} SynthMchpPass; +} SynthMicrochipPass; PRIVATE_NAMESPACE_END diff --git a/techlibs/mchp/tests/Registers/Registers.v b/techlibs/microchip/tests/Registers/Registers.v similarity index 100% rename from techlibs/mchp/tests/Registers/Registers.v rename to techlibs/microchip/tests/Registers/Registers.v diff --git a/techlibs/mchp/tests/Registers/Registers.ys b/techlibs/microchip/tests/Registers/Registers.ys similarity index 93% rename from techlibs/mchp/tests/Registers/Registers.ys rename to techlibs/microchip/tests/Registers/Registers.ys index c83376fdd..7b1a1ed77 100644 --- a/techlibs/mchp/tests/Registers/Registers.ys +++ b/techlibs/microchip/tests/Registers/Registers.ys @@ -17,7 +17,7 @@ # read verilog files read_verilog Registers.v -synth_mchp -top Registers -abc9 -family pf -noiopad +synth_microchip -top Registers -abc9 -family polarfire -noiopad # write final outputfile write_verilog -noexpr Registers.vm diff --git a/techlibs/mchp/tests/carryout/carryout.v b/techlibs/microchip/tests/carryout/carryout.v similarity index 100% rename from techlibs/mchp/tests/carryout/carryout.v rename to techlibs/microchip/tests/carryout/carryout.v diff --git a/techlibs/mchp/tests/carryout/carryout.ys b/techlibs/microchip/tests/carryout/carryout.ys similarity index 93% rename from techlibs/mchp/tests/carryout/carryout.ys rename to techlibs/microchip/tests/carryout/carryout.ys index 1697bc893..65d4d6709 100644 --- a/techlibs/mchp/tests/carryout/carryout.ys +++ b/techlibs/microchip/tests/carryout/carryout.ys @@ -16,6 +16,6 @@ read_verilog carryout.v -synth_mchp -top carryout -abc9 -family pf -noiopad +synth_microchip -top carryout -abc9 -family polarfire -noiopad write_verilog -noexpr carryout.vm diff --git a/techlibs/mchp/tests/cascade/cascade.v b/techlibs/microchip/tests/cascade/cascade.v similarity index 100% rename from techlibs/mchp/tests/cascade/cascade.v rename to techlibs/microchip/tests/cascade/cascade.v diff --git a/techlibs/mchp/tests/cascade/cascade.ys b/techlibs/microchip/tests/cascade/cascade.ys similarity index 93% rename from techlibs/mchp/tests/cascade/cascade.ys rename to techlibs/microchip/tests/cascade/cascade.ys index f7017913d..a817c0945 100644 --- a/techlibs/mchp/tests/cascade/cascade.ys +++ b/techlibs/microchip/tests/cascade/cascade.ys @@ -16,6 +16,6 @@ read_verilog cascade.v -synth_mchp -top cascade -abc9 -family pf -noiopad +synth_microchip -top cascade -abc9 -family polarfire -noiopad write_verilog -noexpr cascade.vm diff --git a/techlibs/mchp/tests/dff_opt/dff_opt.v b/techlibs/microchip/tests/dff_opt/dff_opt.v similarity index 100% rename from techlibs/mchp/tests/dff_opt/dff_opt.v rename to techlibs/microchip/tests/dff_opt/dff_opt.v diff --git a/techlibs/mchp/tests/dff_opt/dff_opt.ys b/techlibs/microchip/tests/dff_opt/dff_opt.ys similarity index 93% rename from techlibs/mchp/tests/dff_opt/dff_opt.ys rename to techlibs/microchip/tests/dff_opt/dff_opt.ys index 746444c34..776081639 100644 --- a/techlibs/mchp/tests/dff_opt/dff_opt.ys +++ b/techlibs/microchip/tests/dff_opt/dff_opt.ys @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. read_verilog dff_opt.v -synth_mchp -top dff_opt -abc9 -family pf -noiopad +synth_microchip -top dff_opt -abc9 -family polarfire -noiopad # write final outputfile write_verilog -noexpr dff_opt.vm diff --git a/techlibs/mchp/tests/full_dsp/full_dsp.v b/techlibs/microchip/tests/full_dsp/full_dsp.v similarity index 100% rename from techlibs/mchp/tests/full_dsp/full_dsp.v rename to techlibs/microchip/tests/full_dsp/full_dsp.v diff --git a/techlibs/mchp/tests/full_dsp/full_dsp.ys b/techlibs/microchip/tests/full_dsp/full_dsp.ys similarity index 93% rename from techlibs/mchp/tests/full_dsp/full_dsp.ys rename to techlibs/microchip/tests/full_dsp/full_dsp.ys index 01bb95f54..67c66fa19 100644 --- a/techlibs/mchp/tests/full_dsp/full_dsp.ys +++ b/techlibs/microchip/tests/full_dsp/full_dsp.ys @@ -16,6 +16,6 @@ read_verilog full_dsp.v -synth_mchp -top full_dsp -abc9 -family pf -noiopad +synth_microchip -top full_dsp -abc9 -family polarfire -noiopad write_verilog -noexpr full_dsp.vm diff --git a/techlibs/mchp/tests/large_mult/large_mult.v b/techlibs/microchip/tests/large_mult/large_mult.v similarity index 100% rename from techlibs/mchp/tests/large_mult/large_mult.v rename to techlibs/microchip/tests/large_mult/large_mult.v diff --git a/techlibs/mchp/tests/large_mult/large_mult.ys b/techlibs/microchip/tests/large_mult/large_mult.ys similarity index 93% rename from techlibs/mchp/tests/large_mult/large_mult.ys rename to techlibs/microchip/tests/large_mult/large_mult.ys index 3779a26d6..ea3c80a0d 100644 --- a/techlibs/mchp/tests/large_mult/large_mult.ys +++ b/techlibs/microchip/tests/large_mult/large_mult.ys @@ -16,6 +16,6 @@ read_verilog large_mult.v -synth_mchp -top large_mult -abc9 -family pf -noiopad +synth_microchip -top large_mult -abc9 -family polarfire -noiopad write_verilog -noexpr large_mult.vm diff --git a/techlibs/mchp/tests/mac/mac.v b/techlibs/microchip/tests/mac/mac.v similarity index 100% rename from techlibs/mchp/tests/mac/mac.v rename to techlibs/microchip/tests/mac/mac.v diff --git a/techlibs/mchp/tests/mac/mac.ys b/techlibs/microchip/tests/mac/mac.ys similarity index 94% rename from techlibs/mchp/tests/mac/mac.ys rename to techlibs/microchip/tests/mac/mac.ys index 595044368..cb22ad49d 100644 --- a/techlibs/mchp/tests/mac/mac.ys +++ b/techlibs/microchip/tests/mac/mac.ys @@ -18,7 +18,7 @@ read_verilog mac.v # run the synth flow, specifies top module and additional parameters -synth_mchp -top mac -abc9 -family pf -noiopad +synticrochip -top mac -abc9 -family polarfire -noiopad # write final outputfile write_verilog -noexpr mac.vm diff --git a/techlibs/mchp/tests/postAdd_mult/postAdd_mult.v b/techlibs/microchip/tests/postAdd_mult/postAdd_mult.v similarity index 100% rename from techlibs/mchp/tests/postAdd_mult/postAdd_mult.v rename to techlibs/microchip/tests/postAdd_mult/postAdd_mult.v diff --git a/techlibs/mchp/tests/postAdd_mult/postAdd_mult.ys b/techlibs/microchip/tests/postAdd_mult/postAdd_mult.ys similarity index 92% rename from techlibs/mchp/tests/postAdd_mult/postAdd_mult.ys rename to techlibs/microchip/tests/postAdd_mult/postAdd_mult.ys index 3a3586c88..54754bb7f 100644 --- a/techlibs/mchp/tests/postAdd_mult/postAdd_mult.ys +++ b/techlibs/microchip/tests/postAdd_mult/postAdd_mult.ys @@ -16,6 +16,6 @@ read_verilog postAdd_mult.v -synth_mchp -top postAdd_mult -abc9 -family pf -noiopad +synth_microchip -top postAdd_mult -abc9 -family polarfire -noiopad write_verilog -noexpr postAdd_mult.vm diff --git a/techlibs/mchp/tests/post_adder/post_adder.v b/techlibs/microchip/tests/post_adder/post_adder.v similarity index 100% rename from techlibs/mchp/tests/post_adder/post_adder.v rename to techlibs/microchip/tests/post_adder/post_adder.v diff --git a/techlibs/mchp/tests/post_adder/post_adder.ys b/techlibs/microchip/tests/post_adder/post_adder.ys similarity index 93% rename from techlibs/mchp/tests/post_adder/post_adder.ys rename to techlibs/microchip/tests/post_adder/post_adder.ys index 0fa613f67..29f0e73f0 100644 --- a/techlibs/mchp/tests/post_adder/post_adder.ys +++ b/techlibs/microchip/tests/post_adder/post_adder.ys @@ -16,6 +16,6 @@ read_verilog post_adder.v -synth_mchp -top post_adder -abc9 -family pf +synth_microchip -top post_adder -abc9 -family polarfire write_verilog -noexpr post_adder.vm diff --git a/techlibs/mchp/tests/pre_adder_dsp/pre_adder_dsp.v b/techlibs/microchip/tests/pre_adder_dsp/pre_adder_dsp.v similarity index 100% rename from techlibs/mchp/tests/pre_adder_dsp/pre_adder_dsp.v rename to techlibs/microchip/tests/pre_adder_dsp/pre_adder_dsp.v diff --git a/techlibs/mchp/tests/pre_adder_dsp/pre_adder_dsp.ys b/techlibs/microchip/tests/pre_adder_dsp/pre_adder_dsp.ys similarity index 92% rename from techlibs/mchp/tests/pre_adder_dsp/pre_adder_dsp.ys rename to techlibs/microchip/tests/pre_adder_dsp/pre_adder_dsp.ys index 82bc56bd1..1510f4ed6 100644 --- a/techlibs/mchp/tests/pre_adder_dsp/pre_adder_dsp.ys +++ b/techlibs/microchip/tests/pre_adder_dsp/pre_adder_dsp.ys @@ -16,6 +16,6 @@ read_verilog pre_adder_dsp.v -synth_mchp -top pre_adder_dsp -abc9 -family pf -noiopad +synth_microchip -top pre_adder_dsp -abc9 -family polarfire -noiopad write_verilog -noexpr pre_adder_dsp.vm diff --git a/techlibs/mchp/tests/ram_SDP/ram_SDP.v b/techlibs/microchip/tests/ram_SDP/ram_SDP.v similarity index 100% rename from techlibs/mchp/tests/ram_SDP/ram_SDP.v rename to techlibs/microchip/tests/ram_SDP/ram_SDP.v diff --git a/techlibs/mchp/tests/ram_SDP/ram_SDP.ys b/techlibs/microchip/tests/ram_SDP/ram_SDP.ys similarity index 93% rename from techlibs/mchp/tests/ram_SDP/ram_SDP.ys rename to techlibs/microchip/tests/ram_SDP/ram_SDP.ys index 4ab129990..0060c882d 100644 --- a/techlibs/mchp/tests/ram_SDP/ram_SDP.ys +++ b/techlibs/microchip/tests/ram_SDP/ram_SDP.ys @@ -16,6 +16,6 @@ read_verilog ram_SDP.v -synth_mchp -top ram_SDP -abc9 -family pf -noiopad +synth_microchip -top ram_SDP -abc9 -family polarfire -noiopad write_verilog -noexpr ram_SDP.vm diff --git a/techlibs/mchp/tests/ram_TDP/ram_TDP.v b/techlibs/microchip/tests/ram_TDP/ram_TDP.v similarity index 100% rename from techlibs/mchp/tests/ram_TDP/ram_TDP.v rename to techlibs/microchip/tests/ram_TDP/ram_TDP.v diff --git a/techlibs/mchp/tests/ram_TDP/ram_TDP.ys b/techlibs/microchip/tests/ram_TDP/ram_TDP.ys similarity index 91% rename from techlibs/mchp/tests/ram_TDP/ram_TDP.ys rename to techlibs/microchip/tests/ram_TDP/ram_TDP.ys index ea98facd5..9fe5fdbe7 100644 --- a/techlibs/mchp/tests/ram_TDP/ram_TDP.ys +++ b/techlibs/microchip/tests/ram_TDP/ram_TDP.ys @@ -16,6 +16,6 @@ read_verilog ram_TDP.v -synth_mchp -top ram_TDP -abc9 -family pf -noiopad -debug_memory +synth_microchip -top ram_TDP -abc9 -family polarfire -noiopad -debug_memory write_verilog -noexpr ram_TDP.vm diff --git a/techlibs/mchp/tests/reduce/reduce.v b/techlibs/microchip/tests/reduce/reduce.v similarity index 100% rename from techlibs/mchp/tests/reduce/reduce.v rename to techlibs/microchip/tests/reduce/reduce.v diff --git a/techlibs/mchp/tests/reduce/reduce.ys b/techlibs/microchip/tests/reduce/reduce.ys similarity index 93% rename from techlibs/mchp/tests/reduce/reduce.ys rename to techlibs/microchip/tests/reduce/reduce.ys index 693f1cdeb..3341f51a2 100644 --- a/techlibs/mchp/tests/reduce/reduce.ys +++ b/techlibs/microchip/tests/reduce/reduce.ys @@ -16,6 +16,6 @@ read_verilog reduce.v -synth_mchp -top reduce -abc9 -family pf -noiopad +synth_microchip -top reduce -abc9 -family polarfire -noiopad write_verilog -noexpr reduce.vm diff --git a/techlibs/mchp/tests/reg_c/reg_c.v b/techlibs/microchip/tests/reg_c/reg_c.v similarity index 100% rename from techlibs/mchp/tests/reg_c/reg_c.v rename to techlibs/microchip/tests/reg_c/reg_c.v diff --git a/techlibs/mchp/tests/reg_c/reg_c.ys b/techlibs/microchip/tests/reg_c/reg_c.ys similarity index 93% rename from techlibs/mchp/tests/reg_c/reg_c.ys rename to techlibs/microchip/tests/reg_c/reg_c.ys index 37c4df18d..0265be56f 100644 --- a/techlibs/mchp/tests/reg_c/reg_c.ys +++ b/techlibs/microchip/tests/reg_c/reg_c.ys @@ -16,6 +16,6 @@ read_verilog reg_c.v -synth_mchp -top reg_c -abc9 -family pf -noiopad +synth_microchip -top reg_c -abc9 -family polarfire -noiopad write_verilog -noexpr reg_c.vm diff --git a/techlibs/mchp/tests/reg_test/reg_test.v b/techlibs/microchip/tests/reg_test/reg_test.v similarity index 100% rename from techlibs/mchp/tests/reg_test/reg_test.v rename to techlibs/microchip/tests/reg_test/reg_test.v diff --git a/techlibs/mchp/tests/reg_test/reg_test.ys b/techlibs/microchip/tests/reg_test/reg_test.ys similarity index 93% rename from techlibs/mchp/tests/reg_test/reg_test.ys rename to techlibs/microchip/tests/reg_test/reg_test.ys index 2c1fb87d7..7bd44a99e 100644 --- a/techlibs/mchp/tests/reg_test/reg_test.ys +++ b/techlibs/microchip/tests/reg_test/reg_test.ys @@ -16,6 +16,6 @@ read_verilog reg_test.v -synth_mchp -top reg_test -abc9 -family pf -noiopad +synth_microchip -top reg_test -abc9 -family polarfire -noiopad write_verilog -noexpr reg_test.vm diff --git a/techlibs/mchp/tests/signed_mult/signed_mult.v b/techlibs/microchip/tests/signed_mult/signed_mult.v similarity index 100% rename from techlibs/mchp/tests/signed_mult/signed_mult.v rename to techlibs/microchip/tests/signed_mult/signed_mult.v diff --git a/techlibs/mchp/tests/signed_mult/signed_mult.ys b/techlibs/microchip/tests/signed_mult/signed_mult.ys similarity index 92% rename from techlibs/mchp/tests/signed_mult/signed_mult.ys rename to techlibs/microchip/tests/signed_mult/signed_mult.ys index bba8cbfe2..93588a5dd 100755 --- a/techlibs/mchp/tests/signed_mult/signed_mult.ys +++ b/techlibs/microchip/tests/signed_mult/signed_mult.ys @@ -16,6 +16,6 @@ read_verilog signed_mult.v -synth_mchp -top signed_mult -abc9 -family pf -noiopad +synth_microchip -top signed_mult -abc9 -family polarfire -noiopad write_verilog -noexpr signed_mult.vm diff --git a/techlibs/mchp/tests/simple_ram/simple_ram.v b/techlibs/microchip/tests/simple_ram/simple_ram.v similarity index 100% rename from techlibs/mchp/tests/simple_ram/simple_ram.v rename to techlibs/microchip/tests/simple_ram/simple_ram.v diff --git a/techlibs/mchp/tests/simple_ram/simple_ram.ys b/techlibs/microchip/tests/simple_ram/simple_ram.ys similarity index 93% rename from techlibs/mchp/tests/simple_ram/simple_ram.ys rename to techlibs/microchip/tests/simple_ram/simple_ram.ys index a315a2bfb..85975d250 100644 --- a/techlibs/mchp/tests/simple_ram/simple_ram.ys +++ b/techlibs/microchip/tests/simple_ram/simple_ram.ys @@ -16,6 +16,6 @@ read_verilog simple_ram.v -synth_mchp -top simple_ram -abc9 -family pf -noiopad +synth_microchip -top simple_ram -abc9 -family polarfire -noiopad write_verilog -noexpr simple_ram.vm diff --git a/techlibs/mchp/tests/unsigned_mult/unsigned_mult.v b/techlibs/microchip/tests/unsigned_mult/unsigned_mult.v similarity index 100% rename from techlibs/mchp/tests/unsigned_mult/unsigned_mult.v rename to techlibs/microchip/tests/unsigned_mult/unsigned_mult.v diff --git a/techlibs/mchp/tests/unsigned_mult/unsigned_mult.ys b/techlibs/microchip/tests/unsigned_mult/unsigned_mult.ys similarity index 92% rename from techlibs/mchp/tests/unsigned_mult/unsigned_mult.ys rename to techlibs/microchip/tests/unsigned_mult/unsigned_mult.ys index 05118e265..e588912ea 100644 --- a/techlibs/mchp/tests/unsigned_mult/unsigned_mult.ys +++ b/techlibs/microchip/tests/unsigned_mult/unsigned_mult.ys @@ -16,6 +16,6 @@ read_verilog unsigned_mult.v -synth_mchp -top unsigned_mult -abc9 -family pf -noiopad +synth_microchip -top unsigned_mult -abc9 -family polarfire -noiopad write_verilog -noexpr unsigned_mult.vm diff --git a/techlibs/mchp/tests/uram_ar/uram_ar.v b/techlibs/microchip/tests/uram_ar/uram_ar.v similarity index 100% rename from techlibs/mchp/tests/uram_ar/uram_ar.v rename to techlibs/microchip/tests/uram_ar/uram_ar.v diff --git a/techlibs/mchp/tests/uram_ar/uram_ar.ys b/techlibs/microchip/tests/uram_ar/uram_ar.ys similarity index 93% rename from techlibs/mchp/tests/uram_ar/uram_ar.ys rename to techlibs/microchip/tests/uram_ar/uram_ar.ys index 3650cb249..cbaea647f 100644 --- a/techlibs/mchp/tests/uram_ar/uram_ar.ys +++ b/techlibs/microchip/tests/uram_ar/uram_ar.ys @@ -16,6 +16,6 @@ read_verilog uram_ar.v -synth_mchp -top uram_ar -abc9 -family pf -noiopad +synth_microchip -top uram_ar -abc9 -family polarfire -noiopad write_verilog -noexpr uram_ar.vm diff --git a/techlibs/mchp/tests/uram_sr/uram_sr.v b/techlibs/microchip/tests/uram_sr/uram_sr.v similarity index 100% rename from techlibs/mchp/tests/uram_sr/uram_sr.v rename to techlibs/microchip/tests/uram_sr/uram_sr.v diff --git a/techlibs/mchp/tests/uram_sr/uram_sr.ys b/techlibs/microchip/tests/uram_sr/uram_sr.ys similarity index 93% rename from techlibs/mchp/tests/uram_sr/uram_sr.ys rename to techlibs/microchip/tests/uram_sr/uram_sr.ys index a4c79398a..7708fb39f 100644 --- a/techlibs/mchp/tests/uram_sr/uram_sr.ys +++ b/techlibs/microchip/tests/uram_sr/uram_sr.ys @@ -16,6 +16,6 @@ read_verilog uram_sr.v -synth_mchp -top uram_sr -abc9 -family pf -noiopad +synth_microchip -top uram_sr -abc9 -family polarfire -noiopad write_verilog -noexpr uram_sr.vm diff --git a/techlibs/mchp/tests/widemux/widemux.v b/techlibs/microchip/tests/widemux/widemux.v similarity index 100% rename from techlibs/mchp/tests/widemux/widemux.v rename to techlibs/microchip/tests/widemux/widemux.v diff --git a/techlibs/mchp/tests/widemux/widemux.ys b/techlibs/microchip/tests/widemux/widemux.ys similarity index 93% rename from techlibs/mchp/tests/widemux/widemux.ys rename to techlibs/microchip/tests/widemux/widemux.ys index f8aeaaa58..8ef3a9230 100644 --- a/techlibs/mchp/tests/widemux/widemux.ys +++ b/techlibs/microchip/tests/widemux/widemux.ys @@ -16,6 +16,6 @@ read_verilog widemux.v -synth_mchp -top widemux -abc9 -family pf -noiopad +synth_microchip -top widemux -abc9 -family polarfire -noiopad write_verilog -noexpr widemux.vm diff --git a/techlibs/mchp/uSRAM.txt b/techlibs/microchip/uSRAM.txt similarity index 100% rename from techlibs/mchp/uSRAM.txt rename to techlibs/microchip/uSRAM.txt diff --git a/techlibs/mchp/uSRAM_map.v b/techlibs/microchip/uSRAM_map.v similarity index 100% rename from techlibs/mchp/uSRAM_map.v rename to techlibs/microchip/uSRAM_map.v