forked from Github_Repos/cvw
		
	Converted rv32ic to rv32imc
This commit is contained in:
		
							parent
							
								
									5c83c6fb02
								
							
						
					
					
						commit
						5d2a48d5d8
					
				@ -68,7 +68,7 @@
 | 
				
			|||||||
// Integer Divider Configuration
 | 
					// Integer Divider Configuration
 | 
				
			||||||
// IDIV_BITSPERCYCLE must be 1, 2, or 4
 | 
					// IDIV_BITSPERCYCLE must be 1, 2, or 4
 | 
				
			||||||
`define IDIV_BITSPERCYCLE 4
 | 
					`define IDIV_BITSPERCYCLE 4
 | 
				
			||||||
`define IDIV_ON_FPU 0
 | 
					`define IDIV_ON_FPU 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Legal number of PMP entries are 0, 16, or 64
 | 
					// Legal number of PMP entries are 0, 16, or 64
 | 
				
			||||||
`define PMP_ENTRIES 16
 | 
					`define PMP_ENTRIES 16
 | 
				
			||||||
 | 
				
			|||||||
@ -37,7 +37,7 @@
 | 
				
			|||||||
// IEEE 754 compliance
 | 
					// IEEE 754 compliance
 | 
				
			||||||
`define IEEE754 0
 | 
					`define IEEE754 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
