From f2c96180e415b491f84e149928f016d8b3419dd6 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 1 Jun 2019 14:43:40 -0700 Subject: [PATCH] Add cache range view --- src/CacheSim/View.elm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CacheSim/View.elm b/src/CacheSim/View.elm index fd958f5..2896640 100644 --- a/src/CacheSim/View.elm +++ b/src/CacheSim/View.elm @@ -137,7 +137,10 @@ viewCache level (cm, cs) = slotHtml s = case s of Empty -> td [] [ text "" ] - Used l a -> td [] [ text <| String.fromInt a ] + Used l a -> td [] [ text <| + (String.fromInt (a * cm.blockSize * 4)) ++ + "-" ++ + (String.fromInt ((a + 1) * cm.blockSize * 4 - 1)) ] in List.map slotHtml set cacheRow = List.concat <| List.map setRow cs