mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Fixed bug in the lsu's write back data. If an AMO was uncached it would not be corrected executed because the write data to the bus would not include the amoalu.
This commit is contained in:
		
							parent
							
								
									85b5dc08a8
								
							
						
					
					
						commit
						a23e6efd5c
					
				@ -374,7 +374,10 @@ module lsu
 | 
			
		||||
  assign LocalLSUBusAdr = SelUncachedAdr ? LSUPAdrM : DCacheBusAdr ;
 | 
			
		||||
  assign LSUBusAdr = ({{`PA_BITS-LOGWPL{1'b0}}, WordCount} << $clog2(`XLEN/8)) + LocalLSUBusAdr;
 | 
			
		||||
  assign PreLSUBusHWDATA = ReadDataLineSetsM[WordCount];
 | 
			
		||||
  assign LSUBusHWDATA = SelUncachedAdr ? WriteDataM : PreLSUBusHWDATA;  // *** why is this not FinalWriteDataM? which does not work.
 | 
			
		||||
  // exclude the subword write for uncached.  We don't read the data first so we cannot
 | 
			
		||||
  // select the subword by masking.  Subword write also exists inside the uncore to
 | 
			
		||||
  // suport subword masking for i/o.  I'm not sure if this is necessary.
 | 
			
		||||
  assign LSUBusHWDATA = SelUncachedAdr ? FinalAMOWriteDataM : PreLSUBusHWDATA; 
 | 
			
		||||
 | 
			
		||||
  if (`XLEN == 32) assign LSUBusSize = SelUncachedAdr ? LSUFunct3M : 3'b010;
 | 
			
		||||
  else             assign LSUBusSize = SelUncachedAdr ? LSUFunct3M : 3'b011;
 | 
			
		||||
 | 
			
		||||
@ -191,7 +191,7 @@ module uncore (
 | 
			
		||||
  // mux could also include external memory  
 | 
			
		||||
  // AHB Read Multiplexer
 | 
			
		||||
  assign HRDATA = ({`XLEN{HSELRamD}} & HREADRam) |
 | 
			
		||||
		  ({`XLEN{HSELEXTD}} & HRDATAEXT) |   
 | 
			
		||||
		          ({`XLEN{HSELEXTD}} & HRDATAEXT) |   
 | 
			
		||||
                  ({`XLEN{HSELCLINTD}} & HREADCLINT) |
 | 
			
		||||
                  ({`XLEN{HSELPLICD}} & HREADPLIC) | 
 | 
			
		||||
                  ({`XLEN{HSELGPIOD}} & HREADGPIO) |
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user