Use sane defaults for cache hierarchies.

This commit is contained in:
Danila Fedorin 2019-05-29 19:11:20 -07:00
parent 0552a715db
commit 23ff56ef82
2 changed files with 2 additions and 6 deletions

View File

@ -16,7 +16,7 @@ updateChangeRawModel l f m =
updateCreateRawModel : Model -> (Model, Cmd Msg)
updateCreateRawModel m =
let
freshRawModel = { blockSize = "", setCount = "", setSize = "" }
freshRawModel = { blockSize = "4", setCount = "4", setSize = "3" }
newModel = { m | rawHierarchy = m.rawHierarchy ++ [ freshRawModel ] }
cmd = Cmd.none
in

View File

@ -8,15 +8,11 @@ import CacheSim.View exposing (..)
import Browser exposing (Document, document)
import Html exposing (text)
testCacheModelHierarchy =
[ { blockSize = "128", setCount = "8", setSize = "1" }
]
init : Flags -> (Model, Cmd Msg)
init f =
let
initialModel =
{ rawHierarchy = testCacheModelHierarchy
{ rawHierarchy = []
, hierarchy = Nothing
, accessView = Nothing
, accessInput = ""