Open lekcyjna123 opened 11 months ago
If we had quasi-register, which store high till the end of the cycle, we could implement iterable algorithm in one cycle, but this will make critical path very long...
module circuit(input in1, clk, output out1);
assign out1 = (in1 | out1) & clk;
endmodule
We can split above problem into two:
If we had quasi-register, which store high till the end of the cycle, we could implement iterable algorithm in one cycle, but this will make critical path very long...
Please, no crazy clock manipulation. Pure synchronous logic only.
After our Monday talk with @piotro888 I decided to make a short verification in how many places we have method call under m.If
which depends on other method output:
This results are based on simple grep for "m.If" on the whole coreblocks
directory and checking if we have method calls under this "m.If" (or its "m.Else" branch). Results are promising in my opinion. In 11 places we have possibility to optimise blocking of methods, while only 6 places can not be optimised.
Did you check if there is even any benefit of trying to optimize them in this way? If some method is called in only one place, there is absolutely no harm in blocking it.
I create this issue, to allow for brainstorm how to implement non blocking
if
in transactron. Lets take:In current implementation we always block
method
if transaction is called regardless ofcond
. We would like to not block method iscond
is false.The easy implementation idea is to calculate runnable signal for each pair of (transaction, method) using:
Where
enable
is signal pointing if transaction want to run method andready
say us if method is ready.Above idea works as long as:
cond
is independent from method output orLets say:
Now we can consider two cases:
in_data1
influencecond
thencond
depends from scheduling result (as long as it is not single-caller method), so there is a combinational cycle, because scheduling result (socond
) influence scheduling ofmethod2
.in_data1
is the same regardless of input there is no problemTo summarise. We have to decide how to handle
if
-s which depends from methods whose output depends on input. Some propositions:if
-s in situations where condition depends from scheduler. This solution is somehow similar to old handling of readiness of methods. We allowedready
signal to depends on input data only if method wassingle-caller
schedule_before
for that?All other propositions are welcome.