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
 | # defaults
 | ||||||
| export DESIGN ?= wallypipelinedcore | export DESIGN ?= wallypipelinedcore | ||||||
| export FREQ ?= 3000 | export FREQ ?= 3000 | ||||||
| export CONFIG ?= rv32e_FPUoff | export CONFIG ?= rv32e | ||||||
| TITLE = shreya | TITLE =  | ||||||
| # sky130 and sky90 presently supported
 | 
 | ||||||
|  | # tsmc28, sky130, and sky90 presently supported
 | ||||||
| export TECH ?= sky90 | export TECH ?= sky90 | ||||||
| # MAXCORES allows parallel compilation, which is faster but less CPU-efficient
 | # MAXCORES allows parallel compilation, which is faster but less CPU-efficient
 | ||||||
| # Avoid when doing sweeps of many optimization points in parallel
 | # 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 | 	make synth DESIGN=wallypipelinedcore CONFIG=$@ TECH=sky90 FREQ=3000 MAXCORES=1 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| synth: clean | synth: | ||||||
|  | 	rm -f hdl/* | ||||||
|  | 	rm -rf WORK | ||||||
| 	@echo "DC Synthesis" | 	@echo "DC Synthesis" | ||||||
| 	@mkdir -p hdl/ | 	@mkdir -p hdl/ | ||||||
| 	@mkdir -p $(OUTPUTDIR) | 	@mkdir -p $(OUTPUTDIR) | ||||||
| @ -124,6 +127,7 @@ endif | |||||||
| 	dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out | 	dc_shell-xg-t -64bit -f scripts/$(NAME).tcl | tee $(OUTPUTDIR)/$(NAME).out | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
|  | # fix should make del be here
 | ||||||
| 	rm -rf  alib-52 WORK analyzed $(NAME).out | 	rm -rf  alib-52 WORK analyzed $(NAME).out | ||||||
| 	rm -f hdl/* | 	rm -f hdl/* | ||||||
| 	rm -f default.svf | 	rm -f default.svf | ||||||
| @ -133,9 +137,6 @@ clean: | |||||||
| 	rm -f Synopsys_stack_trace_*.txt | 	rm -f Synopsys_stack_trace_*.txt | ||||||
| 	rm -f crte_*.txt | 	rm -f crte_*.txt | ||||||
| 
 | 
 | ||||||
| fresh: |  | ||||||
| 	rm -rf  WORK |  | ||||||
| 	rm -f hdl/* |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,11 +1,29 @@ | |||||||
| #!/usr/bin/bash | #!/usr/bin/bash | ||||||
|  | # Madeleine Masser-Frye mmasserfrye@hmc.edu July 2022 | ||||||
| 
 | 
 | ||||||
| make clean | helpFunction() | ||||||
| # mv runs runArchive/$(date +"%Y_%m_%d_%I_%M_%p") | {  echo "" | ||||||
| # mv newRuns runs |    echo "Usage: $0 " | ||||||
| # mkdir newRuns |    echo -e "\t--configs    Synthesizes wally with configurations 32e, 32ic, 64ic, 32gc, and 64gc" | ||||||
| make del |    echo -e "\t--freqs NUM  Synthesizes rv32e with target frequencies at NUM MHz and +/- 2, 4, 6, 8 %" | ||||||
| make copy  |    echo -e "\t--features   Synthesizes rv64gc versions FPUoff, noMulDiv, noPriv, PMP0, PMP16" | ||||||
| make configs  |    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 | import subprocess | ||||||
| from multiprocessing import Pool | from multiprocessing import Pool | ||||||
| import time | import time | ||||||
|  | import sys | ||||||
| 
 | 
 | ||||||
| def runCommand(config, tech, freq): | def runSynth(config, tech, freq): | ||||||
|     commands = ["make fresh", "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=0 MAXCORES=1".format(config, tech, freq)] |     global pool | ||||||
|     for c in commands: |     command = "make synth DESIGN=wallypipelinedcore CONFIG={} TECH={} DRIVE=FLOP FREQ={} MAXOPT=1 MAXCORES=1".format(config, tech, freq) | ||||||
|         subprocess.Popen(c, shell=True) |     pool.map(mask, [command]) | ||||||
|     # time.sleep(60) fix only do this when diff configs | 
 | ||||||
|  | def mask(command): | ||||||
|  |     subprocess.Popen(command, shell=True) | ||||||
| 
 | 
 | ||||||
| testFreq = [3000, 10000] | testFreq = [3000, 10000] | ||||||
| 
 | 
 | ||||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||||
| 
 | 
 | ||||||
|  |     i = 0 | ||||||
|     techs = ['sky90', 'tsmc28'] |     techs = ['sky90', 'tsmc28'] | ||||||
|     sweepCenter = [870, 2940] |  | ||||||
|     synthsToRun = [] |     synthsToRun = [] | ||||||
| 
 |     tech = techs[i] | ||||||
|  |     freq = testFreq[i] | ||||||
|     arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8] |     arr = [-8, -6, -4, -2, 0, 2, 4, 6, 8] | ||||||
|     pool = Pool() |     pool = Pool() | ||||||
|  |     staggerPeriod = 60 #seconds | ||||||
| 
 | 
 | ||||||
|     for i in [0]:  |     typeToRun = sys.argv[1] | ||||||
|         tech = techs[i] | 
 | ||||||
|         sc = sweepCenter[i] |     if 'configs' in typeToRun: | ||||||
|         f = testFreq[i] |         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 |         for freq in [round(sc+sc*x/100) for x in arr]: # rv32e freq sweep | ||||||
|             synthsToRun += [['rv32e', tech, freq]] |             runSynth(config, 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]) |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user