From 23ff56ef82c114301cde6e0e823a484363227f04 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 29 May 2019 19:11:20 -0700 Subject: [PATCH] Use sane defaults for cache hierarchies. --- src/CacheSim/Update.elm | 2 +- src/Main.elm | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/CacheSim/Update.elm b/src/CacheSim/Update.elm index f53db4e..bc9d7fb 100644 --- a/src/CacheSim/Update.elm +++ b/src/CacheSim/Update.elm @@ -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 diff --git a/src/Main.elm b/src/Main.elm index 8e8bea1..dd97deb 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -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 = ""