Merge branch 'main' of github.com:davidharrishmc/riscv-wally into main

This commit is contained in:
Ross Thompson 2022-05-22 23:54:33 -05:00
commit b70baed214
4 changed files with 45 additions and 9 deletions

@ -1 +1 @@
Subproject commit be67c99bd461742aa1c100bcc0732657faae2230 Subproject commit 307c77b26e070ae85ffea665ad9b642b40e33c86

View File

@ -733,11 +733,47 @@ module ppa_flopenr_128 #(parameter WIDTH = 128) (
else if (en) q <= #1 d; else if (en) q <= #1 d;
endmodule endmodule
module csa #(parameter WIDTH=8) ( module ppa_csa_8 #(parameter WIDTH = 8) (
input logic [WIDTH-1:0] a, b, c, input logic [WIDTH-1:0] a, b, c,
output logic [WIDTH-1:0] sum, carry); output logic [WIDTH-1:0] sum, carry);
assign sum = a ^ b ^ c; assign sum = a ^ b ^ c;
assign carry = (a & (b | c)) | (b & c); assign carry = (a & (b | c)) | (b & c);
endmodule // csa endmodule
module ppa_csa_16 #(parameter WIDTH = 16) (
input logic [WIDTH-1:0] a, b, c,
output logic [WIDTH-1:0] sum, carry);
assign sum = a ^ b ^ c;
assign carry = (a & (b | c)) | (b & c);
endmodule
module ppa_csa_32 #(parameter WIDTH = 32) (
input logic [WIDTH-1:0] a, b, c,
output logic [WIDTH-1:0] sum, carry);
assign sum = a ^ b ^ c;
assign carry = (a & (b | c)) | (b & c);
endmodule
module ppa_csa_64 #(parameter WIDTH = 64) (
input logic [WIDTH-1:0] a, b, c,
output logic [WIDTH-1:0] sum, carry);
assign sum = a ^ b ^ c;
assign carry = (a & (b | c)) | (b & c);
endmodule
module ppa_csa_128 #(parameter WIDTH = 128) (
input logic [WIDTH-1:0] a, b, c,
output logic [WIDTH-1:0] sum, carry);
assign sum = a ^ b ^ c;
assign carry = (a & (b | c)) | (b & c);
endmodule

View File

@ -292,6 +292,6 @@ def plotPPA(mod, freq=None):
# writeCSV() # writeCSV()
# makeCoefTable() # makeCoefTable()
freqPlot('decoder', 8) freqPlot('flopr', 128)
plotPPA('decoder') # plotPPA('add')

View File

@ -44,13 +44,13 @@ def getData():
allSynths = getData() allSynths = getData()
arr = [-40, -20, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 14, 20, 40] arr = [-40, -20, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 14, 20, 40]
widths = [8] widths = [32, 64, 128]
modules = ['decoder'] modules = ['flopr']
tech = 'sky90' tech = 'sky90'
LoT = [] LoT = []
## initial sweep to get estimate of min delay # # # initial sweep to get estimate of min delay
# freqs = ['17200'] # freqs = ['7500']
# for module in modules: # for module in modules:
# for width in widths: # for width in widths:
# for freq in freqs: # for freq in freqs: