From 023ba680882a66de86301af5a4d88fe4fdcbd4f7 Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 20 Feb 2023 10:16:45 -0800 Subject: [PATCH 1/5] Extraction script updates to match new reports names --- config/shared/wally-shared.vh | 2 +- src/lsu/lsu.sv | 6 ++++-- synthDC/extractArea.pl | 4 ++-- synthDC/extractSummary.py | 6 +++++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/config/shared/wally-shared.vh b/config/shared/wally-shared.vh index 507388f7..3da14abd 100644 --- a/config/shared/wally-shared.vh +++ b/config/shared/wally-shared.vh @@ -117,7 +117,7 @@ // largest length in IEU/FPU `define CVTLEN ((`NF<`XLEN) ? (`XLEN) : (`NF)) -`define LLEN ((`FLEN<`XLEN) ? (`XLEN) : (`FLEN)) +`define LLEN (($unsigned(`FLEN)<$unsigned(`XLEN)) ? ($unsigned(`XLEN)) : ($unsigned(`FLEN))) `define LOGCVTLEN $unsigned($clog2(`CVTLEN+1)) `define NORMSHIFTSZ (((`CVTLEN+`NF+1)>(`DIVb + 1 +`NF+1) & (`CVTLEN+`NF+1)>(3*`NF+6)) ? (`CVTLEN+`NF+1) : ((`DIVb + 1 +`NF+1) > (3*`NF+6) ? (`DIVb + 1 +`NF+1) : (3*`NF+6))) `define LOGNORMSHIFTSZ ($clog2(`NORMSHIFTSZ)) diff --git a/src/lsu/lsu.sv b/src/lsu/lsu.sv index e01de312..04069108 100644 --- a/src/lsu/lsu.sv +++ b/src/lsu/lsu.sv @@ -357,8 +357,10 @@ module lsu ( ///////////////////////////////////////////////////////////////////////////////////////////// if (`BIGENDIAN_SUPPORTED) begin:endian - endianswap #(`LLEN) storeswap(.BigEndianM, .a(LittleEndianWriteDataM), .y(LSUWriteDataM)); - endianswap #(`LLEN) loadswap(.BigEndianM, .a(ReadDataWordMuxM), .y(LittleEndianReadDataWordM)); +// endianswap #(`LLEN) storeswap(.BigEndianM, .a(LittleEndianWriteDataM), .y(LSUWriteDataM)); +// endianswap #(`LLEN) loadswap(.BigEndianM, .a(ReadDataWordMuxM), .y(LittleEndianReadDataWordM)); + endianswap #(64) storeswap(.BigEndianM, .a(LittleEndianWriteDataM), .y(LSUWriteDataM)); + endianswap #(64) loadswap(.BigEndianM, .a(ReadDataWordMuxM), .y(LittleEndianReadDataWordM)); end else begin assign LSUWriteDataM = LittleEndianWriteDataM; assign LittleEndianReadDataWordM = ReadDataWordMuxM; diff --git a/synthDC/extractArea.pl b/synthDC/extractArea.pl index d16c74df..a2a89d7d 100755 --- a/synthDC/extractArea.pl +++ b/synthDC/extractArea.pl @@ -51,7 +51,7 @@ opendir(DIR, $dir) or die "Could not open $dir"; while (my $filename = readdir(DIR)) { if ($filename =~ /orig_tsmc28psyn/) { -# print "$filename\n"; +# if ($filename =~ /orig_sky90/) { &processRun("$dir/$filename"); } } @@ -82,7 +82,7 @@ foreach my $kw (@keywordsp) { sub processRun { my $fname = shift; - my $ffname = "$fname/reports/wallypipelinedcore_area.rep"; + my $ffname = "$fname/reports/area.rep"; open(FILE, "$ffname") or die ("Could not read $ffname"); # Extract configuration from fname; diff --git a/synthDC/extractSummary.py b/synthDC/extractSummary.py index 94902f9c..65b7d184 100755 --- a/synthDC/extractSummary.py +++ b/synthDC/extractSummary.py @@ -141,7 +141,7 @@ def areaDelay(tech, delays, areas, labels, fig, ax, norm=False): if norm: delays = [d/fo4 for d in delays] areas = [a/add32area for a in areas] - + plt.scatter(delays, areas, marker=marker, color=color) plt.xlabel('Cycle time (ns)') plt.ylabel('Area (sq microns)') @@ -165,6 +165,9 @@ def plotFeatures(tech, width, config): areas += [oneSynth.area] labels += [oneSynth.mod] + if (delays == []): + print("No delays found for freq ", freq, ". Did you set --skyfreq and --tsmcfreq?\n") + fig, (ax) = plt.subplots(1, 1) fig = areaDelay(tech, delays, areas, labels, fig, ax) @@ -185,6 +188,7 @@ def plotConfigs(tech, mod=''): fig, (ax) = plt.subplots(1, 1) + fig = areaDelay(tech, delays, areas, labels, fig, ax) titleStr = tech+'_'+mod From 00daa8aca01acba051e78072fb96ba30b5f0b61e Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 20 Feb 2023 10:37:10 -0800 Subject: [PATCH 2/5] Turned off SSTC_SUPPORTED in buildroot and fpga --- config/buildroot/wally-config.vh | 2 +- config/fpga/wally-config.vh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/buildroot/wally-config.vh b/config/buildroot/wally-config.vh index a42587d9..f8fdb61d 100644 --- a/config/buildroot/wally-config.vh +++ b/config/buildroot/wally-config.vh @@ -42,7 +42,7 @@ `define ZICOUNTERS_SUPPORTED 1 `define COUNTERS 32 `define ZFH_SUPPORTED 0 -`define SSTC_SUPPORTED 1 +`define SSTC_SUPPORTED 0 // LSU microarchitectural Features `define BUS_SUPPORTED 1 diff --git a/config/fpga/wally-config.vh b/config/fpga/wally-config.vh index 6f52e3e9..ec3b268b 100644 --- a/config/fpga/wally-config.vh +++ b/config/fpga/wally-config.vh @@ -43,7 +43,7 @@ `define ZICOUNTERS_SUPPORTED 1 `define ZFH_SUPPORTED 0 `define COUNTERS 32 -`define SSTC_SUPPORTED 1 +`define SSTC_SUPPORTED 0 // LSU microarchitectural Features `define BUS_SUPPORTED 1 From 535c7e156f698fc20e9b193f13f489e26fd678fa Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 20 Feb 2023 11:04:33 -0800 Subject: [PATCH 3/5] touched extractArea to test commit issue --- synthDC/extractArea.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthDC/extractArea.pl b/synthDC/extractArea.pl index a2a89d7d..09c64d9d 100755 --- a/synthDC/extractArea.pl +++ b/synthDC/extractArea.pl @@ -50,7 +50,7 @@ my @configs = ("rv32e", "rv32i", "rv32imc", "rv32gc", "rv64i", "rv64gc"); opendir(DIR, $dir) or die "Could not open $dir"; while (my $filename = readdir(DIR)) { - if ($filename =~ /orig_tsmc28psyn/) { + if ($filename =~ /orig_tsmc28psyn/) { # if ($filename =~ /orig_sky90/) { &processRun("$dir/$filename"); } From fc87425f670f9f95e77706b51d2cdce364fe1abc Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 20 Feb 2023 11:18:31 -0800 Subject: [PATCH 4/5] touched extractArea.pl --- synthDC/extractArea.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthDC/extractArea.pl b/synthDC/extractArea.pl index 09c64d9d..50cecbf9 100755 --- a/synthDC/extractArea.pl +++ b/synthDC/extractArea.pl @@ -57,7 +57,7 @@ while (my $filename = readdir(DIR)) { } closedir(DIR); -# print table of results +# print table of results printf("%20s\t", ""); foreach my $config (@configs) { printf("%s\t", $config); From bdcd867c118b6634fd5479314f6af96925f5e5b1 Mon Sep 17 00:00:00 2001 From: David Harris Date: Mon, 20 Feb 2023 12:42:46 -0800 Subject: [PATCH 5/5] Removed test code that broke LSU --- src/lsu/lsu.sv | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lsu/lsu.sv b/src/lsu/lsu.sv index 04069108..e01de312 100644 --- a/src/lsu/lsu.sv +++ b/src/lsu/lsu.sv @@ -357,10 +357,8 @@ module lsu ( ///////////////////////////////////////////////////////////////////////////////////////////// if (`BIGENDIAN_SUPPORTED) begin:endian -// endianswap #(`LLEN) storeswap(.BigEndianM, .a(LittleEndianWriteDataM), .y(LSUWriteDataM)); -// endianswap #(`LLEN) loadswap(.BigEndianM, .a(ReadDataWordMuxM), .y(LittleEndianReadDataWordM)); - endianswap #(64) storeswap(.BigEndianM, .a(LittleEndianWriteDataM), .y(LSUWriteDataM)); - endianswap #(64) loadswap(.BigEndianM, .a(ReadDataWordMuxM), .y(LittleEndianReadDataWordM)); + endianswap #(`LLEN) storeswap(.BigEndianM, .a(LittleEndianWriteDataM), .y(LSUWriteDataM)); + endianswap #(`LLEN) loadswap(.BigEndianM, .a(ReadDataWordMuxM), .y(LittleEndianReadDataWordM)); end else begin assign LSUWriteDataM = LittleEndianWriteDataM; assign LittleEndianReadDataWordM = ReadDataWordMuxM;