map macros to sequential memeory

This commit is contained in:
Donggyu Kim
2017-07-26 00:15:35 -07:00
committed by edwardcwang
parent 7cb5604dfa
commit c4502fca6d
2 changed files with 56 additions and 17 deletions

View File

@@ -75,6 +75,8 @@ object Utils {
def and(e1: Expression, e2: Expression) =
DoPrim(PrimOps.And, Seq(e1, e2), Nil, e1.tpe)
def or(e1: Expression, e2: Expression) =
DoPrim(PrimOps.Or, Seq(e1, e2), Nil, e1.tpe)
def bits(e: Expression, high: BigInt, low: BigInt): Expression =
DoPrim(PrimOps.Bits, Seq(e), Seq(high, low), UIntType(IntWidth(high-low+1)))
def bits(e: Expression, idx: BigInt): Expression = bits(e, idx, idx)