Re: [myhdl-list] Driving constants
Brought to you by:
jandecaluwe
From: Bob C. <Fl...@gm...> - 2011-10-18 22:09:19
|
Perhaps it is inappropriate to rewind the prior discussion, but here goes... On 09/04/2011 02:26 AM, Sébastien Bourdeauducq wrote: > Ok, then here is some more background: > > I have an abstract class FunctionalUnit which implements dataflow > processing units. This abstract class creates handshaking signals (ack, > strobe) common to all functional units which are used to control the > flow of data. > The method ImplementControl is overloaded by derived classes to > implement the actual handshaking logic, and returns instances. Now, when > some functional units need to drive handshaking signals constants, and > if it is not possible to build "constant drivers" instances, it becomes > messy. So, from my admittedly limited (and likely incorrect) perspective, here's what I think is going on: Let's say I have some 'dataflow 3-input NAND gates', where each of the three inputs sinks a data and strobe, and drives a return ack. When the 3rd input has been strobed, the output will fire (as well as generate the returning ack to the last input), sending its own data and strobe to the downstream dataflow element until the returning ack is seen. The problem, as I see it, is what if I need only a 2-input NAND gate at a particular point in the dataflow? And let's say I'd prefer to reuse my standard element rather than define a new 2-input element (though an optimizer may do it for me). To do this, I'd need to drive the unused input with a constant value, in this case a True or intvb(1) value. And the resulting ack would be ignored. Is that the gist of it? If so, can we reduce the above example to the application domain, and toss around some candidate solutions (and simulations) in MyHDL code? -BobC |