Closed mithro closed 6 years ago
This is a very old check from the original t-vpack and I don't believe it is relevant anymore. It was originally intended to prevent me mis-counting the number of inputs to a cluster (and hence it's legality) for a corner case where a clock fed both data and the clock pin. The legality code is much more general and sophisticated so I doubt this still applied; even if it does apply it might lead to an unroute in a rare corner case, so not catastrophic. Suggest Tim delete and run the regtests, and if all looks OK then commit it. Can leave a warning saying this looks odd, but the clusterer should continue and the latch should not be inserted.
I've checked and everything in both the vtr_reg_basic
and vtr_reg_strong
regressions test pass with these checks disabled.
As a result I'm going to delete the relevant checks and 'fix-up' code as Vaughn suggested.
Thanks for fixing this! :tada:
There is a check in the clustering code shown below; https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/dcc8468fe9a159307128b27589f19f471aee66f0/vpr/src/pack/cluster.cpp#L774-L796
It claims that a clock being used for a LUT input would break the cluster. This means that there is code in read_circuit which deliberately breaks circuits using the following; https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/dcc8468fe9a159307128b27589f19f471aee66f0/vpr/src/base/read_circuit.cpp#L125-L133
(Which was added in https://github.com/mithro/vtr-verilog-to-routing/commit/6ccf516d32f3f9c30dd438950b892fd9d858a76d).
We hit this issue using the following Verilog code;
Which while I agree it is questionable to drive a block pin using the output of the counter, should still kind of work.
So, I thought I would see what breaks by disabling this check. However, when I disabled this check, everything still seemed to work?
Will things only break is a LUT output is used to drive a clock within the same tile? The iCE40 actually has routing which makes it pretty flexible to drive clocks of circuits. Should that be the check instead?