- # set ready/valid signalling. if busy, means refuse incoming issue
- # XXX note: for an in-order core this is far too simple. busy must
- # be gated with the *availability* of the incoming (requested)
- # instruction, where Core must be prepared to store-and-hold
- # an instruction if no FU is available.
- comb += self.p.o_ready.eq(~busy_o)
+ # ready/valid signalling. if busy, means refuse incoming issue.
+ # (this is a global signal, TODO, change to one which allows
+ # overlapping instructions)
+ # also, if there was no fu found we must not send back a valid
+ # indicator. BUT, of course, when there is no instruction
+ # we must ignore the fu_found flag, otherwise o_ready will never
+ # be set when everything is idle
+ comb += self.p.o_ready.eq(~busy_o & (fu_found | ~self.p.i_valid))