Question: Please convert the following Verilog code with testbench from 6 th order to 8 th order, and from 4 - bit word size to 8
Please convert the following Verilog code with testbench from th order to th order, and from bit word size to bit word size. Thank you!
module FIRpipeline FIRA FIRB FIRC Samplein clock, reset;
parameter FIRorder ;
parameter samplesize ; maximum sample value is
parameter weightsize ; maximum value may be
parameter wordsizeout ; log
output wordsizeout : FIRassign;
output wordsizeout : FIRA;
output wordsizeout : FIRB;
output wordsizeout : FIRC;
input samplesize : Samplein;
input clock, reset;
FIRpipelinenone UFIRA Samplein clock, reset;
FIRpipelinemultiplier UFIRB Samplein clock, reset;
FIRpipelineadders UFIRC samplein clock, reset;
endmodule
module FIRpipelinemultiplier FIRout, Samplein clock, reset;
parameter FIRorder ;
parameter samplesize ; maximum sample value is
parameter weightsize ; maximum value may be
parameter wordsizeout ; Togorder
parameter productsize samplesizeweightsize;
output reg wordsizeout : FIRout;
input samplesize : Samplein;
input clock, reset;
wire weightsize : coefficients : FIRorder;
Filter coefficients
parameter bd; assign coefficients b;
parameter bd; assign coefficients b;
parameter bd; assign coefficients b;
parameter bd; assign coefficients b;
parameter bd; assign coefficients b;
parameter bd; assign coefficients b;
parameter bd; assign coefficients b;
reg samplesize : SampleArray : FIRorder; th coefficient multiplied by Datain
integer k n;
reg productsize : PR : FIRorder; Array format
always @posedge clock
if reset begin
The input shift register
for k ; k FIRorder; k k to save on code lines
The pipeline register
for k ; k FIRorder; k k to save on code lines
PRk;
The output register
FIRout ;
end
else begin
The input shift register
SampleArray Samplein;
for k ; k FIRorder; k k
SampleArrayk SampleArrayk;
The Pipeline Register
PR coefficients Samplein;
for n ; n FIRorder; n n
PRn coefficients n SampleArrayn;
The output register
FIRout PR PR PR PR PR PR PR;
end
endmodule
module FIRpipelinetb ;
parameter FIRorder ;
parameter samplesize ;
parameter weightsize ;
parameter wordsizeout samplesize weightsize ;
parameter productsize samplesize weightsize;
wire wordsizeout : FIRA;
wire wordsizeout : FIRB;
wire wordsizeout : FIRC;
reg samplesize : Samplein;
reg clock, reset;
FIRpipeline UUT FIRA FIRB FIRC Samplein clock, reset;
wire productsize : PR; assign PRO UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
Probes to observe the pipleine register PR at the input of adder
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
Probes to observe the pipleine register PR at the input of adder
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
Probes to observe the pipleine register PR at the input of adder
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
wire productsize : PR; assign PR UUT.UPR;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
