mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Add back extractSummary mkdir plots
This commit is contained in:
		
							parent
							
								
									bb3c455325
								
							
						
					
					
						commit
						500191cf34
					
				@ -60,6 +60,7 @@ def synthsintocsv():
 | 
				
			|||||||
            writer.writerow([width, config, special, tech, freq, delay, area])
 | 
					            writer.writerow([width, config, special, tech, freq, delay, area])
 | 
				
			||||||
    file.close()
 | 
					    file.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
def synthsfromcsv(filename):
 | 
					def synthsfromcsv(filename):
 | 
				
			||||||
    Synth = namedtuple("Synth", "width config special tech freq delay area")
 | 
					    Synth = namedtuple("Synth", "width config special tech freq delay area")
 | 
				
			||||||
    with open(filename, newline='') as csvfile:
 | 
					    with open(filename, newline='') as csvfile:
 | 
				
			||||||
@ -75,16 +76,15 @@ def synthsfromcsv(filename):
 | 
				
			|||||||
            allSynths[i] = Synth(*allSynths[i])
 | 
					            allSynths[i] = Synth(*allSynths[i])
 | 
				
			||||||
    return allSynths
 | 
					    return allSynths
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def freqPlot(tech, width, config):
 | 
					def freqPlot(tech, width, config):
 | 
				
			||||||
    ''' plots delay, area for syntheses with specified tech, module, width
 | 
					    ''' plots delay, area for syntheses with specified tech, module, width
 | 
				
			||||||
    '''
 | 
					    '''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    current_directory = os.getcwd()
 | 
					    current_directory = os.getcwd()
 | 
				
			||||||
    final_directory = os.path.join(current_directory, 'plots/wally')
 | 
					    final_directory = os.path.join(current_directory, 'plots/wally')
 | 
				
			||||||
#    if not os.path.exists(final_directory):
 | 
					    if not os.path.exists(final_directory):
 | 
				
			||||||
#        os.makedirs(final_directory)
 | 
					        os.makedirs(final_directory)
 | 
				
			||||||
#    os.chdir(final_directory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    freqsL, delaysL, areasL = ([[], []] for i in range(3))
 | 
					    freqsL, delaysL, areasL = ([[], []] for i in range(3))
 | 
				
			||||||
    for oneSynth in allSynths:
 | 
					    for oneSynth in allSynths:
 | 
				
			||||||
@ -159,6 +159,7 @@ def areaDelay(tech, delays, areas, labels, fig, ax, norm=False):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return fig
 | 
					    return fig
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def plotFeatures(tech, width, config):
 | 
					def plotFeatures(tech, width, config):
 | 
				
			||||||
    delays, areas, labels = ([] for i in range(3))
 | 
					    delays, areas, labels = ([] for i in range(3))
 | 
				
			||||||
    freq = techdict[tech].targfreq
 | 
					    freq = techdict[tech].targfreq
 | 
				
			||||||
@ -177,6 +178,7 @@ def plotFeatures(tech, width, config):
 | 
				
			|||||||
    plt.title(titlestr)
 | 
					    plt.title(titlestr)
 | 
				
			||||||
    plt.savefig('./plots/wally/features_'+titlestr+'.png')
 | 
					    plt.savefig('./plots/wally/features_'+titlestr+'.png')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
def plotConfigs(tech, special=''):
 | 
					def plotConfigs(tech, special=''):
 | 
				
			||||||
    delays, areas, labels = ([] for i in range(3))
 | 
					    delays, areas, labels = ([] for i in range(3))
 | 
				
			||||||
    freq = techdict[tech].targfreq
 | 
					    freq = techdict[tech].targfreq
 | 
				
			||||||
@ -216,6 +218,7 @@ def normAreaDelay(special=''):
 | 
				
			|||||||
    ax.legend(handles = fullLeg, loc='upper left')
 | 
					    ax.legend(handles = fullLeg, loc='upper left')
 | 
				
			||||||
    plt.savefig('./plots/wally/normAreaDelay.png')
 | 
					    plt.savefig('./plots/wally/normAreaDelay.png')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
def addFO4axis(fig, ax, tech):
 | 
					def addFO4axis(fig, ax, tech):
 | 
				
			||||||
    fo4 = techdict[tech].fo4
 | 
					    fo4 = techdict[tech].fo4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user