mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Formatting
This commit is contained in:
parent
edc4630742
commit
c5c4a3c011
@ -1,8 +1,9 @@
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// ahbcacheinterface.sv
|
// ahbcacheinterface.sv
|
||||||
//
|
//
|
||||||
// Written: Ross Thompson ross1728@gmail.com August 29, 2022
|
// Written: Ross Thompson ross1728@gmail.com
|
||||||
// Modified:
|
// Created: August 29, 2022
|
||||||
|
// Modified: 18 January 2023
|
||||||
//
|
//
|
||||||
// Purpose: Translates cache bus requests and uncached ieu memory requests into AHB transactions.
|
// Purpose: Translates cache bus requests and uncached ieu memory requests into AHB transactions.
|
||||||
//
|
//
|
||||||
@ -28,7 +29,12 @@
|
|||||||
|
|
||||||
`include "wally-config.vh"
|
`include "wally-config.vh"
|
||||||
|
|
||||||
module ahbcacheinterface #(parameter BEATSPERLINE, LINELEN, AHBWLOGBWPL, LLENPOVERAHBW) (
|
module ahbcacheinterface #(
|
||||||
|
parameter integer BEATSPERLINE, // Number of AHBW words (beats) in cacheline
|
||||||
|
parameter integer AHBWLOGBWPL, // Log2 of ^
|
||||||
|
parameter integer LINELEN, // Number of bits in cacheline
|
||||||
|
parameter integer LLENPOVERAHBW // Number of AHB beats in a LLEN word. AHBW cannot be larger than LLEN. (implementation limitation)
|
||||||
|
)(
|
||||||
input logic HCLK, HRESETn,
|
input logic HCLK, HRESETn,
|
||||||
// bus interface controls
|
// bus interface controls
|
||||||
input logic HREADY, // AHB peripheral ready
|
input logic HREADY, // AHB peripheral ready
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
`include "wally-config.vh"
|
`include "wally-config.vh"
|
||||||
`define BURST_EN 1
|
`define BURST_EN 1 // Enables burst mode. Disable to show the lost performance.
|
||||||
|
|
||||||
// HCLK and clk must be the same clock!
|
// HCLK and clk must be the same clock!
|
||||||
module buscachefsm #(
|
module buscachefsm #(
|
||||||
|
@ -227,7 +227,7 @@ module ifu (
|
|||||||
.NextAdr(PCNextFSpill[11:0]),
|
.NextAdr(PCNextFSpill[11:0]),
|
||||||
.PAdr(PCPF),
|
.PAdr(PCPF),
|
||||||
.CacheCommitted(CacheCommittedF), .InvalidateCache(InvalidateICacheM));
|
.CacheCommitted(CacheCommittedF), .InvalidateCache(InvalidateICacheM));
|
||||||
ahbcacheinterface #(WORDSPERLINE, LINELEN, LOGBWPL, LLENPOVERAHBW)
|
ahbcacheinterface #(WORDSPERLINE, LOGBWPL, LINELEN, LLENPOVERAHBW)
|
||||||
ahbcacheinterface(.HCLK(clk), .HRESETn(~reset),
|
ahbcacheinterface(.HCLK(clk), .HRESETn(~reset),
|
||||||
.HRDATA,
|
.HRDATA,
|
||||||
.Flush(FlushD), .CacheBusRW, .HSIZE(IFUHSIZE), .HBURST(IFUHBURST), .HTRANS(IFUHTRANS), .HWSTRB(),
|
.Flush(FlushD), .CacheBusRW, .HSIZE(IFUHSIZE), .HBURST(IFUHBURST), .HTRANS(IFUHTRANS), .HWSTRB(),
|
||||||
|
@ -242,7 +242,7 @@ module lsu (
|
|||||||
localparam integer LLENLOGBWPL = $clog2(LLENWORDSPERLINE); // Log2 of ^
|
localparam integer LLENLOGBWPL = $clog2(LLENWORDSPERLINE); // Log2 of ^
|
||||||
localparam integer BEATSPERLINE = `DCACHE_LINELENINBITS/`AHBW; // Number of AHBW words (beats) in cacheline
|
localparam integer BEATSPERLINE = `DCACHE_LINELENINBITS/`AHBW; // Number of AHBW words (beats) in cacheline
|
||||||
localparam integer AHBWLOGBWPL = $clog2(BEATSPERLINE); // Log2 of ^
|
localparam integer AHBWLOGBWPL = $clog2(BEATSPERLINE); // Log2 of ^
|
||||||
localparam integer LINELEN = `DCACHE_LINELENINBITS; // Number of bytes in cacheline
|
localparam integer LINELEN = `DCACHE_LINELENINBITS; // Number of bits in cacheline
|
||||||
localparam integer LLENPOVERAHBW = `LLEN / `AHBW; // Number of AHB beats in a LLEN word. AHBW cannot be larger than LLEN. (implementation limitation)
|
localparam integer LLENPOVERAHBW = `LLEN / `AHBW; // Number of AHB beats in a LLEN word. AHBW cannot be larger than LLEN. (implementation limitation)
|
||||||
|
|
||||||
logic [LINELEN-1:0] FetchBuffer; // Temporary buffer to hold partially fetched cacheline
|
logic [LINELEN-1:0] FetchBuffer; // Temporary buffer to hold partially fetched cacheline
|
||||||
@ -273,7 +273,7 @@ module lsu (
|
|||||||
.FetchBuffer, .CacheBusRW,
|
.FetchBuffer, .CacheBusRW,
|
||||||
.CacheBusAck(DCacheBusAck), .InvalidateCache(1'b0));
|
.CacheBusAck(DCacheBusAck), .InvalidateCache(1'b0));
|
||||||
|
|
||||||
ahbcacheinterface #(.BEATSPERLINE(BEATSPERLINE), .LINELEN(LINELEN), .AHBWLOGBWPL(AHBWLOGBWPL), .LLENPOVERAHBW(LLENPOVERAHBW)) ahbcacheinterface(
|
ahbcacheinterface #(.BEATSPERLINE(BEATSPERLINE), .AHBWLOGBWPL(AHBWLOGBWPL), .LINELEN(LINELEN), .LLENPOVERAHBW(LLENPOVERAHBW)) ahbcacheinterface(
|
||||||
.HCLK(clk), .HRESETn(~reset), .Flush(FlushW),
|
.HCLK(clk), .HRESETn(~reset), .Flush(FlushW),
|
||||||
.HRDATA, .HWDATA(LSUHWDATA), .HWSTRB(LSUHWSTRB),
|
.HRDATA, .HWDATA(LSUHWDATA), .HWSTRB(LSUHWSTRB),
|
||||||
.HSIZE(LSUHSIZE), .HBURST(LSUHBURST), .HTRANS(LSUHTRANS), .HWRITE(LSUHWRITE), .HREADY(LSUHREADY),
|
.HSIZE(LSUHSIZE), .HBURST(LSUHBURST), .HTRANS(LSUHTRANS), .HWRITE(LSUHWRITE), .HREADY(LSUHREADY),
|
||||||
|
Loading…
Reference in New Issue
Block a user