`define MISA (32'h00000104 | 1 << 20 | 1 << 18 )
 | 
					`define MISA (32'h00000104 | 1 << 20 | 1 << 18 | 1 << 12)
 | 
				
			||||||
`define ZICSR_SUPPORTED 1
 | 
					`define ZICSR_SUPPORTED 1
 | 
				
			||||||
`define ZIFENCEI_SUPPORTED 1
 | 
					`define ZIFENCEI_SUPPORTED 1
 | 
				
			||||||
`define COUNTERS 32
 | 
					`define COUNTERS 32
 | 
				
			||||||
@ -5,7 +5,7 @@ export PATH=$PATH:/usr/local/bin/
 | 
				
			|||||||
verilator=`which verilator`
 | 
					verilator=`which verilator`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
basepath=$(dirname $0)/..
 | 
					basepath=$(dirname $0)/..
 | 
				
			||||||
for config in rv32e rv64gc rv32gc rv32ic rv32i rv64i rv64fpquad; do
 | 
					for config in rv32e rv64gc rv32gc rv32imc rv32i rv64i rv64fpquad; do
 | 
				
			||||||
#for config in  rv64gc; do
 | 
					#for config in  rv64gc; do
 | 
				
			||||||
    echo "$config linting..."
 | 
					    echo "$config linting..."
 | 
				
			||||||
    if !($verilator --lint-only "$@" --top-module wallypipelinedsoc "-I$basepath/config/shared" "-I$basepath/config/$config" $basepath/src/*/*.sv $basepath/src/*/*/*.sv --relative-includes ); then
 | 
					    if !($verilator --lint-only "$@" --top-module wallypipelinedsoc "-I$basepath/config/shared" "-I$basepath/config/$config" $basepath/src/*/*.sv $basepath/src/*/*/*.sv --relative-includes ); then
 | 
				
			||||||
 | 
				
			|||||||
@ -94,13 +94,13 @@ for test in tests32gc:
 | 
				
			|||||||
        grepstr="All tests ran without failures")
 | 
					        grepstr="All tests ran without failures")
 | 
				
			||||||
  configs.append(tc)
 | 
					  configs.append(tc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tests32icimperas = ["imperas32i", "imperas32c"] # unused
 | 
					tests32imcimperas = ["imperas32i", "imperas32c"] # unused
 | 
				
			||||||
tests32ic = ["arch32i", "arch32c", "wally32periph"] 
 | 
					tests32imc = ["arch32i", "arch32c", "arch32m", "wally32periph"] 
 | 
				
			||||||
for test in tests32ic:
 | 
					for test in tests32imc:
 | 
				
			||||||
  tc = TestCase(
 | 
					  tc = TestCase(
 | 
				
			||||||
        name=test,
 | 
					        name=test,
 | 
				
			||||||
        variant="rv32ic",
 | 
					        variant="rv32imc",
 | 
				
			||||||
        cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv32ic "+test+"\n!",
 | 
					        cmd="vsim > {} -c <<!\ndo wally-pipelined-batch.do rv32imc "+test+"\n!",
 | 
				
			||||||
        grepstr="All tests ran without failures")
 | 
					        grepstr="All tests ran without failures")
 | 
				
			||||||
  configs.append(tc)
 | 
					  configs.append(tc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@
 | 
				
			|||||||
# Takes 1:10 to run RV64IC tests using gui
 | 
					# Takes 1:10 to run RV64IC tests using gui
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Usage: do wally-pipelined-batch.do <config> <testcases>
 | 
					# Usage: do wally-pipelined-batch.do <config> <testcases>
 | 
				
			||||||
# Example: do wally-pipelined-batch.do rv32ic imperas-32i
 | 
					# Example: do wally-pipelined-batch.do rv32imc imperas-32i
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Use this wally-pipelined-batch.do file to run this example.
 | 
					# Use this wally-pipelined-batch.do file to run this example.
 | 
				
			||||||
# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
 | 
					# Either bring up ModelSim and type the following at the "ModelSim>" prompt:
 | 
				
			||||||
@ -37,7 +37,7 @@ if {$2 eq "ahb"} {
 | 
				
			|||||||
# because vsim will run vopt
 | 
					# because vsim will run vopt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# default to config/rv64ic, but allow this to be overridden at the command line.  For example:
 | 
					# default to config/rv64ic, but allow this to be overridden at the command line.  For example:
 | 
				
			||||||
# do wally-pipelined-batch.do ../config/rv32ic rv32ic
 | 
					# do wally-pipelined-batch.do ../config/rv32imc rv32imc
 | 
				
			||||||
if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
 | 
					if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
 | 
				
			||||||
    vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench-linux.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583
 | 
					    vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench-linux.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583
 | 
				
			||||||
    # start and run simulation
 | 
					    # start and run simulation
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,7 @@ def mask(command):
 | 
				
			|||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    techs = ['sky90', 'tsmc28']
 | 
					    techs = ['sky90', 'tsmc28']
 | 
				
			||||||
    allConfigs = ['rv32gc', 'rv32ic', 'rv64gc', 'rv64ic', 'rv32e', 'rv32i', 'rv64i']
 | 
					    allConfigs = ['rv32gc', 'rv32imc', 'rv64gc', 'rv64imc', 'rv32e', 'rv32i', 'rv64i']
 | 
				
			||||||
    freqVaryPct = [-20, -12, -8, -6, -4, -2, 0, 2, 4, 6, 8, 12, 20]
 | 
					    freqVaryPct = [-20, -12, -8, -6, -4, -2, 0, 2, 4, 6, 8, 12, 20]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pool = Pool()
 | 
					    pool = Pool()
 | 
				
			||||||
@ -25,7 +25,7 @@ if __name__ == '__main__':
 | 
				
			|||||||
    parser = argparse.ArgumentParser()
 | 
					    parser = argparse.ArgumentParser()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument("-s", "--freqsweep", type=int, help = "Synthesize wally with target frequencies at given MHz and +/- 2, 4, 6, 8 %%")
 | 
					    parser.add_argument("-s", "--freqsweep", type=int, help = "Synthesize wally with target frequencies at given MHz and +/- 2, 4, 6, 8 %%")
 | 
				
			||||||
    parser.add_argument("-c", "--configsweep", action='store_true', help = "Synthesize wally with configurations 32e, 32ic, 64ic, 32gc, and 64gc")
 | 
					    parser.add_argument("-c", "--configsweep", action='store_true', help = "Synthesize wally with configurations 32e, 32imc, 64ic, 32gc, and 64gc")
 | 
				
			||||||
    parser.add_argument("-f", "--featuresweep", action='store_true', help = "Synthesize wally with features turned off progressively to visualize critical path")
 | 
					    parser.add_argument("-f", "--featuresweep", action='store_true', help = "Synthesize wally with features turned off progressively to visualize critical path")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_argument("-v", "--version", choices=allConfigs, help = "Configuration of wally")
 | 
					    parser.add_argument("-v", "--version", choices=allConfigs, help = "Configuration of wally")
 | 
				
			||||||
@ -47,7 +47,7 @@ if __name__ == '__main__':
 | 
				
			|||||||
        for freq in [round(sc+sc*x/100) for x in freqVaryPct]: # rv32e freq sweep
 | 
					        for freq in [round(sc+sc*x/100) for x in freqVaryPct]: # rv32e freq sweep
 | 
				
			||||||
            runSynth(config, mod, tech, freq, maxopt)
 | 
					            runSynth(config, mod, tech, freq, maxopt)
 | 
				
			||||||
    if args.configsweep:
 | 
					    if args.configsweep:
 | 
				
			||||||
        for config in ['rv32i', 'rv64gc', 'rv64i', 'rv32gc', 'rv32ic', 'rv32e']: #configs
 | 
					        for config in ['rv32i', 'rv64gc', 'rv64i', 'rv32gc', 'rv32imc', 'rv32e']: #configs
 | 
				
			||||||
            runSynth(config, mod, tech, freq, maxopt)
 | 
					            runSynth(config, mod, tech, freq, maxopt)
 | 
				
			||||||
    if args.featuresweep:
 | 
					    if args.featuresweep:
 | 
				
			||||||
        config = args.version if args.version else 'rv64gc'
 | 
					        config = args.version if args.version else 'rv64gc'
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user