From f3b18ead59ae02f95dabbf0a1dea40873a816975 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 21 Jan 2024 06:23:46 -0600 Subject: rtl: refactor filenames and directory hierarchy --- rtl/cache/token.sv | 57 ------------------------------------------------------ 1 file changed, 57 deletions(-) delete mode 100644 rtl/cache/token.sv (limited to 'rtl/cache/token.sv') diff --git a/rtl/cache/token.sv b/rtl/cache/token.sv deleted file mode 100644 index cb3e59d..0000000 --- a/rtl/cache/token.sv +++ /dev/null @@ -1,57 +0,0 @@ -`include "cache/defs.sv" - -module cache_token -#(parameter TOKEN_AT_RESET=0) -( - input logic clk, - rst_n, - - input addr_tag core_tag, - input addr_index core_index, - - input ring_token in_token, // input del token - input logic in_token_valid, // se está recibiendo el token - - output ring_token out_token, // output del token - output logic out_token_valid, // se está enviando el token - - input logic send, - lock_line, - unlock_line, - output logic locked, - may_send -); - - logic may_send_if_token_held; - - // Solo se puede iniciar un request si se tiene el token y el token es - // válido - assign may_send = may_send_if_token_held && in_token_valid; - assign may_send_if_token_held - = (!in_token.e2.valid || in_token.e2.index != core_index || in_token.e2.tag != core_tag) - && (!in_token.e1.valid || in_token.e1.index != core_index || in_token.e1.tag != core_tag) - && (!in_token.e0.valid || in_token.e0.index != core_index || in_token.e0.tag != core_tag); - - always_ff @(posedge clk or negedge rst_n) - if (!rst_n) begin - out_token <= {($bits(out_token)){1'b0}}; - out_token_valid <= TOKEN_AT_RESET; - - locked <= 0; - end else begin - out_token.e0.tag <= core_tag; - out_token.e0.index <= core_index; - out_token.e0.valid <= may_send_if_token_held && (send || locked) && !unlock_line; - - out_token.e2 <= in_token.e1; - out_token.e1 <= in_token.e0; - out_token_valid <= in_token_valid; - - if (lock_line) - locked <= 1; - - if (unlock_line) - locked <= 0; - end - -endmodule -- cgit v1.2.3