mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	made wally synth flow shell based
This commit is contained in:
		
							parent
							
								
									8e6aa12b2b
								
							
						
					
					
						commit
						8f0f626140
					
				| @ -6,9 +6,10 @@ NAME := synth | ||||
| # defaults
 | ||||
| export DESIGN ?= wallypipelinedcore | ||||
| export FREQ ?= 3000 | ||||
| export CONFIG ?= rv32e_FPUoff | ||||
| TITLE = shreya | ||||
| # sky130 and sky90 presently supported
 | ||||
| export CONFIG ?= rv32e | ||||
| TITLE =  | ||||
| 
 | ||||
| # tsmc28, sky130, and sky90 presently supported
 | ||||
| export TECH ?= sky90 | ||||
| # MAXCORES allows parallel compilation, which is faster but less CPU-efficient
 | ||||
| # Avoid when doing sweeps of many optimization points in parallel
 | ||||
| @ -111,7 +112,9 @@ $(CONFIGFILESTRIM): | ||||
| 	make synth DESIGN=wallypipelinedcore CONFIG=$@ TECH=sky90 FREQ=3000 MAXCORES=1 | ||||
| 
 | ||||
| 
 | ||||
| synth: clean | ||||
| synth: | ||||
| 	rm -f hdl/* | ||||
| 	rm -rf WORK | ||||
| 	@echo "DC Synthesis" | ||||
| 	@mkdir -p hdl/ | ||||
| 	@mkdir -p $(OUTPUTDIR) | ||||
| @ -124,6 +127,7 @@ endif | ||||
| 	dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out | ||||
| 
 | ||||
| clean: | ||||
| # fix should make del be here
 | ||||
| 	rm -rf  alib-52 WORK analyzed $(NAME).out | ||||
| 	rm -f hdl/* | ||||
| 	rm -f default.svf | ||||
| @ -133,9 +137,6 @@ clean: | ||||
| 	rm -f Synopsys_stack_trace_*.txt | ||||
| 	rm -f crte_*.txt | ||||
| 
 | ||||
| fresh: | ||||
| 	rm -rf  WORK | ||||
| 	rm -f hdl/* | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,11 +1,29 @@ | ||||
| #!/usr/bin/bash | ||||
| # Madeleine Masser-Frye mmasserfrye@hmc.edu July 2022 | ||||
| 
 | ||||
| make clean | ||||
| # mv runs runArchive/$(date +"%Y_%m_%d_%I_%M_%p") | ||||
| # mv newRuns runs | ||||
| # mkdir newRuns | ||||
| make del | ||||
| make copy  | ||||
| make configs  | ||||
| helpFunction() | ||||
| {  echo "" | ||||
|    echo "Usage: $0 " | ||||
|    echo -e "\t--configs    Synthesizes wally with configurations 32e, 32ic, 64ic, 32gc, and 64gc" | ||||
|    echo -e "\t--freqs NUM  Synthesizes rv32e with target frequencies at NUM MHz and +/- 2, 4, 6, 8 %" | ||||
|    echo -e "\t--features   Synthesizes rv64gc versions FPUoff, noMulDiv, noPriv, PMP0, PMP16" | ||||
|    exit 1 # Exit script after printing help | ||||
| } | ||||
| 
 | ||||
| ./wallySynth.py | ||||
| VALID_ARGS=$(getopt -o cft: --long configs,features,freqs: -- "$@") | ||||
| 
 | ||||
| eval set -- "$VALID_ARGS" | ||||
| unset VALID_ARGS | ||||
| 
 | ||||
| if [[ $1 == "--" ]];  | ||||
|     then helpFunction | ||||
| elif [[ $1 == "--freqs" ]] && [[ ! $2 =~ ^[[:digit:]]+$ ]] | ||||
|     then echo "Argument must be an integer, target frequnecy is in MHz" | ||||
| else | ||||
|     make clean | ||||
|     make del | ||||
|     make copy  | ||||
|     make configs  | ||||
|     ./wallySynth.py $1 $2 | ||||
|     ./extractSummary.py | ||||
| fi | ||||
| @ -4,36 +4,43 @@ | ||||
| import subprocess | ||||
| from multiprocessing import Pool | ||||
| import time | ||||
| import sys | ||||
| 
 | ||||
| def runCommand(config, tech, freq): | ||||
|     commands = ["make fresh", "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)] | ||||
|     for c in commands: | ||||
|         subprocess.Popen(c, shell=True) | ||||
|     # time.sleep(60) fix only do this when diff configs | ||||
| def runSynth(config, tech, freq): | ||||
|     global pool | ||||
|     command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=1 MAXCORES=1".format(config, tech, freq) | ||||
|     pool.map(mask, [command]) | ||||
| 
 | ||||
| def mask(command): | ||||
|     subprocess.Popen(command, shell=True) | ||||
| 
 | ||||
| testFreq = [3000, 10000] | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
| 
 | ||||
|     i = 0 | ||||
|     techs = ['sky90', 'tsmc28'] | ||||
|     sweepCenter = [870, 2940] | ||||
|     synthsToRun = [] | ||||
| 
 | ||||
|     tech = techs[i] | ||||
|     freq = testFreq[i] | ||||
|     arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8] | ||||
|     pool = Pool() | ||||
|     staggerPeriod = 60 #seconds | ||||
| 
 | ||||
|     for i in [0]:  | ||||
|         tech = techs[i] | ||||
|         sc = sweepCenter[i] | ||||
|         f = testFreq[i] | ||||
|     typeToRun = sys.argv[1] | ||||
| 
 | ||||
|     if 'configs' in typeToRun: | ||||
|         for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64ic', 'rv32e']: # configs | ||||
|             config = config + '_orig' # until memory integrated | ||||
|             runSynth(config, tech, freq) | ||||
|             time.sleep(staggerPeriod) | ||||
|     elif 'features' in typeToRun: | ||||
|         for mod in ['FPUoff', 'noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations | ||||
|             config = 'rv64gc_' + mod | ||||
|             runSynth(config, tech, freq) | ||||
|             time.sleep(staggerPeriod) | ||||
|     elif 'freqs' in typeToRun: | ||||
|         sc = int(sys.argv[2]) | ||||
|         config = 'rv32e' | ||||
|         for freq in [round(sc+sc*x/100) for x in arr]: # rv32e freq sweep | ||||
|             synthsToRun += [['rv32e', tech, freq]] | ||||
|         # for config in ['rv32gc', 'rv32ic', 'rv64gc', 'rv64ic', 'rv32e']: # configs | ||||
|         #     config = config + '_FPUoff' # while FPU under rennovation | ||||
|         #     synthsToRun += [[config, tech, f]] | ||||
|         # for mod in ['noMulDiv', 'noPriv', 'PMP0', 'PMP16']: # rv64gc path variations | ||||
|         #     config = 'rv64gc_' + mod | ||||
|         #     synthsToRun += [[config, tech, f]] | ||||
| 
 | ||||
|         for x in synthsToRun: | ||||
|             pool.starmap(runCommand, [x]) | ||||
|             runSynth(config, tech, freq) | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user