mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	"Resolved" ram preload issues by replacing the RAM's types with bit from logic. Tested fpga synthesis.
This commit is contained in:
		
							parent
							
								
									9ee1ffe8fe
								
							
						
					
					
						commit
						9de434a61b
					
				@ -42,7 +42,7 @@ module ram1p1rwbe import cvw::*; #(parameter USE_SRAM=0, DEPTH=64, WIDTH=44, PRE
 | 
				
			|||||||
  output logic [WIDTH-1:0]        dout
 | 
					  output logic [WIDTH-1:0]        dout
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  logic [WIDTH-1:0]               RAM[DEPTH-1:0];
 | 
					  bit [WIDTH-1:0]               RAM[DEPTH-1:0];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // ***************************************************************************
 | 
					  // ***************************************************************************
 | 
				
			||||||
  // TRUE SRAM macro
 | 
					  // TRUE SRAM macro
 | 
				
			||||||
 | 
				
			|||||||
@ -51,7 +51,6 @@ module ram_ahb import cvw::*;  #(parameter cvw_t P,
 | 
				
			|||||||
  logic                        memwrite, memwriteD, memread;
 | 
					  logic                        memwrite, memwriteD, memread;
 | 
				
			||||||
  logic                        nextHREADYRam;
 | 
					  logic                        nextHREADYRam;
 | 
				
			||||||
  logic                        DelayReady;
 | 
					  logic                        DelayReady;
 | 
				
			||||||
  logic [P.XLEN-1:0]             HRDATA2;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // a new AHB transactions starts when HTRANS requests a transaction, 
 | 
					  // a new AHB transactions starts when HTRANS requests a transaction, 
 | 
				
			||||||
  // the peripheral is selected, and the previous transaction is completing
 | 
					  // the peripheral is selected, and the previous transaction is completing
 | 
				
			||||||
@ -73,13 +72,7 @@ module ram_ahb import cvw::*;  #(parameter cvw_t P,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // single-ported RAM
 | 
					  // single-ported RAM
 | 
				
			||||||
  ram1p1rwbe #(P.USE_SRAM, RANGE/8, P.XLEN, PRELOAD) memory(.clk(HCLK), .ce(1'b1), 
 | 
					  ram1p1rwbe #(P.USE_SRAM, RANGE/8, P.XLEN, PRELOAD) memory(.clk(HCLK), .ce(1'b1), 
 | 
				
			||||||
    .addr(RamAddr[ADDR_WIDTH+OFFSET-1:OFFSET]), .we(memwriteD), .din(HWDATA), .bwe(HWSTRB), .dout(HRDATA2));
 | 
					    .addr(RamAddr[ADDR_WIDTH+OFFSET-1:OFFSET]), .we(memwriteD), .din(HWDATA), .bwe(HWSTRB), .dout(HREADRam));
 | 
				
			||||||
 | 
					 | 
				
			||||||
  //assign HREADRam = HRDATA2 === 'bx ? 64'hdeadbeefdeadbeef : HRDATA2;
 | 
					 | 
				
			||||||
  // **** RT: MAJOR BUG can't leave in for anything.  Will cause synthesis issues.
 | 
					 | 
				
			||||||
  // PRIV sv48-svadu test not working without it.
 | 
					 | 
				
			||||||
  //assign HREADRam = HRDATA2 === 'bx ? 64'h0 : HRDATA2;
 | 
					 | 
				
			||||||
  assign HREADRam = HRDATA2;
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  // use this to add arbitrary latency to ram. Helps test AHB controller correctness
 | 
					  // use this to add arbitrary latency to ram. Helps test AHB controller correctness
 | 
				
			||||||
  if(`RAM_LATENCY > 0) begin
 | 
					  if(`RAM_LATENCY > 0) begin
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user