Merge branch 'ppa' into main

This commit is contained in:
kipmacsaigoren 2021-09-20 01:01:47 -05:00
commit 523d25ee7b
4 changed files with 28 additions and 10 deletions

3
.gitmodules vendored
View File

@ -0,0 +1,3 @@
[submodule "sky130/sky130_osu_sc_t12"]
path = sky130/sky130_osu_sc_t12
url = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc_t12/

View File

@ -81,8 +81,16 @@ module pmpadrdec (
assign NAMask[1:0] = {2'b11};
// *** BAD DELETE LATER ADDED for hopefully fixing synth
logic [`PA_BITS-3:0] maskInput;
assign maskInput = 'd39; // *** added to really just try anything with the inputs of the thermometer.
// *** maskinput used to be {~PMPAdr[`PA_BITS-4:0], (AdrMode == NAPOT)}
// ****
prioritythemometer #(`PA_BITS-2) namaskgen(
.a({PMPAdr[`PA_BITS-4:0], (AdrMode == NAPOT)}),
.a(maskInput), // *** confusing bit bussing to match the logic for the inside of the thermometer.
.y(NAMask[`PA_BITS-1:2]));
assign NAMatch = &((PhysicalAddress ~^ CurrentAdrFull) | NAMask);

View File

@ -40,13 +40,16 @@ module priorityonehot #(parameter ENTRIES = 8) (
logic [ENTRIES-1:0] nolower;
// generate thermometer code mask
genvar i;
generate
assign nolower[0] = 1'b1;
for (i=1; i<ENTRIES; i++) begin:therm
assign nolower[i] = nolower[i-1] & ~a[i-1];
end
endgenerate
prioritythemometer #(ENTRIES) maskgen(.a({a[ENTRIES-2:0], 1'b1}), .y(nolower));
// genvar i;
// generate
// assign nolower[0] = 1'b1;
// for (i=1; i<ENTRIES; i++) begin:therm
// assign nolower[i] = nolower[i-1] & ~a[i-1];
// end
// endgenerate
// *** replace mask generation logic ^^^ with priority thermometer
assign y = a & nolower;

View File

@ -37,16 +37,20 @@ module prioritythemometer #(parameter N = 8) (
output logic [N-1:0] y
);
// Carefully crafted so design compiler would synthesize into a fast tree structure
// Rather than linear.
// generate thermometer code mask
genvar i;
generate
assign y[0] = a[0];
for (i=1; i<N; i++) begin
assign y[i] = y[i-1] & a[i];
for (i=1; i<N; i++) begin:therm
assign y[i] = y[i-1] & ~a[i]; // *** made to be the same as onehot (without the inverter) to see if the probelme is something weird with synthesis
// assign y[i] = y[i-1] & a[i];
end
endgenerate
endmodule