mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	cleaned up the <begin_signature> code, now works for code bases larger than 0x10000000
This commit is contained in:
		
							parent
							
								
									c46fbf2260
								
							
						
					
					
						commit
						e324db71b4
					
				@ -220,15 +220,13 @@ logic [3:0] dummy;
 | 
				
			|||||||
        ProgramAddrMap = $fopen(ProgramAddrMapFile, "r");
 | 
					        ProgramAddrMap = $fopen(ProgramAddrMapFile, "r");
 | 
				
			||||||
        if (ProgramLabelMap & ProgramAddrMap) begin // check we found both files
 | 
					        if (ProgramLabelMap & ProgramAddrMap) begin // check we found both files
 | 
				
			||||||
          while (!$feof(ProgramLabelMap)) begin
 | 
					          while (!$feof(ProgramLabelMap)) begin
 | 
				
			||||||
            string addr, label;
 | 
					            string label;
 | 
				
			||||||
            integer returncode;
 | 
					            integer returncode;
 | 
				
			||||||
            returncode = $fgets(label, ProgramLabelMap);
 | 
					            returncode = $fgets(label, ProgramLabelMap);
 | 
				
			||||||
            returncode = $fgets(addr, ProgramAddrMap);
 | 
					            returncode = $fgets(adrstr, ProgramAddrMap);
 | 
				
			||||||
            if (label == "begin_signature\n") begin
 | 
					            if (label == "begin_signature\n") begin
 | 
				
			||||||
              adrstr = addr[1:7];
 | 
					 | 
				
			||||||
              if (adrstr=="0000000") // if running on rv64 we get the address at a later 
 | 
					 | 
				
			||||||
                adrstr = addr[9:15]; 
 | 
					 | 
				
			||||||
              if (DEBUG) $display("%s begin_signature adrstr: %s", TEST, adrstr);
 | 
					              if (DEBUG) $display("%s begin_signature adrstr: %s", TEST, adrstr);
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
          end
 | 
					          end
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
@ -238,8 +236,8 @@ logic [3:0] dummy;
 | 
				
			|||||||
        $fclose(ProgramLabelMap);
 | 
					        $fclose(ProgramLabelMap);
 | 
				
			||||||
        $fclose(ProgramAddrMap);
 | 
					        $fclose(ProgramAddrMap);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        testadr = (`RAM_BASE+adrstr.atohex())/(`XLEN/8);
 | 
					        testadr = ($unsigned(adrstr.atohex()))/(`XLEN/8);
 | 
				
			||||||
        testadrNoBase = (adrstr.atohex())/(`XLEN/8);
 | 
					        testadrNoBase = (adrstr.atohex() - `RAM_BASE)/(`XLEN/8);
 | 
				
			||||||
        #600; // give time for instructions in pipeline to finish
 | 
					        #600; // give time for instructions in pipeline to finish
 | 
				
			||||||
        if (TEST == "embench") begin
 | 
					        if (TEST == "embench") begin
 | 
				
			||||||
          // Writes contents of begin_signature to .sim.output file
 | 
					          // Writes contents of begin_signature to .sim.output file
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user