llvm / circt

Circuit IR Compilers and Tools
https://circt.org
Other
1.57k stars 277 forks source link

[Seq] Add a new op interface for clock transformation ops. NFC #7204

Open prithayan opened 1 week ago

prithayan commented 1 week ago

Add the clock gate, clock inverter and clock divider ops to a new clock transformation interface. This makes it easier to handle them and get the input clock directly.

prithayan commented 1 week ago

Does ClockMuxOp need to have this interface? In that case getClk returning a single value seems not composable.

Yeah, I was not sure about clock mux, for the use case that I was considering, ClockMuxOp needs to be handled separately, unlike the others . But it makes sense to include it as a clock transformation op, and let the client deal with it, if it returns multiple input clocks. I will update the interface to include mux ops.