diff options
Diffstat (limited to '')
| -rw-r--r-- | rtl/cache/sram.sv | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rtl/cache/sram.sv b/rtl/cache/sram.sv index 986c09b..8d68b7e 100644 --- a/rtl/cache/sram.sv +++ b/rtl/cache/sram.sv @@ -27,6 +27,10 @@ module cache_sram addr_tag tag_file[DEPTH] /*verilator public*/; line_state state_file[DEPTH] /*verilator public*/; + // Hace 3 cosas: + // 1. Si se necesita escribir un dato: escribe en los tag y data files en la posición del index de escritura + // 2. Si se necesita escribir un estado: escribe en el state file en la posición del index de escritura + // 3. Cada ciclo retorna siempre lo que esté en todos los files en la posición de index de lectura always_ff @(posedge clk) begin if (write_data) begin tag_file[index_wr] <= tag_wr; @@ -41,6 +45,7 @@ module cache_sram state_rd <= state_file[index_rd]; end + // Se inicializan todas las líneas del state file como INVALID //FIXME: rst_n para state_file? initial for (int i = 0; i < DEPTH; ++i) |
