[myhdl-list] Synchronous Set
Brought to you by:
jandecaluwe
From: Colin B. <col...@gm...> - 2014-07-02 21:18:16
|
Hello, I'm wondering what the best way of doing a synchronous set in MyHDL is. Since there doesn't seem to be a built-in equivalent of @always_seq(clk.posedge, rst) for synchronous sets, is the following best practice? Let me know if it's bad practice to embed html. def qff_w_set(clk, set, q0, q, d): @always_seq(clk.posedge) def logic(): if set: q.next = q0 else: q.next = d return logic Thanks, Colin |