mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Formatting
This commit is contained in:
		
							parent
							
								
									fc5424fa62
								
							
						
					
					
						commit
						58a07399a2
					
				| @ -1,15 +1,14 @@ | |||||||
| ///////////////////////////////////////////
 | ///////////////////////////////////////////
 | ||||||
| // ahbinterface.sv
 | // ahbinterface.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: Cache/Bus data path.
 | // Purpose: Translates LSU simple memory requests into AHB transactions (NON_SEQ).
 | ||||||
| // Bus Side logic
 |  | ||||||
| // register the fetch data from the next level of memory.
 |  | ||||||
| // This register should be necessary for timing.  There is no register in the uncore or
 |  | ||||||
| // ahblite controller between the memories and this cache.
 |  | ||||||
| // 
 | // 
 | ||||||
|  | // Documentation: RISC-V System on Chip Design Chapter 6 (Figure 6.21)
 | ||||||
|  | //
 | ||||||
| // A component of the CORE-V-WALLY configurable RISC-V project.
 | // A component of the CORE-V-WALLY configurable RISC-V project.
 | ||||||
| // 
 | // 
 | ||||||
| // Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University
 | // Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University
 | ||||||
| @ -30,7 +29,9 @@ | |||||||
| 
 | 
 | ||||||
| `include "wally-config.vh" | `include "wally-config.vh" | ||||||
| 
 | 
 | ||||||
| module ahbinterface #(parameter LSU = 0) ( // **** modify to use LSU/ifu parameter to control widths of buses
 | module ahbinterface #( | ||||||
|  |   parameter LSU = 0                                   // 1: LSU bus width is `XLEN, 0: IFU bus width is 32 bits
 | ||||||
|  | )(  | ||||||
|   input logic 							HCLK, HRESETn, |   input logic 							HCLK, HRESETn, | ||||||
|   // bus interface
 |   // bus interface
 | ||||||
|   input logic 							HREADY,       // AHB peripheral ready
 |   input logic 							HREADY,       // AHB peripheral ready
 | ||||||
|  | |||||||
| @ -1,10 +1,13 @@ | |||||||
| ///////////////////////////////////////////
 | ///////////////////////////////////////////
 | ||||||
| // busfsm.sv
 | // busfsm.sv
 | ||||||
| //
 | //
 | ||||||
| // Written: Ross Thompson ross1728@gmail.com December 29, 2021
 | // Written: Ross Thompson ross1728@gmail.com
 | ||||||
| // Modified: 
 | // Created: December 29, 2021
 | ||||||
|  | // Modified: 18 January 2023
 | ||||||
| //
 | //
 | ||||||
| // Purpose: Load/Store Unit's interface to BUS for cacheless system
 | // Purpose: Simple NON_SEQ (no burst) AHB controller.
 | ||||||
|  | //
 | ||||||
|  | // Documentation: RISC-V System on Chip Design Chapter 6 (Figure 6.23)
 | ||||||
| // 
 | // 
 | ||||||
| // A component of the CORE-V-WALLY configurable RISC-V project.
 | // A component of the CORE-V-WALLY configurable RISC-V project.
 | ||||||
| // 
 | // 
 | ||||||
| @ -55,13 +58,13 @@ module busfsm ( | |||||||
|    |    | ||||||
|   always_comb begin |   always_comb begin | ||||||
| 	  case(CurrState) | 	  case(CurrState) | ||||||
| 	    ADR_PHASE: if(HREADY & |BusRW)  NextState = DATA_PHASE; | 	    ADR_PHASE: if(HREADY & |BusRW) NextState = DATA_PHASE; | ||||||
|                  else                 NextState = ADR_PHASE; |                  else                  NextState = ADR_PHASE; | ||||||
|       DATA_PHASE: if(HREADY)          NextState = MEM3; |       DATA_PHASE: if(HREADY)           NextState = MEM3; | ||||||
| 		          else                    NextState = DATA_PHASE; | 		          else                 NextState = DATA_PHASE; | ||||||
|       MEM3: if(Stall)                 NextState = MEM3; |       MEM3: if(Stall)                  NextState = MEM3; | ||||||
| 		    else                          NextState = ADR_PHASE; | 		    else                       NextState = ADR_PHASE; | ||||||
| 	    default:                        NextState = ADR_PHASE; | 	    default:                       NextState = ADR_PHASE; | ||||||
| 	  endcase | 	  endcase | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user