From 6ec97df9de457d294299fbb595ea3fa399d74fdb Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 15 Jul 2017 22:43:04 +0200 Subject: Schematic fixed up so far --- hw/chibi/chibi_2024/rcalc.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'hw/chibi/chibi_2024/rcalc.py') diff --git a/hw/chibi/chibi_2024/rcalc.py b/hw/chibi/chibi_2024/rcalc.py index 3bba342..2c5473d 100644 --- a/hw/chibi/chibi_2024/rcalc.py +++ b/hw/chibi/chibi_2024/rcalc.py @@ -125,3 +125,33 @@ for i in range(stages-2, -1, -1): print_var('Itot_{}'.format(stages-i), Itot_n, 'A', end='\t') print_var('Ptot_{}'.format(stages-i), Ptot_n, 'W') +l = [ (1, [1/2, 1/4, 1/8, 1/16, + 1/32, 1/64, 1/128, 1/256, + 1/512, 1/1024, 1/2048, 1/4096]), + (1/16, [1/2, 1/4, 1/8, 1/16, + 1/32, 1/64, 1/128, 1/256, + 1/512, 1/1024, 1/2048, 1/4096]), + (1/256, [1/2, 1/4, 1/8, 1/16, + 1/32, 1/64, 1/128, 1/256, + 1/512, 1/1024, 1/2048, 1/4096]) + ] +for v, ls in l: + for e in ls: + print('{:> 12.10f} {:.0f}'.format(e*v, 0.5/(e*v))) + +print('\033[93m---\033[0m') +l = [ (1/2**0, [1/2, 1/4, 1/8, 1/16, + 1/32, 1/64, 1/128, 1/256, + 1/512, 1/1024, 1/2048, 1/4096]), + (1/2**7, [1/32, 1/64, 1/128, 1/256, + 1/512, 1/1024, 1/2048, 1/4096]), + (1/2**14, [1/32, 1/64, 1/128, 1/256, + 1/512, 1/1024, 1/2048, 1/4096]) + ] +for v, ls in l: + for e in ls: + print('{:> 5.0f} {:> 12.10f} {:.0f}'.format(0.5/e, e*v, 0.5/(e*v))) +plain = sum(l[0][1]) +optimized = sum([e for v, ls in l for e in ls]) +overhead_percent = (optimized/plain-1)*100 +print(plain, optimized, overhead_percent) -- cgit