Commit 8f2d7dd5 by Zachary Snow

fixed multiple issues with struct and multi-packed conversions

- struct conversion handles directionality of fields
- struct conversion supports minus part selects
- fixed incorrect handling of directional part selects in multi-packed
  conversion
- multi-packed conversion defines standard ranges in terms of
  directional part selects for clarity
- fixed potential loop due to overeager untagging in multi-packed
  conversion
parent 80984f7e
......@@ -196,70 +196,86 @@ traverseExpr typeMap =
then Ident $ tail x
else Ident x
rewriteExpr (orig @ (Bit (Bit expr idxInner) idxOuter)) =
if isJust maybeDims
if isJust maybeDims && expr == rewriteExpr expr
then Bit expr' idx'
else orig
where
maybeDims = dims $ rewriteExpr expr
maybeDims = dims expr
Just (dimInner, dimOuter, expr') = maybeDims
idxInner' = orientIdx dimInner idxInner
idxOuter' = orientIdx dimOuter idxOuter
base = BinOp Mul idxInner' (rangeSize dimOuter)
idx' = simplify $ BinOp Add base idxOuter'
rewriteExpr (orig @ (Bit expr idx)) =
if isJust maybeDims
if isJust maybeDims && expr == rewriteExpr expr
then Range expr' mode' range'
else orig
where
maybeDims = dims $ rewriteExpr expr
maybeDims = dims expr
Just (dimInner, dimOuter, expr') = maybeDims
mode' = IndexedPlus
idx' = orientIdx dimInner idx
len = rangeSize dimOuter
base = BinOp Add (endianCondExpr dimOuter (snd dimOuter) (fst dimOuter)) (BinOp Mul idx' len)
range' = (simplify base, simplify len)
rewriteExpr (orig @ (Range (Bit expr idxInner) NonIndexed rangeOuter)) =
if isJust maybeDims && expr == rewriteExpr expr
then endianCondExpr rangeOuter
(rewriteExpr $ Range exprOuter IndexedMinus range)
(rewriteExpr $ Range exprOuter IndexedPlus range)
else orig
where
maybeDims = dims expr
exprOuter = Bit expr idxInner
base = fst rangeOuter
len = rangeSize rangeOuter
range = (base, len)
rewriteExpr (orig @ (Range (Bit expr idxInner) modeOuter rangeOuter)) =
if isJust maybeDims
then Range expr' mode' range'
if isJust maybeDims && expr == rewriteExpr expr
then endianCondExpr dimOuter
(Range expr' modeDec range')
(Range expr' modeInc range')
else orig
where
maybeDims = dims $ rewriteExpr expr
maybeDims = dims expr
Just (dimInner, dimOuter, expr') = maybeDims
mode' = IndexedPlus
idxInner' = orientIdx dimInner idxInner
rangeOuterReverseIndexed =
(BinOp Add (fst rangeOuter) (BinOp Sub (snd rangeOuter)
(Number "1")), snd rangeOuter)
(baseOuter, lenOuter) =
(modeDec, modeInc) =
case modeOuter of
IndexedPlus ->
endianCondRange dimOuter rangeOuter rangeOuterReverseIndexed
IndexedMinus ->
endianCondRange dimOuter rangeOuterReverseIndexed rangeOuter
NonIndexed ->
(endianCondExpr dimOuter (snd rangeOuter) (fst rangeOuter), rangeSize rangeOuter)
idxOuter' = orientIdx dimOuter baseOuter
IndexedPlus -> (IndexedPlus , IndexedMinus)
IndexedMinus -> (IndexedMinus, IndexedPlus )
NonIndexed -> error "invariant violated"
(baseOuter, lenOuter) = rangeOuter
baseOuter' = orientIdx dimOuter baseOuter
start = BinOp Mul idxInner' (rangeSize dimOuter)
base = simplify $ BinOp Add start idxOuter'
base = simplify $ BinOp Add start baseOuter'
len = lenOuter
range' = (base, len)
rewriteExpr (orig @ (Range expr NonIndexed range)) =
if isJust maybeDims && expr == rewriteExpr expr
then endianCondExpr range
(rewriteExpr $ Range expr IndexedMinus range')
(rewriteExpr $ Range expr IndexedPlus range')
else orig
where
maybeDims = dims expr
base = fst range
len = rangeSize range
range' = (base, len)
rewriteExpr (orig @ (Range expr mode range)) =
if isJust maybeDims
then Range expr' mode' range'
if isJust maybeDims && expr == rewriteExpr expr
then Range expr' mode range'
else orig
where
maybeDims = dims $ rewriteExpr expr
maybeDims = dims expr
Just (_, dimOuter, expr') = maybeDims
mode' = mode
size = rangeSize dimOuter
base = endianCondExpr dimOuter (snd dimOuter) (fst dimOuter)
range' =
sizeOuter = rangeSize dimOuter
base = BinOp Add (BinOp Mul sizeOuter (fst range)) start
len = BinOp Mul sizeOuter (snd range)
range' = (base, len)
start =
case mode of
NonIndexed ->
(simplify hi, simplify lo)
where
lo = BinOp Mul size (snd range)
hi = BinOp Sub (BinOp Add lo (BinOp Mul (rangeSize range) size)) (Number "1")
IndexedPlus -> (BinOp Add (BinOp Mul size (fst range)) base, BinOp Mul size (snd range))
IndexedMinus -> (BinOp Add (BinOp Mul size (fst range)) base, BinOp Mul size (snd range))
IndexedPlus -> endianCondExpr dimOuter (snd dimOuter) (fst dimOuter)
IndexedMinus -> endianCondExpr dimOuter (fst dimOuter) (snd dimOuter)
NonIndexed -> error "invariant violated"
rewriteExpr other = other
......@@ -385,52 +385,87 @@ convertAsgn structs types (lhs, expr) =
Nothing -> (Implicit Unspecified [], Ident x)
Just t -> (t, Ident x)
convertSubExpr (Dot e x) =
case subExprType of
Struct p fields [] -> undot (Struct p fields) fields
Union p fields [] -> undot (Union p fields) fields
_ -> (Implicit Unspecified [], Dot e' x)
if maybeFields == Nothing
then (Implicit Unspecified [], Dot e' x)
else if Map.notMember structTf structs
then (fieldType, Dot e' x)
else (dropInnerTypeRange fieldType, undotted)
where
(subExprType, e') = convertSubExpr e
undot structTf fields =
if Map.notMember structTf structs
then (fieldType, Dot e' x)
else (fieldType, Range e' NonIndexed r)
where
fieldType = lookupFieldType fields x
r = lookupUnstructRange structTf x
convertSubExpr (Range eOuter NonIndexed (rOuter @ (hiO, loO))) =
-- VCS doesn't allow ranges to be cascaded, so we need to combine
-- nested Ranges into a single range. My understanding of the
-- semantics are that a range returns a new, zero-indexed sub-range.
case eOuter' of
Range eInner NonIndexed (_, loI) ->
(t', Range eInner NonIndexed (simplify hi, simplify lo))
where
lo = BinOp Add loI loO
hi = BinOp Add loI hiO
Range eInner IndexedPlus (baseI, _) ->
(t', Range eInner IndexedPlus (simplify base, simplify len))
where
base = BinOp Add baseI loO
len = rangeSize rOuter
_ -> (t', Range eOuter' NonIndexed rOuter)
maybeFields = getFields subExprType
Just (structTf, fields) = maybeFields
(fieldType, bounds, dims) = lookupFieldInfo structTf fields x
len = rangeSize bounds
[dim] = dims
undotted = if null dims || rangeSize dim == Number "1"
then Bit e' (fst bounds)
else endianCondExpr dim
(Range e' IndexedMinus (fst bounds, len))
(Range e' IndexedPlus (snd bounds, len))
convertSubExpr (Range (Dot e x) NonIndexed rOuter) =
if maybeFields == Nothing
then (Implicit Unspecified [], orig')
else if Map.notMember structTf structs
then (fieldType, orig')
else (dropInnerTypeRange fieldType, undotted)
where
(t, eOuter') = convertSubExpr eOuter
t' = dropInnerTypeRange t
convertSubExpr (Range eOuter IndexedPlus (rOuter @ (baseO, lenO))) =
case eOuter' of
Range eInner NonIndexed (hiI, loI) ->
(t', Range eInner IndexedPlus (simplify base, simplify len))
where
base = BinOp Add baseO $
endianCondExpr (hiI, loI) loI hiI
len = lenO
_ -> (t', Range eOuter' IndexedPlus rOuter)
orig' = Range (Dot e' x) NonIndexed rOuter
(subExprType, e') = convertSubExpr e
maybeFields = getFields subExprType
Just (structTf, fields) = maybeFields
(fieldType, bounds, dims) = lookupFieldInfo structTf fields x
[dim] = dims
undotted = Range e' NonIndexed $
endianCondRange dim rangeLeft rangeRight
rangeLeft =
( BinOp Sub (fst bounds) $ BinOp Sub (fst dim) (fst rOuter)
, BinOp Sub (fst bounds) $ BinOp Sub (fst dim) (snd rOuter) )
rangeRight =
( BinOp Add (snd bounds) $ BinOp Sub (snd dim) (fst rOuter)
, BinOp Add (snd bounds) $ BinOp Sub (snd dim) (snd rOuter) )
convertSubExpr (Range (Dot e x) mode (baseO, lenO)) =
if maybeFields == Nothing
then (Implicit Unspecified [], orig')
else if Map.notMember structTf structs
then (fieldType, orig')
else (dropInnerTypeRange fieldType, undotted)
where
orig' = Range (Dot e' x) mode (baseO, lenO)
(subExprType, e') = convertSubExpr e
maybeFields = getFields subExprType
Just (structTf, fields) = maybeFields
(fieldType, bounds, dims) = lookupFieldInfo structTf fields x
[dim] = dims
baseLeft = BinOp Sub (fst bounds) $ BinOp Sub (fst dim) baseO
baseRight = BinOp Add (snd bounds) $ BinOp Sub (snd dim) baseO
undotted = endianCondExpr dim
(Range e' mode (baseLeft , lenO))
(Range e' otherMode (baseRight, lenO))
otherMode = if mode == IndexedPlus
then IndexedMinus
else IndexedPlus
convertSubExpr (Range e mode r) =
(t', Range e' mode r)
where
(t, eOuter') = convertSubExpr eOuter
(t, e') = convertSubExpr e
t' = dropInnerTypeRange t
convertSubExpr (Range e m r) =
(t', Range e' m r)
convertSubExpr (Bit (Dot e x) i) =
if maybeFields == Nothing
then (Implicit Unspecified [], Bit (Dot e' x) i)
else if Map.notMember structTf structs
then (fieldType, Bit (Dot e' x) i)
else (dropInnerTypeRange fieldType, Bit e' i')
where
(subExprType, e') = convertSubExpr e
maybeFields = getFields subExprType
Just (structTf, fields) = maybeFields
(fieldType, bounds, dims) = lookupFieldInfo structTf fields x
[dim] = dims
iLeft = BinOp Sub (fst bounds) $ BinOp Sub (fst dim) i
iRight = BinOp Add (snd bounds) $ BinOp Sub (snd dim) i
i' = endianCondExpr dim iLeft iRight
convertSubExpr (Bit e i) =
(t', Bit e' i)
where
(t, e') = convertSubExpr e
t' = dropInnerTypeRange t
......@@ -446,17 +481,6 @@ convertAsgn structs types (lhs, expr) =
where
(_, e1') = convertSubExpr e1
(_, e2') = convertSubExpr e2
convertSubExpr (Bit e i) =
case e' of
Range eInner NonIndexed (_, loI) ->
(t', Bit eInner (simplify $ BinOp Add loI i'))
Range eInner IndexedPlus (baseI, _) ->
(t', Bit eInner (simplify $ BinOp Add baseI i'))
_ -> (t', Bit e' i')
where
(t, e') = convertSubExpr e
t' = dropInnerTypeRange t
(_, i') = convertSubExpr i
convertSubExpr (Call e args) =
(retType, Call e $ convertCall structs types e' args)
where
......@@ -541,6 +565,22 @@ convertAsgn structs types (lhs, expr) =
lookupFieldType fields fieldName = fieldMap Map.! fieldName
where fieldMap = Map.fromList $ map swap fields
-- get the fields and type function of a struct or union
getFields :: Type -> Maybe ([Range] -> Type, [Field])
getFields (Struct p fields []) = Just (Struct p fields, fields)
getFields (Union p fields []) = Just (Union p fields, fields)
getFields _ = Nothing
-- get the field type, flattended bounds, and original type dimensions
lookupFieldInfo :: ([Range] -> Type) -> [Field] -> Identifier
-> (Type, Range, [Range])
lookupFieldInfo structTf fields x =
(fieldType, bounds, dims)
where
fieldType = lookupFieldType fields x
bounds = lookupUnstructRange structTf x
dims = snd $ typeRanges fieldType
-- attempts to convert based on the assignment-like contexts of TF arguments
convertCall :: Structs -> Types -> Expr -> Args -> Args
convertCall structs types fn (Args pnArgs kwArgs) =
......
module Example;
typedef struct packed {
logic [10:4] a;
logic [1:3] bx;
logic [3:1] by;
logic [3:4][5:7] cw;
logic [4:3][5:7] cx;
logic [3:4][7:5] cy;
logic [4:3][7:5] cz;
} T;
T t;
initial begin
$monitor("%2d %b %b %b %b %b %b %b %b %b %b %b %b %b %b %b %b", $time,
t, t.a, t.bx, t.by,
t.cw, t.cw[3], t.cw[4],
t.cx, t.cx[3], t.cx[4],
t.cy, t.cy[3], t.cy[4],
t.cz, t.cz[3], t.cz[4]
);
#1 t.a = 1;
#1 t.a[5+:2] = '1;
#1 t.a[8-:3] = '1;
#1 t.a[10] = 1;
#1 t.a[7] = 0;
#1 t.bx[1+:1] = 1;
#1 t.bx[1:2] = 1;
#1 t.bx[3] = 0;
#1 t.bx[3-:2] = 1;
#1 t.bx[2] = 0;
#1 t.by[1+:1] = 1;
#1 t.by[2:1] = 1;
#1 t.by[3] = 0;
#1 t.by[3-:2] = 1;
#1 t.by[2] = 0;
#1 t.cw[3][6+:1] = 1;
#1 t.cw[3][7-:2] = 1;
#1 t.cw[3][5+:2] = 0;
#1 t.cw[3][6:7] = 2'b10;
#1 t.cw[3][6:7] = 2'b01;
#1 t.cw[3:4] = '1;
#1 t.cw[4][5] = 0;
#1 t.cw[4][6:7] = 0;
#1 t.cw[3+:2] = 6'b010011;
#1 t.cw[4-:2] = 6'b101011;
#1 t.cx[3][6+:1] = 1;
#1 t.cx[3][7-:2] = 1;
#1 t.cx[3][5+:2] = 0;
#1 t.cx[3][6:7] = 2'b10;
#1 t.cx[3][6:7] = 2'b01;
#1 t.cx[4:3] = '1;
#1 t.cx[4][5] = 0;
#1 t.cx[4][6:7] = 0;
#1 t.cx[3+:2] = 6'b010011;
#1 t.cx[4-:2] = 6'b101011;
#1 t.cy[3][6+:1] = 1;
#1 t.cy[3][7-:2] = 1;
#1 t.cy[3][5+:2] = 0;
#1 t.cy[3][7:6] = 2'b10;
#1 t.cy[3][7:6] = 2'b01;
#1 t.cy[3:4] = '1;
#1 t.cy[4][5] = 0;
#1 t.cy[4][7:6] = 0;
#1 t.cy[3+:2] = 6'b010011;
#1 t.cy[4-:2] = 6'b101011;
#1 t.cz[3][6+:1] = 1;
#1 t.cz[3][7-:2] = 1;
#1 t.cz[3][5+:2] = 0;
#1 t.cz[3][7:6] = 2'b10;
#1 t.cz[3][7:6] = 2'b01;
#1 t.cz[4:3] = '1;
#1 t.cz[4][5] = 0;
#1 t.cz[4][7:6] = 0;
#1 t.cz[3+:2] = 6'b010011;
#1 t.cz[4-:2] = 6'b101011;
end
endmodule
module top;
endmodule
module Example;
reg [15:0] t;
initial begin
$display(" 0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 1 0000001xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0000001 xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 2 0000111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0000111 xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 3 0011111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 0011111 xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 4 1011111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1011111 xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 5 1010111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1010111 xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 6 10101111xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1010111 1xx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 7 101011101xxxxxxxxxxxxxxxxxxxxxxxxxxxx 1010111 01x xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 8 1010111010xxxxxxxxxxxxxxxxxxxxxxxxxxx 1010111 010 xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display(" 9 1010111001xxxxxxxxxxxxxxxxxxxxxxxxxxx 1010111 001 xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("11 1010111001xx1xxxxxxxxxxxxxxxxxxxxxxxx 1010111 001 xx1 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("12 1010111001x01xxxxxxxxxxxxxxxxxxxxxxxx 1010111 001 x01 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("13 1010111001001xxxxxxxxxxxxxxxxxxxxxxxx 1010111 001 001 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("14 1010111001011xxxxxxxxxxxxxxxxxxxxxxxx 1010111 001 011 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("15 1010111001001xxxxxxxxxxxxxxxxxxxxxxxx 1010111 001 001 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("16 1010111001001x1xxxxxxxxxxxxxxxxxxxxxx 1010111 001 001 x1xxxx x1x xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("17 1010111001001x01xxxxxxxxxxxxxxxxxxxxx 1010111 001 001 x01xxx x01 xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("18 1010111001001001xxxxxxxxxxxxxxxxxxxxx 1010111 001 001 001xxx 001 xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("19 1010111001001010xxxxxxxxxxxxxxxxxxxxx 1010111 001 001 010xxx 010 xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("20 1010111001001001xxxxxxxxxxxxxxxxxxxxx 1010111 001 001 001xxx 001 xxx xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("21 1010111001001111111xxxxxxxxxxxxxxxxxx 1010111 001 001 111111 111 111 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("22 1010111001001111011xxxxxxxxxxxxxxxxxx 1010111 001 001 111011 111 011 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("23 1010111001001111000xxxxxxxxxxxxxxxxxx 1010111 001 001 111000 111 000 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("24 1010111001001010011xxxxxxxxxxxxxxxxxx 1010111 001 001 010011 010 011 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("25 1010111001001101011xxxxxxxxxxxxxxxxxx 1010111 001 001 101011 101 011 xxxxxx xxx xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("26 1010111001001101011xxxx1xxxxxxxxxxxxx 1010111 001 001 101011 101 011 xxxx1x x1x xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("27 1010111001001101011xxxx01xxxxxxxxxxxx 1010111 001 001 101011 101 011 xxxx01 x01 xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("28 1010111001001101011xxx001xxxxxxxxxxxx 1010111 001 001 101011 101 011 xxx001 001 xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("29 1010111001001101011xxx010xxxxxxxxxxxx 1010111 001 001 101011 101 011 xxx010 010 xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("30 1010111001001101011xxx001xxxxxxxxxxxx 1010111 001 001 101011 101 011 xxx001 001 xxx xxxxxx xxx xxx xxxxxx xxx xxx");
$display("31 1010111001001101011111111xxxxxxxxxxxx 1010111 001 001 101011 101 011 111111 111 111 xxxxxx xxx xxx xxxxxx xxx xxx");
$display("32 1010111001001101011011111xxxxxxxxxxxx 1010111 001 001 101011 101 011 011111 111 011 xxxxxx xxx xxx xxxxxx xxx xxx");
$display("33 1010111001001101011000111xxxxxxxxxxxx 1010111 001 001 101011 101 011 000111 111 000 xxxxxx xxx xxx xxxxxx xxx xxx");
$display("34 1010111001001101011010011xxxxxxxxxxxx 1010111 001 001 101011 101 011 010011 011 010 xxxxxx xxx xxx xxxxxx xxx xxx");
$display("35 1010111001001101011101011xxxxxxxxxxxx 1010111 001 001 101011 101 011 101011 011 101 xxxxxx xxx xxx xxxxxx xxx xxx");
$display("36 1010111001001101011101011x1xxxxxxxxxx 1010111 001 001 101011 101 011 101011 011 101 x1xxxx x1x xxx xxxxxx xxx xxx");
$display("37 101011100100110101110101101xxxxxxxxxx 1010111 001 001 101011 101 011 101011 011 101 01xxxx 01x xxx xxxxxx xxx xxx");
$display("38 1010111001001101011101011000xxxxxxxxx 1010111 001 001 101011 101 011 101011 011 101 000xxx 000 xxx xxxxxx xxx xxx");
$display("39 1010111001001101011101011100xxxxxxxxx 1010111 001 001 101011 101 011 101011 011 101 100xxx 100 xxx xxxxxx xxx xxx");
$display("40 1010111001001101011101011010xxxxxxxxx 1010111 001 001 101011 101 011 101011 011 101 010xxx 010 xxx xxxxxx xxx xxx");
$display("41 1010111001001101011101011111111xxxxxx 1010111 001 001 101011 101 011 101011 011 101 111111 111 111 xxxxxx xxx xxx");
$display("42 1010111001001101011101011111110xxxxxx 1010111 001 001 101011 101 011 101011 011 101 111110 111 110 xxxxxx xxx xxx");
$display("43 1010111001001101011101011111000xxxxxx 1010111 001 001 101011 101 011 101011 011 101 111000 111 000 xxxxxx xxx xxx");
$display("44 1010111001001101011101011010011xxxxxx 1010111 001 001 101011 101 011 101011 011 101 010011 010 011 xxxxxx xxx xxx");
$display("45 1010111001001101011101011101011xxxxxx 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 xxxxxx xxx xxx");
$display("46 1010111001001101011101011101011xxxx1x 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 xxxx1x x1x xxx");
$display("47 1010111001001101011101011101011xxx01x 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 xxx01x 01x xxx");
$display("48 1010111001001101011101011101011xxx000 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 xxx000 000 xxx");
$display("49 1010111001001101011101011101011xxx100 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 xxx100 100 xxx");
$display("50 1010111001001101011101011101011xxx010 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 xxx010 010 xxx");
$display("51 1010111001001101011101011101011111111 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 111111 111 111");
$display("52 1010111001001101011101011101011110111 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 110111 111 110");
$display("53 1010111001001101011101011101011000111 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 000111 111 000");
$display("54 1010111001001101011101011101011010011 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 010011 011 010");
$display("55 1010111001001101011101011101011101011 1010111 001 001 101011 101 011 101011 011 101 101011 101 011 101011 011 101");
#55;
end
endmodule
module top;
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment