new priority onehot module for better area/time

This commit is contained in:
Madeleine Masser-Frye 2022-07-06 00:08:59 +00:00
parent 01e6d69a67
commit 846f12aa2e
3 changed files with 11 additions and 8 deletions

View File

@ -39,9 +39,11 @@ module priorityonehot #(parameter N = 8) (
input logic [N-1:0] a,
output logic [N-1:0] y
);
logic [N-1:0] nolower;
// create thermometer code mask
prioritythermometer #(N) maskgen(.a({a[N-2:0], 1'b0}), .y(nolower));
assign y = a & nolower;
genvar i;
assign y[0] = a[0];
for (i=1; i<N; i++) begin:poh
assign y[i] = a[i] & ~|a[i-1:0];
end
endmodule

View File

@ -5,8 +5,8 @@ NAME := synth
# defaults
export DESIGN ?= wallypipelinedcore
export FREQ ?= 3402
export CONFIG ?= rv32e
export FREQ ?= 3000
export CONFIG ?= rv32gc
# sky130 and sky90 presently supported
export TECH ?= tsmc28
# MAXCORES allows parallel compilation, which is faster but less CPU-efficient
@ -14,7 +14,7 @@ export TECH ?= tsmc28
export MAXCORES ?= 4
# MAXOPT turns on flattening, boundary optimization, and retiming
# The output netlist is hard to interpret, but significantly better PPA
export MAXOPT ?= 0
export MAXOPT ?= 1
export DRIVE ?= FLOP
time := $(shell date +%F-%H-%M)

View File

@ -102,7 +102,8 @@ set_critical_range [expr $my_period*0.05] $current_design
# Partitioning - flatten or hierarchically synthesize
if { $maxopt == 1 } {
ungroup -all -flatten -simple_names
ungroup -all -simple_names
# -flatten
}
# Set input pins except clock