Posts

Verilog: 2 - 4 Decoder Structural/Gate Level Modelling with Testbench

Image
Verilog Code for 2-4 Decoder Structural/Gate Level Modelling 2-4 Line Decoder module  decoder_2_to_4(      input  a0,      input  a1,      output  d0,      output  d1,      output  d2,      output  d3     );                 not (an0,a0),(an1,a1);                 and (d0,an0,an1),(d1,a0,an1),(d2,an0,a1),(d3,a0,a1); endmodule //Testbench code for 2-4 Decoder Structural/Gate Level Modelling initial  begin // Initialize Inputs a0 = 0;a1 = 0; // Wait 100 ns for global reset to finish #100; // Add stimulus here #100; a0=1;a1=0; #100; a0=0;a1=1; #100; a0=1;a1=1; end Output: Verilog 2-4 Decoder Response Other Verilog Programs: Go to Index of  Verilog Prog...

VLSI: 8-1 MUX Structural/Gate Level Modelling with Testbench

Image
Verilog Code for 8-1 MUX Structural/Gate Level Modelling 8-1 MUX module  mux_8to1(      input  a,      input  b,      input  c,      input  d0,      input  d1,      input  d2,      input  d3,      input  d4,      input  d5,      input  d6,      input  d7,      output  out,      wire an,bn,cn,t1,t2,t3,t4,t5,t6,t7,t8     ); not(an,a),(bn,b),(cn,c); and(t1,an,bn,cn,d0),(t2,an,bn,c,d1),(t3,an,b,cn,d2),(t4,an,b,c,d3),(t5,a,bn,cn,d4),(t6,a,bn,c,d5),(t7,a,b,cn,d6),(t8,a,b,c,d7); not(out,t1,t2,t3,t4,t5,t6,t7,t8); endmodule //Testbench code for 8-1 MUX Structural/Gate Level Modelling initial  begin         // Initialize I...

VLSI: 4-1 MUX Structural/Gate Level Modelling with Testbench

Image
Verilog Code for 4-1 MUX Structural/Gate Level Modelling 4-1 MUX module  m41(out, a, b, c, d, s0, s1); output  out; input  a, b, c, d, s0, s1; wire sobar, s1bar, T1, T2, T3, T4; not (s0bar, s0), (s1bar, s1); and (T1, a, s0bar, s1bar), (T2, b, s0bar, s1),(T3, c, s0, s1bar), (T4, d, s0, s1); or(out, T1, T2, T3, T4); endmodule //Testbench code for 4-1 MUX Structural/Gate Level Modelling initial  begin // Initialize Inputs a = 1;b = 0;c = 0;d = 0;s0 = 0;s1 = 0; // Wait 100 ns for global reset to finish #100; // Add stimulus here #100; s0=0;s1=1;a=0;b=1;c=0;d=0; #100; s0=1;s1=0;a=0;b=0;c=1;d=0; #100; s0=1;s1=1;a=0;b=0;c=0;d=1; end Output: Other Verilog Programs: Go to Index of  Verilog Programming

VLSI: 1 Bit Magnitude Comparator Structural/Gate Level Modelling with Testbench

Image
Verilog Code for 1 Bit Comparator Structural/Gate Level Modelling module  comparator_1_bit(      input  x,      input  y,      output  a,  //x>y      output  b,  //x=y      output  c   //x<y     ); not (xn,x),(yn,y); and (a,x,yn),(c,xn,y); nor (b,a,c); endmodule //Testbench code for 1 Bit Comparator Structural/Gate Level Modelling initial  begin // Initialize Inputs x = 0;y = 0; // Wait 100 ns for global reset to finish #100; // Add stimulus here #100; x=0;y=1; #100; x=1;y=0; #100; x=1;y=1; end Magnitude Comparator Output: Verilog 1 Bit Magnitude Comparator Response Other Verilog Programs: Go to Index of  Verilog Programming

Verilog: OR gate Structural/Gate Level Modelling with Testbench

Image
Verilog Code for OR gate Structural/Gate Level Modelling module ORgate(     input a,     input b,     output c     ); or(c,a,b); endmodule //Testbench code for OR gate Structural/Gate Level Modelling initial begin               // Initialize Inputs               a = 0;b = 0;               // Wait 100 ns for global reset to finish               #100 a = 0; b = 1;               #100 a = 1; b = 0;               #100 a = 1; b = 1; end Output: RTL Schemati...

Verilog: NOT gate Structural/Gate Level Modelling with Testbench

Image
Verilog Code for NOT gate Structural/Gate Level Modelling module NOTgate(     input a,     output c     ); not (c,a); endmodule //Testbench code for NOT gate Structural/Gate Level Modelling initial begin               // Initialize Inputs               a = 0;               // Wait 100 ns for global reset to finish               #100 a = 0;                #100 a = 1;  end Output: RTL Schematic: Not Gate Verilog

Verilog: XOR gate Structural/Gate Level Modelling with Testbench

Image
Verilog Code for XOR gate Structural/Gate Level Modelling module XORgate(     input a,     input b,     output c     ); xor (c,a,b); endmodule //Testbench code for XOR gate Structural/Gate Level Modelling initial begin               // Initialize Inputs               a = 0;b = 0;               // Wait 100 ns for global reset to finish               #100 a = 0; b = 1;               #100 a = 1; b = 0;               #100 a = 1; b = 1; end...

Popular posts from this blog

Samir Palnitkar Solution Manual Free Download PDF of Verilog HDL

VLSI: 4-1 MUX Dataflow Modelling with Testbench

VLSI: 8-3 Encoder Dataflow Modelling with Testbench

VLSI: 3-8 Decoder Dataflow Modelling with Testbench

Verilog: 4 to 1 Multiplexer Behavioral Modelling with Testbench Code