1 /*
2  * Copyright (c) 2016 Helmut Neemann
3  * Use of this source code is governed by the GPL v3 license
4  * that can be found in the LICENSE file.
5  */
6 package de.neemann.digital.core.memory;
7 
8 import de.neemann.digital.core.IntFormat;
9 import de.neemann.digital.core.stats.Countable;
10 import de.neemann.digital.core.ValueFormatter;
11 
12 /**
13  * Interface to get access to the rams data.
14  */
15 public interface RAMInterface extends ProgramMemory, Countable {
16     /**
17      * @return the {@link DataField} containing the RAMs data
18      */
getMemory()19     DataField getMemory();
20 
21     /**
22      * @return the rams size
23      */
getSize()24     int getSize();
25 
26     /**
27      * @return the addr bits
28      */
getAddrBits()29     int getAddrBits();
30 
31     /**
32      * @return the integer format to be used to visualize the values
33      */
getValueFormatter()34     default ValueFormatter getValueFormatter() {
35         return IntFormat.HEX_FORMATTER;
36     }
37 }
38