[myhdl-list] Driving constants
Brought to you by:
jandecaluwe
From: Sébastien B. <seb...@mi...> - 2011-09-03 10:42:08
|
Hi, I need to create instances that only drive their output to some constant level, e.g. the equivalent of: module foo(output bar); assign bar = 1'b1; endmodule I have tried doing: def ImplementControl(self): @always_comb def logic(): self.control.ack_o.next[0] = 1 return logic but MyHDL doesn't cope with the empty sensitivity list. Setting the value at signal creation (e.g. things like self.control.ack_o = Signal(intbv(1))) is not an option because it would become very messy with my object-oriented approach. Besides, I would find it surprising that describing something as basic as a constant driver is an intractable problem in MyHDL. Any solutions? Thanks, Sébastien |