Update the visuals a litte
This commit is contained in:
@@ -123,7 +123,7 @@ viewCacheHierarchy ch =
|
||||
<| List.indexedMap viewCache ch
|
||||
in
|
||||
div [ class "cache-hierarchy" ] <|
|
||||
[ h2 [] [ text <| "Cache hierarchy" ]
|
||||
[ h2 [] [ text <| "Cache State" ]
|
||||
, levels
|
||||
]
|
||||
|
||||
@@ -154,7 +154,7 @@ viewAccessLog (aes, ap) =
|
||||
, resultSpan ae.result
|
||||
]
|
||||
upEvent n ae = div [ class "event" ]
|
||||
[ text <| "Updated L" ++ String.fromInt (n + 1)
|
||||
[ text <| "Updated L" ++ String.fromInt (List.length aes - n)
|
||||
]
|
||||
events =
|
||||
case ap of
|
||||
@@ -177,18 +177,27 @@ viewAccessInput m =
|
||||
Nothing -> optionalButton False "Access address" (Access -1)
|
||||
in
|
||||
div [ class "access-input" ]
|
||||
[ labeledInput "Access address" m.accessInput ChangeAccessInput
|
||||
[ h2 [] [ text "Run access simulation" ]
|
||||
, div [ class "note" ]
|
||||
[ text "Please make sure to click \"Use Hierarchy\" to load a hierarchy to simulate."
|
||||
]
|
||||
, labeledInput "Access address" m.accessInput ChangeAccessInput
|
||||
, accessButton
|
||||
]
|
||||
|
||||
viewError : Bool -> String -> Html Msg
|
||||
viewError hide e = span [ classList [ ("hidden", hide) ] ] [ text e ]
|
||||
viewError hide e = div [ classList [ ("hidden", hide), ("error", True) ] ] [ text e ]
|
||||
|
||||
viewBase : Model -> Html Msg
|
||||
viewBase m =
|
||||
let
|
||||
rawView = viewRawCacheModelHierarchy m.rawHierarchy
|
||||
cacheView = Maybe.withDefault [] <| Maybe.map (List.singleton << viewCacheHierarchy) <| m.hierarchy
|
||||
cacheView =
|
||||
case m.accessView of
|
||||
Nothing ->
|
||||
Maybe.withDefault []
|
||||
<| Maybe.map (List.singleton << viewCacheHierarchy) <| m.hierarchy
|
||||
Just _ -> []
|
||||
accessView = Maybe.withDefault [] <| Maybe.map (List.singleton << viewAccessView m) <| m.accessView
|
||||
accessInputView = [ viewAccessInput m ]
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user