You can (1) start from a copy of an existing project folder from EE271 or CSE369 or (2) watch the following video on how to .
The use of these are optional, depending on your preferred workflow. Versions of these should have been provided in EE271 and CSE369.
For .sv files, you may want to right-click and save/download instead of clicking.
A sequential circuit has two inputs, x and y, and one output, S. It consists of a full-adder circuit connected to a D flip-flop, as shown in the following diagram.
The state diagram shown describes a Mealy finite state machine.
This SystemVerilog code describes a finite state machine.
module fsm (clk, reset, a, b, y);
input logic clk, reset, a, b;
output logic y;
enum logic [1:0] {S0, S1, S2, S3} state, nextstate;
always_ff @(posedge clk, posedge reset)
if (reset) state <= S0;
else state <= nextstate;
always_comb
case (state)
S0: if (a ^ b) nextstate = S1;
else nextstate = S0;
S1: if (a & b) nextstate = S2;
else nextstate = S0;
S2: if (a | b) nextstate = S3;
else nextstate = S0;
S3: if (a | b) nextstate = S3;
else nextstate = S0;
endcase
assign y = (state == S1) | (state == S2);
endmodule // fsm
Consider the functionality of the following two SystemVerilog modules.
module circuit1 (clk, a, b, c, y);
input logic clk, a, b, c;
output logic y;
logic x;
always_ff @(posedge clk) begin
x <= a & b;
y <= x | c;
end // always_ff
endmodule // circuit1
module circuit2 (clk, a, b, c, y);
input logic clk, a, b, c;
output logic y;
logic x;
always_ff @(posedge clk) begin
y <= x | c;
x <= a & b;
end // always_ff
endmodule // circuit2
Due by the end of the deadline day, submit your solutions (e.g., text, diagrams, screenshots, work) as a single PDF file ending in .pdf (all lowercase) to .