-
Notifications
You must be signed in to change notification settings - Fork 181
Closed as not planned
Labels
Description
Firstly, I really like the syntax of amaranth (compare to migen...:)
But when I saw the code like " m.d.sync/comb += self.name.eq(...)"
I used to though that seems a little not elegance.
If we have to assign logic to sync/comb block of module, why not follow idea of sv:
self.count = Signal(width, logic="sync") // always_ff
self.count = Signal(width, logic="comb") // always_comb
self.count = Signal(width); // compatible with current design
we can use "with" clousuare here
with m.d.sync(domain = default):
self.count.eq(self.count + 1) // can do logic type check as sv
If (self.reload): // "with m.If/Else" can be implicity here
self.count.eq(self.reload_value)
Else If(self.count == TOP):
self.count.eq(0)