Question: Problem 2 : Appearing below are three variations on a module that will set its output to either the input value, or a maximum value

Problem 2: Appearing below are three variations on a module that will set its output to either
the input value, or a maximum value if the input is larger. The module will always be instantiated
with wl wn. All of them are functionally equivalent, but were synthesized to different costs (by
Genus 23.12-s086.1 when similar code was used in the solution to Homework 3). Because they are
functionally equivalent a perfect synthesis program would synthesize each to the same hardware
(with equal costs).
a. Show the optimized hardware for the low-cost version(s)
b. Find the simple-model cost of each after optimization. The costs should be in terms of wn and wl.
c. Find the simple-model delay of each after optimization. The delays should be in terms of wn and wl.
module clamp_plan_a
#( int wl =3, wn =4)( output uwire [wl-1:0] x, input uwire [wn-1:0] a );
localparam logic [wl-1:0] nl_max = ~(wl)'(0); // Sequence of wl 1s.
assign x = a = nl_max ? a : nl_max;
endmodule
module clamp_plan_b
#( int wl =3, wn =4)( output uwire [wl-1:0] x, input uwire [wn-1:0] a );
localparam logic [wl-1:0] nl_max = ~(wl)'(0); // Sequence of wl 1s.
assign x = a nl_max ? a : nl_max;
endmodule
module clamp_plan_c
#( int wl =3, wn =4)( output uwire [wl-1:0] x, input uwire [wn-1:0] a );
localparam logic [wl-1:0] nl_max = ~(wl)'(0); // Sequence of wl 1s.
assign x =!a[wn-1:wl]? a : nl_max;
endmodule
Problem 2 : Appearing below are three variations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!