
MODIFY THIS VERILOG CODE. THE OUTPUT OF THE QA,QB & QC (that will be seen on gtkwave) SHOULD BE:
qa qb qc
0 1 0
0 1 1
0 1 1
1 0 0
1 0 0
0 0 1
1 0 1
1 0 1
0 0 1
module finals_nake(in, clk, qa, qb, qc);
input in, clk;
output qa, qb, qc;
wire ja, jb, jc, ka, kb, kc;
// Negated inputs
wire in_n, clk_n;
assign in_n = ~in;
assign clk_n = ~clk;
// JK equations based on provided equations
assign ja = (qb & ~qc & ~in) | (qb & qc & in);
assign ka = clk & clk;
assign jb = (~qa & ~qc & ~in) | (~qa & qc & in);
assign kb = qa | (~qc & ~in) | (qc & in);
assign jc = (~qc & ~in) | (~qc & in);
assign kc = clk & clk;
//jka
wire jka1, jka2, jka3, jka4;
assign jka1 = ~(jka4 & ja);
assign jka2 = ~(jka3 & ka);
assign jka3 = ~(jka1 & jka4);
assign jka4 = ~(jka2 & jka3);
assign qa = jka3;
//jkb
wire jkb1, jkb2, jkb3, jkb4;
assign jkb1 = ~(jkb4 & jb);
assign jkb2 = ~(jkb3 & kb);
assign jkb3 = ~(jkb1 & jkb4);
assign jkb4 = ~(jkb2 & jkb3);
assign qb = jkb3;
//jkc
wire jkc1, jkc2, jkc3, jkc4;
assign jkc1 = ~(jkc4 & jc);
assign jkc2 = ~(jkc3 & kc);
assign jkc3 = ~(jkc1 & jkc4);
assign jkc4 = ~(jkc2 & jkc3);
assign qc = jkc3;
endmodule
module finals_nake_tb();
reg in, clk;
wire qa, qb, qc;
finals_nake finals_nake_ins(in, clk, qa, qb, qc);
initial
begin
in = 0; clk = 0;
#10 in = 0; clk = 1;
#10 in = 0; clk = 0;
#10 in = 0; clk = 1;
#10 in = 0; clk = 0;
#10 in = 0; clk = 1;
#10 in = 0; clk = 0;
#10 in = 0; clk = 1;
#10 in = 0; clk = 0;
#10 in = 0; clk = 1;
#10 in = 0; clk = 0;
#10 in = 1; clk = 1;
#10 in = 1; clk = 0;
#10 in = 1; clk = 1;
#10 in = 1; clk = 0;
#10 in = 1; clk = 1;
#10 in = 1; clk = 0;
#10 in = 1; clk = 1;
#10 in = 1; clk = 0;
#10 in = 1; clk = 1;
#10 in = 1; clk = 0;
#10 in = 1; clk = 1;
#10 in = 0; clk = 0;
end
initial
begin
$dumpfile("finals_nake_ins.vcd");
$dumpvars();
$finish;
end
endmodule

Step by stepSolved in 4 steps with 4 images

- Implement the following Booleanfunction with an 4x1multiplexer.F(A,B,C) = ∑(1,2,6,7)arrow_forwardplease display circuit for in logisim S2,S1,S0= 000 S2,S1,S0= 001 S2,S1,S0= 010 S2,S1,S0= 011 S2,S1,S0= 100 S2,S1,S0= 101 S2,S1,S0= 110 S2,S1,S0= 111arrow_forwardNAND2TETRIS HARDWARE SIMULATOR HiLoMux - This has one 8-bit input bus, in, and one 4-bit output bus, out. Alsopresent is a sel input, which is used to select what appears on out. Ifsel is false, then out should contain the lower 4-bits of in (i.e. in[0],in[1], in[2], in[3]). If sel is true, then out should contain theupper 4-bits of in (i.e. in[4] mapped to out[0], in[5], mapped toout[1], etc.). In other words, the HiLoMux can be used to select anibble from a byte please use the skeleton program below CHIP HiLoMux{ IN in[8], sel; OUT out[4]; PARTS: }arrow_forward
- Select the logic to implement a loop using the LOOPNZ instruction. ECX = ECX – 1 if ECX > 0 and ZF=0 , jump to destination O ECX = ECX + 1 if ECX > 0 and ZF=1, jump to destination EDX = EDX - 1 if EDX < 0 or ZF=0 , jump to destinationarrow_forwardSimplify the following function with a map, then implement it with a two-level NAND circuit. ?(?, ?, ?, ?) = ??′?′ + ?′? + ??? + ??′? + ?′?′?′arrow_forwardWrite the AHDL code to implement acomparator such that the output z is LOW only whenthe input digital_value is between 6 and 11(inclusive).arrow_forward
- Answer me number 7 please don't use ChatGPT it didn't gave me the right answer thank you please hand writtenarrow_forwardCreate a Test Bench file for the following VHDL code: library IEEE;use IEEE.STD_LOGIC_1164.ALL; entity shiftregister is Port ( R : in STD_LOGIC_VECTOR(5 downto 0); L, w, Reset : in STD_LOGIC; Q : out STD_LOGIC_VECTOR(5 downto 0));end shiftregister; architecture Behavior of shiftregister issignal Sreg : STD_LOGIC_VECTOR(5 downto 0);beginif reset='1' thenSreg <= "000000";elsif clk'event and clk='1' thenif L='1' thenSreg <= R;elseSreg(0) <= Sreg(1);Sreg(1) <= Sreg(2);Sreg(2) <= Sreg(3);Sreg(3) <= Sreg(4);Sreg(4) <= Sreg(5);Sreg(5) <= w;end if;end if;Q <= Sreg;end process;end Behavior;arrow_forward#ammend this code for the inputs (x = 5.01, 4.99, 0, -2.01, -1.99) so that there is a tolerance/Leeway for the values off > #such that 4.99 prints blue and -2.01 prints orange. # cannot adjust the value to x > 4.99 instead of 5 must add new code to add a tolerance or Leeway if x > 5: print ("blue") elif x < -2: print ("orange") else: print("purple")arrow_forward
- Show the dynamics of the operandStack (i.e show a picture of the operandStack after every push operation or a pop operation) if the following algorithm is used to evaluate the postfix expression:64 2 3 ** / 10 5 * + 6 9 * -arrow_forwardBased on the Tinkercad circuit accessible from the link below, complete the following activities:https://www.tinkercad.com/things/c1qtxCkOuBW Code is, // C++ code// const byte LED_PIN = 13;const byte METER_PIN = A4; void setup(){ pinMode(LED_PIN, OUTPUT); pinMode(METER_PIN, INPUT); Serial.begin(9600); startTimer();} void loop(){ } void startTimer(){ noInterrupts(); interrupts();} ISR(TIMER1_COMPA_vect){ digitalWrite(LED_PIN, digitalRead(LED_PIN) ^ 1);} 1. Complete the code in a way that LED blinks every 2 seconds.2. Change the startTimer method to accept a double value called timerFrequency, which representsthe frequency of the timer. Change the startTimer function so that it uses the value of this parameterto calculate and set the correct values for the OCRx and TCCRx registers.3. Use the potentiometer sensor connect to pin A4 to enable users to configure the timer frequency. Plsease share the final code only.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





