Posts

Program in HDL to generate nth Fibonacci number Where n is the input?

Image
`timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: Weekendvlsi.blogspot.com // Engineer: Weekendvlsi //  // Create Date: 27-11-2021 // Design Name:  // Module Name:  // Project Name: Printing nth Fibonacci // Target Devices:  // Tool Versions:  // Description:  //  // Dependencies:  //  // Revision: // Revision 0.01 - File Created // Additional Comments: //  ////////////////////////////////////////////////////////////////////////////////// module nth_fibonacci_num( input clk,  input rst,   input [7:0] nth_fibonacci_req, output [19:0] nth_fibonacci_value     ) ;  reg [19:0] previous_value, present_value;     reg [7:0] ctr;     reg output_valid;  assign nth_fibonacci_value = present_value ; always @( posedge clk) begin         if (rst) begin             previous_value...

Prime Number Detection

Image
  Prime Number Detection: `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: Weekendvlsi.blogspot.com // Engineer: Weekendvlsi // Create Date: 27-11-2021 // Design Name: Prime Number Detection // Module Name: prime_number // Project Name:  // Target Devices:  // Tool Versions:  // Description:  // Dependencies:  // Revision: // Revision 0.01 - File Created // Additional Comments: //  ////////////////////////////////////////////////////////////////////////////////// module prime_number ( input clk,  reset) ;   parameter N =50;          // size of array   reg [31:0] dump[0:N-1]; // memory array for product          integer i=0 ;                  integer result_done =1;        integer count =0;        always @(posedge clk )   ...

RTL Design Interview Questions

  Explain the difference between synchronous and asynchronous FIFO designs and their uses. Can you design a parameterized 2:1 multiplexer? Explain the difference between these three versions of Verilog case statement: cases, casez and case-inside. Also, when do you use these as an RTL engineer? What do you do at the RTL level to meet timing in synthesis? Provide an example. What's the difference between SRAM and DRAM? Difference between Latch and Flipflop? What are two ways of converting a two-input NAND gate to an inverter? write a code for edge detector ? Can you tell me about the engineering design process? Explain how to quickly identify whether a number is a power of 2. What's a unary operator? Setup time and Hold Time ? Design NAND Gate Using 2:1 Mux? Design Flipflop using Latch? Difference between Blocking and Non Blocking Statements ? Explain Parallel and Sequence Statements? Explain ASIC and FPGA Difference ? What is Meta Stability? Design XOR from NAND gates?  Design...

Number of one's Detection in Input - Verilog Implementation

Image
  Number of one's Detection: `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: Weekendvlsi.blogspot.com // Engineer: Weekendvlsi // Create Date: 20-11-2021 // Design Name: Number of one's Detection // Module Name: num_ones  ////////////////////////////////////////////////////////////////////////////////// module num_ones(     input [15:0] In,     output reg [5:0] ones_detect     ); integer i; always@(In) begin      ones_detect= 0;       for(i=0;i<16;i=i+1)    begin          if(In[i] == 1'b1)             ones_detect = ones_detect + 1;     end end endmodule TEST BENCH: module tb;   reg  [15:0] In;   wire  [5:0] ones_detect;    num_ones dut ( In,ones_detect);    initial begin           In...

Weekend VLSI HOME

    Weekend VLSI   About Us :  Struggling a lot to enter into the VLSI Industry? We too went through this phase, Trust us and do work hard. If we can get into Industry, YOU TOO CAN . To help you, we come up with this blog. It's in initial phase, We'll keep gathering information and place it in front of you in Simple terms. Also give use some feedbacks or the topics you are interested and want to know further, We'll post on that as well.  VLSI COMPANIES LIST RTL CODING GUIDE LINES RTL coding Guide Lines DIGTIAL ELECTRONICS QUESTIONS   Digital Electronics Questions   RTL DESIGN QUESTIONS RTL Design Questions RTL CODING EXAMPLES Vending Machine With Display options Different ways to Design ROM   6 bit Full adder Using 3 bit Full adder   3 bit Subtractor  Post Divider 4x4 Booth Multiplier 101101 Sequence Detector Falling Edge Detector Rising Edge Detector FIFO Number of one's Detection In Input Prime Number Fibonacci Number 8x8 Vedic M...

RTL Guide Lines

Guideline 1 : Need to state all the conditions else un-intentional latches will come up. Example : case (x,y) 00,01: z=1; 10: z=0 ; //11 case will infer a latch which isn't required endcase Guideline 2 : Perfect synchronization should be maintained for the external world signals coming into the chip. Guideline 3 : Have a good knowledge on CDC and double check the signals going through multiple clock domains. Guideline 4 : Don't mix up Blocking and Non Blocking statements in an always block. Always know the differences netween blocking and non blocking assignments. Guideline 5 : It is always suggested to seperate combinational and sequential logic. Guideline 6 : Have an idea of where to use reg and where to use wire. Guideline 7 : To design a synthesizable logic, know the synthesizable keywords and use it properly. Guideline 8 : The sensitivity list of a combinational always block must include all the inputs used in that block. If you forget some signals from the sensitiv...

Digital Electronics Questions For VLSI Interview

Digital Electronics Questions For VLSI Interview   Which gates are called universal gates? Why? Define: (a) bit (b) nibble (c) byte (d) word What is weighted code? Give example.  Give an example for Non-weighted code .  What is the key feature of Excess-3 code? What is the condition for a weighted code to be self-complementary? Convert the binary number 011101010001 to octal and hexadecimal?How many number of 2 input AND gates are required to generate N I/P AND gate? State De-Morgan’s Laws? If it is given that A & B will not be 1 at the same time, what will be theequivalent logical gate for an XOR gate?  If any of the inputs of an XOR gate are inverted, XOR gate will work as ----- ? Give implementation of XOR using minimum number of NAND gates? Which logical gates can be used as parity generators? Which logical gate can be used to find out whether the two single bit inputs are equal or not?  What is the difference between NAND gate and negative AND gate? XOR...