Skip to content

Latest commit

 

History

History
104 lines (75 loc) · 3.44 KB

README.md

File metadata and controls

104 lines (75 loc) · 3.44 KB

Irony

IR infra

Overview

Basic Components

Objects Traits & Structs Macros Tests
Entity
Operation
Constraint
Environ
Print
Parse
Pass
Interpret

Planned Features

  • Pass and Pass Manager with more powerful features;
  • Use laps for Parse and Print;
  • Logging system;
  • Query analysis system, refer to MLIR PM;
  • Dialect support: combination of Enums?

Details

loot at irony package

package irony_macros is useless now, which has been moved to .gitignore;

Print and Constraint are implemented with Rust Closure=, which is kind of ugly. I will try to use laps to make it more concise (especially for Parse and Print).

Demo

CIRCT core dialects

Common

  • Attributes:
    • StringAttr
    • ArrayAttr
    • TypeAttr
  • Data types [DataType]
    • IntType: signless, with width parameter;
    • StructType: !hw.struct<fieldName1: Type1, fieldName2: Type2>
    • ArrayType: !hw.array<k*elementType>
    • UnpackedArrayType: !hw.uarray<k*elementType>
    • SeqHlmemType

hw Dialect

implementation progress
  • Module structure [Operation]
    • ModuleOp: !hw.module<name: StringAttr, body: Region>
      • attributes: name, arg_names, output_names, arg_types, output_types
      • constraints: ModuleConstraint
    • InstanceOp: !hw.instance<name: StringAttr, module: SymbolRefAttr, operands: ArrayAttr>
      • attrbutes: target_name & id, instance_name, arg_names, output_names, arg_types, output_types
      • constraints: ModuleConstraint
    • InputOp: this is additional in Irony, since Irony doen't introduce region arguments
    • OutputOp: !hw.output<operands: ArrayAttr>
  • Miscellaneous [Operation]
    • BitCastOp: !hw.bitcast<operand: TypeAttr>
    • ConstantOp
    • Wire: Optional
  • Aggregate
    • AggregateConstantOp: this is hard to discribe,need ArrayAttr
    • Array things: ArrayConcatOp ArrayCreateOp ArrayGetOp ArraySliceOp
    • Struct things: StructCreateOp StructExplodeOp StructExtractOp StructInjectOp
    • constraints for ops above

comb Dialect

implementation progress
  • Variadic Op: Add, Mul, And, Or, Xor
  • Binary Op: DivU, DivS, ModU, ModS, Shl, ShrU, ShrS, Sub
  • ICmp Op
  • CombParity, CombExtract, CombConcat, CombReplicate
  • CombMux2
  • CombMux_k (This is specific in irony-circt)

seq Dialect

implementation progress
  • [*] CompReg
  • [*] Hlmem, read, write