[ { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.pack#"
    , "type"      : "pack# :: Index n -> BitVector (CLog 2 n)"
    , "templateE" : "std_logic_vector(~ARG[0])"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.unpack#"
    , "type"      : "unpack# :: KnownNat n => BitVector (CLog 2 n) -> Index n"
    , "templateE" : "unsigned(~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]~ELSEtrue~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]~ELSEfalse~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]~ELSEfalse~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]~ELSEtrue~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]~ELSEfalse~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]~ELSEtrue~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.maxBound#"
    , "type"      : "maxBound# :: KnownNat n => Index n"
    , "templateE" : "to_unsigned(~LIT[0]-1,~SIZE[~TYPO])"
    }
  }
, { "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" : "resize(~ARG[1] * ~ARG[2], ~SIZE[~TYPO])"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.fromInteger#"
    , "type"      : "fromInteger# :: KnownNat n => Integer -> Index n"
    , "templateE" : "resize(unsigned(std_logic_vector(~ARG[1])),~SIZE[~TYPO])"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.plus#"
    , "type"      : "Index m -> Index n -> Index (m + n - 1)"
    , "templateE" : "resize(~ARG[0],~SIZE[~TYPO]) + resize(~ARG[1],~SIZE[~TYPO])"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.minus#"
    , "type"      : "Index m -> Index n -> Index (m + n - 1)"
    , "templateE" : "resize(~ARG[0],~SIZE[~TYPO]) - resize(~ARG[1],~SIZE[~TYPO])"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.times#"
    , "type"      : "Index m -> Index n -> Index (((m-1) * (n-1)) + 1)"
    , "templateE" : "resize(~ARG[0] * ~ARG[1],~SIZE[~TYPO])"
    }
  }
, { "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] rem ~ARG[1]"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.toInteger#"
    , "type"      : "toInteger# :: Index n -> Integer"
    , "templateE" : "~IF~SIZE[~TYP[0]]~THENsigned(std_logic_vector(resize(~ARG[0],~SIZE[~TYPO])))~ELSEto_signed(0,64)~FI"
    }
  }
, { "BlackBox" :
    { "name"      : "Clash.Sized.Internal.Index.resize#"
    , "type"      : "resize# :: KnownNat m => Index n -> Index m"
    , "templateE" : "resize(~ARG[1],~SIZE[~TYPO])"
    }
  }
]
