[ { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.pack#"
    , "type"      : "pack# :: Index n -> BitVector (CLog 2 n)"
    , "templateE" : "~ARG[0]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.unpack#"
    , "type"      : "unpack# :: KnownNat n => BitVector (CLog 2 n) -> Index n"
    , "templateE" : "~ARG[1]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.eq#"
    , "type"      : "eq# :: Index n -> Index n -> Bool"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THEN~ARG[0] == ~ARG[1]~ELSE1'b1~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.neq#"
    , "type"      : "neq# :: Index n -> Index n -> Bool"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THEN~ARG[0] != ~ARG[1]~ELSE1'b0~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.lt#"
    , "type"      : "lt# :: Index n -> Index n -> Bool"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THEN~ARG[0] < ~ARG[1]~ELSE1'b0~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.ge#"
    , "type"      : "ge# :: Index n -> Index n -> Bool"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THEN~ARG[0] >= ~ARG[1]~ELSE1'b1~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.gt#"
    , "type"      : "gt# :: Index n -> Index n -> Bool"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THEN~ARG[0] > ~ARG[1]~ELSE1'b0~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.le#"
    , "type"      : "le# :: Index n -> Index n -> Bool"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THEN~ARG[0] <= ~ARG[1]~ELSE1'b1~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.maxBound#"
    , "type"      : "maxBound# :: KnownNat n => Index n"
    , "templateE" : "~ARG[0]-~SIZE[~TYPO]'d1"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.+#"
    , "type"      : "(+#) :: KnownNat n => Index n -> Index n -> Index n"
    , "templateE" : "~ARG[1] + ~ARG[2]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.-#"
    , "type"      : "(-#) :: KnownNat n => Index n -> Index n -> Index n"
    , "templateE" : "~ARG[1] - ~ARG[2]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.*#"
    , "type"      : "(*#) :: KnownNat n => Index n -> Index n -> Index n"
    , "templateE" : "~ARG[1] * ~ARG[2]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.fromInteger#"
    , "type"      : "fromInteger# :: KnownNat n => Integer -> Index n"
    , "templateE" : "$unsigned(~ARG[1][(~SIZE[~TYPO]-1):0])"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.plus#"
    , "type"      : "Index m -> Index n -> Index (m + n - 1)"
    , "templateD" : "assign ~RESULT = ~ARG[0] + ~ARG[1];"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.minus#"
    , "type"      : "Index m -> Index n -> Index (m + n - 1)"
    , "templateD" : "assign ~RESULT = ~ARG[0] - ~ARG[1];"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.times#"
    , "type"      : "Index m -> Index n -> Index (((m-1) * (n-1)) + 1)"
    , "templateD" : "assign ~RESULT = ~ARG[0] * ~ARG[1];"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.quot#"
    , "type"      : "quot# :: Index n -> Index n -> Index n"
    , "templateE" : "~ARG[0] / ~ARG[1]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.rem#"
    , "type"      : "rem# :: Index n -> Index n -> Index n"
    , "templateE" : "~ARG[0] % ~ARG[1]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.toInteger#"
    , "type"      : "toInteger# :: Index n -> Integer"
    , "templateD" : "assign ~RESULT = ~IF~SIZE[~TYP[0]]~THEN$unsigned(~ARG[0])~ELSE64'sd0~FI;"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.resize#"
    , "type"      : "resize# :: KnownNat m => Index n -> Index m"
    , "templateD" : "assign ~RESULT = $unsigned(~ARG[1]);"
    }
  }
]
