forked from Github_Repos/cvw
		
	generic cleanup
This commit is contained in:
		
							parent
							
								
									9c79078be1
								
							
						
					
					
						commit
						91afe5522b
					
				@ -30,10 +30,8 @@
 | 
			
		||||
 | 
			
		||||
`include "wally-config.vh"
 | 
			
		||||
 | 
			
		||||
module ahbcacheinterface #(parameter BEATSPERLINE, LINELEN, LOGWPL, CACHE_ENABLED)
 | 
			
		||||
  (
 | 
			
		||||
module ahbcacheinterface #(parameter BEATSPERLINE, LINELEN, LOGWPL, CACHE_ENABLED) (
 | 
			
		||||
  input  logic                 HCLK, HRESETn,
 | 
			
		||||
  
 | 
			
		||||
  // bus interface
 | 
			
		||||
  input  logic                 HREADY,
 | 
			
		||||
  input  logic [`AHBW-1:0]     HRDATA,
 | 
			
		||||
@ -64,7 +62,8 @@ module ahbcacheinterface #(parameter BEATSPERLINE, LINELEN, LOGWPL, CACHE_ENABLE
 | 
			
		||||
  input  logic [2:0]           Funct3,
 | 
			
		||||
  output logic                 SelBusBeat,
 | 
			
		||||
  output logic                 BusStall,
 | 
			
		||||
  output logic                BusCommitted);
 | 
			
		||||
  output logic                 BusCommitted
 | 
			
		||||
);
 | 
			
		||||
  
 | 
			
		||||
  localparam integer           LLENPOVERAHBW = `LLEN / `AHBW; // *** fix me duplciated in lsu.
 | 
			
		||||
 | 
			
		||||
@ -75,6 +74,8 @@ module ahbcacheinterface #(parameter BEATSPERLINE, LINELEN, LOGWPL, CACHE_ENABLE
 | 
			
		||||
  logic [`AHBW-1:0]            PreHWDATA;
 | 
			
		||||
 | 
			
		||||
  genvar                       index;
 | 
			
		||||
 | 
			
		||||
  // fetch buffer is made of BEATSPERLINE flip-flops
 | 
			
		||||
  for (index = 0; index < BEATSPERLINE; index++) begin:fetchbuffer
 | 
			
		||||
    logic [BEATSPERLINE-1:0] CaptureBeat;
 | 
			
		||||
    assign CaptureBeat[index] = CaptureEn & (index == BeatCountDelayed);
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,6 @@
 | 
			
		||||
`include "wally-config.vh"
 | 
			
		||||
/* verilator lint_off DECLFILENAME */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
module mux2 #(parameter WIDTH = 8) (
 | 
			
		||||
  input  logic [WIDTH-1:0] d0, d1, 
 | 
			
		||||
  input  logic             s, 
 | 
			
		||||
 | 
			
		||||
@ -41,6 +41,7 @@ module priorityonehot #(parameter N = 8) (
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
  genvar i;
 | 
			
		||||
  
 | 
			
		||||
  assign y[0] = a[0];
 | 
			
		||||
  for (i=1; i<N; i++) begin:poh
 | 
			
		||||
    assign y[i] = a[i] & ~|a[i-1:0];
 | 
			
		||||
 | 
			
		||||
@ -31,8 +31,6 @@
 | 
			
		||||
 | 
			
		||||
`include "wally-config.vh"
 | 
			
		||||
 | 
			
		||||
/* verilator lint_off UNOPTFLAT */
 | 
			
		||||
 | 
			
		||||
module prioritythermometer #(parameter N = 8) (
 | 
			
		||||
  input  logic  [N-1:0] a,
 | 
			
		||||
  output logic  [N-1:0] y
 | 
			
		||||
@ -42,13 +40,14 @@ module prioritythermometer #(parameter N = 8) (
 | 
			
		||||
  //  Rather than linear.
 | 
			
		||||
 | 
			
		||||
  // create thermometer code mask
 | 
			
		||||
  /* verilator lint_off UNOPTFLAT */
 | 
			
		||||
  genvar i;
 | 
			
		||||
  assign y[0] = ~a[0];
 | 
			
		||||
  for (i=1; i<N; i++) begin:therm
 | 
			
		||||
    assign y[i] = y[i-1] & ~a[i];
 | 
			
		||||
  end
 | 
			
		||||
  /* verilator lint_on UNOPTFLAT */
 | 
			
		||||
endmodule
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* verilator lint_on UNOPTFLAT */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user