Answered step by step
Verified Expert Solution
Question
1 Approved Answer
module TestBench ( ) ; reg clk _ enable, reset, preset _ 0 2 3 , CLK; wire [ 1 5 : 0 ] Rand
module TestBench;
reg clkenable, reset, preset CLK;
wire : Randout;
Main DUTRandout, CLK clkenable, reset, preset;
Lsfr DUT;
always begin
#
CLK ;
#
CLK ;
end
initial begin
clkenable ;
reset ;
preset;
#
$displayRandout b Randout;
#
$displayRandout b Randout;
$finish;
end
endmodulemodule MainRandout, CLK clkenable, reset, preset;
output : Randout;
input clkenable, reset, preset CLK;
wire andout, Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q xorout, xorout, xorout, Q ;
wire : Splittercmb;
assign andout clkenable & CLK;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, preset;
DflipFlop Q andout, Q reset, preset;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
DflipFlop Q andout, Q reset, ;
assign Splittercmb Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q ;
assign Randout Splittercmb;
assign xorout Q Q ;
assign xorout Q xorout;
assign xorout Q xorout;
DflipFlop Q andout, xorout, reset, preset;
endmodule
module Lsfr;
endmodule
module DflipFlopq qinv, clk d arst pre, en;
parameter WIDTH ;
output reg WIDTH: q qinv;
input clk arst pre, en;
input WIDTH: d;
always @ posedge clk or posedge arst
if arst begin
q b;
qinv b;
end else if en ;
else begin
q dYou will need to edit the design file so that the DD flipflop works the same as it does in
code to use the preset signal must be integrated into the reset if
statement
e Run a simulation to generate numbers
f Hand in your list of numbers in both binary and hexadecimal format.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started