Question

(15 pts) Write VERIL60 eode to implement the FSM chat in the Figure below. The code begins as follows: Its module FSM1 (w, z, Reset, Clock) input w, Reset, Clock; output z; reg [1:0] State, NextState; 2b10; // С ul PW encd 2b00, B-2,b01, C k parameter [1:0] A

Resct nost state

0 0
Add a comment Improve this question Transcribed image text
Answer #1

input eu, vst, tw cut put 2) ous«A @ ( Posedye cit γ8t) segin ei8e Next state begin Case Stak) e1茨 戊자.stok éao; default reit

Add a comment
Know the answer?
Add Answer to:
(15 pts) Write VERIL60 eode to implement the FSM chat in the Figure below. The code...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given the following verilog code, draw the corresponding state diagram for it. module mysterious (input reset,...

    Given the following verilog code, draw the corresponding state diagram for it. module mysterious (input reset, clk, TB, TA, output reg [1:0] LB, LA); reg [1:0] cstate, nstate; parameter S0 = 2'b00; parameter S1 = 2'b01; parameter S2 = 2'b10; parameter S3 = 2'b11; parameter grn = 2'b00; parameter ylw = 2'b01; parameter rd = 2'b10; // state register always @ (posedge clk, posedge reset) begin if (reset) cstate <= S0; else cstate <= nstate; end // next state logic...

  • Modify the Moore FSM below to detect the sequence "110" , simulate using the same test...

    Modify the Moore FSM below to detect the sequence "110" , simulate using the same test bench and create a Moore Transition Diagram for the new sequence 110. module moore_seq (    input clock, reset, x,    output reg z ); //assign binary encoded codes to the states A through D parameter    A = 2'b00,    B = 2'b01,    C = 2'b10,    D = 2'b11; reg [1 : 0] current_state, next_state; //Section 1: Next state generator (NSG)...

  • How do I create a testbench with the verilog code below? module ganada(Clk, U1, D2, U2,...

    How do I create a testbench with the verilog code below? module ganada(Clk, U1, D2, U2, D3, U3, D4, F1, F2, F3, F4, CF, S); input Clk, U1, D2, U2, D3, U3, D4, F1, F2, F3, F4; output [6:0] CF, S; reg [6:0] CF, S; reg [1:0] SS, B, NS; initial begin NS=2'b00; SS=2'b00; end always@(posedge Clk) begin    case(NS)    2'b00: CF=7'b1111001; 2'b01: CF=7'b0100100; 2'b10: CF=7'b0110000; 2'b11: CF=7'b0011001; endcase case(SUD) 2'b00: S=7'b1000000;    2'b01: S=7'b1111001; 2'b10: S=7'b0100100; default: S=7'b0000000; endcase if(U1==1 ||...

  • I need help writing a test bench for the following Verilog code module CU(IE, WE, WA,...

    I need help writing a test bench for the following Verilog code module CU(IE, WE, WA, RAE, RAA, RBE, RBA, ALU,                SH, OE, start, clk, reset, Ng5); //nG5 denotes (N>5);    input start, clk, reset;    output IE, WE, RAE, RBE, OE;    output [1:0] WA, RAA, RBA, SH;    output [2:0] ALU;       input wire Ng5;    reg [1:0] state;    reg [1:0] nextstate;    parameter S0 = 3'b000;    parameter S1 = 3'b001;...

  • Write Java code to implement a FSM machine that recognizes the language for the alphabet {a,b,c} ...

    Write Java code to implement a FSM machine that recognizes the language for the alphabet {a,b,c} consisting of all strings that contain two consecutive c's and end with b.                   Your FSM program should include the following three static methods (Java) or functions (C):                                           a.    int nextState(int state, char symbol)                                  A state-transition function that returns the next state based on the                                  current state and an input symbol. This function should also return                                  -1 when an invalid input character is detected.                                  State...

  • module Lab5(Clock, Ex, Reset, W, S, L, Q); //Inputs input Clock, Ex, Reset; input [1:0] W;...

    module Lab5(Clock, Ex, Reset, W, S, L, Q); //Inputs input Clock, Ex, Reset; input [1:0] W; input [2:0] S; input [3:0] L; //Outputs output reg [3:0] Q; // Inputs for FSM = Clock, Ex, Reset, W           Outputs = S, L FSM U0 (.Clock(Clock), .Ex(Ex), .Reset(Reset), .W(W), .S(S), .L(L)); // Inputs for BUSR = Clock, Reset, L, S                       Outputs = Q Behavioral_Universal_Shift_Register U1 (.Clock(Clock), .Reset(Reset), .L(L), .S(S), .Q(Q)); endmodule How do you use the...

  • Write assembly or C software to implement the following Mealy FSM (Figure 2.42). Include the FSM state machine, port ini...

    Write assembly or C software to implement the following Mealy FSM (Figure 2.42). Include the FSM state machine, port initialization, timer initialization, and the FSM controller. The command sequence will be input, output, wait 10 ms, input, then branch to next state. The 1-bit input is on Port P (PP0), and the 3-bit output is on Port P (PP3, PP2, PP1). Assume the E clock is 8 MHz. Microcontroller MC9S12 0/4 Happy Hungry 1/2 1/5 1/3 06 Sleepy Figure 2.42...

  • please answer question 4 (all parts of question4 please) will rate! 3. (30 pts) Design a 2-bit Gray code generator that ropetitively delivers the sequence 00301911-10-00when the input signal UP-...

    please answer question 4 (all parts of question4 please) will rate! 3. (30 pts) Design a 2-bit Gray code generator that ropetitively delivers the sequence 00301911-10-00when the input signal UP- 1,or in reverse order 009 10기け01 →00→ when UP-0. Your design should include an asynchronous low. active reset operation: the FSM goes to 00 state when a reset signal is applied In addition to the state output z[1). 2[0]. there is a carry/borrow output bit e which is I when...

  • 3. Answer the question below for the following code. module Shift_Register8 (Q, Data_in, Clk, Load, Shift_left,...

    3. Answer the question below for the following code. module Shift_Register8 (Q, Data_in, Clk, Load, Shift_left, Shift_right); output [ 7:0] Q; reg [7:0] Q; input [7:0] Data_in; input Clk, Load, Shift_left, Shift_right; always @ (posedge Clk) if (Load) Q<= Data_in; else case ( { Shift_left, Shift_right }) 2'600: if (Clk == 1) Q<=Q; 2'b01: if (Clk == 1) Q<= >> 1; 2'b10: if (Clk == 1) Q<=Q<< 1; default: Q<=Q; endcase endmodule a) What does reg (7:0] Q do? b)...

  • WRITE THE CODE IN VERILOG: Instead of using Registers, USE D FLIP FLOPS and a clock....

    WRITE THE CODE IN VERILOG: Instead of using Registers, USE D FLIP FLOPS and a clock. Include the logic for a reset A sequential circuit with three D flip-flops A, B, and C, a trigger x, and an output z1, and zo. On this state machine diagram, the label of the states are in the order of (ABC), the transition is the one bit x, and the output is under the forward slash. x/z1zo. The start state is 001 0/01...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT