Skip to content

[Synth] Add an operation for declarative Cut rewrite pattern #10485

@uenoku

Description

@uenoku

Conceptually similar to PDL, but it operates on truth table.
For PDL we can use native constraint to match specific truth table but
still not suitable for dynamic programming based cut rewriting.
The operations serves as a database for cut rewriting pattern.

synth.cut_rewrite_pattern (%0:i1, %1:i1, %2:i1) -> (i1) attributes {cost = ...} {
  %0 = synth.aig.and_inv %n0, not %1, %2: i1
  synth.yield %0: i1
}

hw.module @XOR3() {...} 
synth.cut_rewrite_pattern (%0:i1, %1:i1, %2:i1) -> (i1) attributes {cost = ...} {
  %0 = hw.instance @XOR3 (...)
  synth.yield %0: i1
}

TechMapper (and also database based Cut rewriting, c.f. abc rewrite command) could use this operations to declare patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions