diff --git a/Makefile.in b/Makefile.in index edd7d6463e..d5f79a1993 100644 --- a/Makefile.in +++ b/Makefile.in @@ -100,7 +100,7 @@ CTARGETFLAGS = @CTARGETFLAGS@ M = LineInfo.o StringHeap.o TT = t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o t-dll-analog.o -FF = cprop.o nodangle.o synth.o synth2.o synthsplit.o syn-rules.o +FF = cprop.o exposenodes.o nodangle.o synth.o synth2.o syn-rules.o O = main.o async.o design_dump.o discipline.o dup_expr.o elaborate.o \ elab_expr.o elaborate_analog.o elab_lval.o elab_net.o \ diff --git a/synthsplit.cc b/exposenodes.cc similarity index 82% rename from synthsplit.cc rename to exposenodes.cc index 38726e2d74..89b8ce02a6 100644 --- a/synthsplit.cc +++ b/exposenodes.cc @@ -28,7 +28,7 @@ /* - * The synthsplit functor is primarily provided for use by the vlog95 + * The exposenodes functor is primarily provided for use by the vlog95 * target. To implement some LPM objects, it needs to take a bit or part * of one of the LPM inputs. If that input is not connected to a real * net in the design, we need to create a net at that point so that @@ -42,7 +42,7 @@ * name it generates is unique). */ -struct synthsplit_functor : public functor_t { +struct exposenodes_functor : public functor_t { unsigned count; @@ -56,6 +56,12 @@ static bool expose_nexus(Nexus*nex) NetNet*sig = 0; for (Link*cur = nex->first_nlink() ; cur ; cur = cur->next_nlink()) { + // Don't expose nodes that are attached to constants + if (dynamic_cast (cur->get_obj())) + return false; + if (dynamic_cast (cur->get_obj())) + return false; + NetNet*cur_sig = dynamic_cast (cur->get_obj()); if (cur_sig == 0) continue; @@ -77,7 +83,7 @@ static bool expose_nexus(Nexus*nex) * The vlog95 target implements a wide mux as a hierarchy of 2:1 muxes, * picking off one bit of the select input at each level of the hierarchy. */ -void synthsplit_functor::lpm_mux(Design*, NetMux*obj) +void exposenodes_functor::lpm_mux(Design*, NetMux*obj) { if (obj->sel_width() == 1) return; @@ -89,7 +95,7 @@ void synthsplit_functor::lpm_mux(Design*, NetMux*obj) /* * A VP part select is going to select a part from its input. */ -void synthsplit_functor::lpm_part_select(Design*, NetPartSelect*obj) +void exposenodes_functor::lpm_part_select(Design*, NetPartSelect*obj) { if (obj->dir() != NetPartSelect::VP) return; @@ -101,22 +107,22 @@ void synthsplit_functor::lpm_part_select(Design*, NetPartSelect*obj) /* * A substitute is going to select one or two parts from the wider input signal. */ -void synthsplit_functor::lpm_substitute(Design*, NetSubstitute*obj) +void exposenodes_functor::lpm_substitute(Design*, NetSubstitute*obj) { if (expose_nexus(obj->pin(1).nexus())) count += 1; } -void synthsplit(Design*des) +void exposenodes(Design*des) { - synthsplit_functor synthsplit; - synthsplit.count = 0; + exposenodes_functor exposenodes; + exposenodes.count = 0; if (verbose_flag) { cout << " ... Look for intermediate nodes" << endl << flush; } - des->functor(&synthsplit); + des->functor(&exposenodes); if (verbose_flag) { - cout << " ... Exposed " << synthsplit.count + cout << " ... Exposed " << exposenodes.count << " intermediate signals." << endl << flush; } } diff --git a/main.cc b/main.cc index e12a4a219b..bd357aaf74 100644 --- a/main.cc +++ b/main.cc @@ -226,9 +226,9 @@ const bool CASE_SENSITIVE = true; bool synthesis = false; extern void cprop(Design*des); +extern void exposenodes(Design*des); extern void synth(Design*des); extern void synth2(Design*des); -extern void synthsplit(Design*des); extern void syn_rules(Design*des); extern void nodangle(Design*des); @@ -237,12 +237,12 @@ static struct net_func_map { const char*name; void (*func)(Design*); } func_table[] = { - { "cprop", &cprop }, - { "nodangle", &nodangle }, - { "synth", &synth }, - { "synth2", &synth2 }, - { "synthsplit", &synthsplit }, - { "syn-rules", &syn_rules }, + { "cprop", &cprop }, + { "exposenodes", &exposenodes }, + { "nodangle", &nodangle }, + { "synth", &synth }, + { "synth2", &synth2 }, + { "syn-rules", &syn_rules }, { 0, 0 } }; diff --git a/tgt-vlog95/vlog95-s.conf b/tgt-vlog95/vlog95-s.conf index bb501a4da1..0229840eed 100644 --- a/tgt-vlog95/vlog95-s.conf +++ b/tgt-vlog95/vlog95-s.conf @@ -1,7 +1,7 @@ functor:synth2 functor:synth functor:syn-rules -functor:synthsplit functor:nodangle +functor:exposenodes flag:DLL=vlog95.tgt flag:DISABLE_CONCATZ_GENERATION=true