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}; 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( 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])); .y(NAMask[`PA_BITS-1:2]));
assign NAMatch = &((PhysicalAddress ~^ CurrentAdrFull) | NAMask); assign NAMatch = &((PhysicalAddress ~^ CurrentAdrFull) | NAMask);

View File

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

View File

@ -37,16 +37,20 @@ module prioritythemometer #(parameter N = 8) (
output logic [N-1:0] y 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 // generate thermometer code mask
genvar i; genvar i;
generate generate
assign y[0] = a[0]; assign y[0] = a[0];
for (i=1; i<N; i++) begin for (i=1; i<N; i++) begin:therm
assign y[i] = y[i-1] & a[i]; 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 end
endgenerate endgenerate
endmodule endmodule