Skip to main content

RTL Design Engineer at Skyroot Aerospace

Hello, Dear Readers, Skyroot Aerospace has a vacancy for the RTL Design Engineer role. About Skyroot Aerospace: A cutting-edge startup founded by ex-ISRO scientists. Dedicated to affordable space access, we're rewriting aerospace technology rules. Our dynamic team fosters inventiveness, collaboration, and relentless excellence. Join us on a transformative journey to redefine space possibilities. Welcome to the forefront of space innovation with Skyroot Aerospace! Purpose of role: Understand architectural requirements and Design micro-architecture, implement design blocks using VHDL/Verilog for FPGA based Avionics packages for orbital launch vehicles and ground infrastructure. Job Requirements: 2+ Years of RTL and system design experience. Strong knowledge on Digital System Design (DSD). Strong knowledge of RTL/SoC design/integration with VHDL/Verilog. Strong knowledge in problem solving and debugging skills. Ability to understand architectural requirements and Design micro-archite...

Finite State Machine (FSM) Modelling Using Verilog HDL

Hello Dear Readers,

Today, I will explain how Finite State Machine (FSM) is modeling using Verilog HDL.

The finite state machine (FSM) is a very important design block in the ASIC design. Most of the ASIC designs and controller design needs efficient and synthesizable state machines and are commonly called FSM. The FSMs can be described very efficiently by using the Verilog HDL and for ASIC design engineers.

Basically, FSMs are predefined sequences on the preordered or defined events and are source synchronous designs. FSMs can be coded efficiently for the synthesizable outcome using the multiple- or single-procedural block. In the practical scenario, it is recommended to use the multiple-procedural blocks to describe the state machines. One of the procedural blocks can describe the combinational logic and level-sensitive to the inputs or the states. Whereas, the other procedural block can be edge sensitive to the positive edge of the clock or to the negative edge of the clock.

1). State machine types:

i). Moore -vs- Mealy:

A Moore state machine is classified as an FSM where the outputs are only a function of the present state, while Mealy state machines have one or more outputs that are a function of the present state and one or more FSM inputs.

Fig.1 - Moore & Mealy State Machine block diagram

Moore state machines are favored in industry because the outputs have a full cycle to settle through the combinatorial logic and are therefore easier to meet required cycle times. Mealy outputs allow an input to appear after the cycle has started, and the input must still traverse the combinatorial logic and meet setup time for the Mealy output. If the design absolutely requires an input to make it on‐ chip after the active clock edge, pass through logic and appear on the output all within one cycle, those are the designs that typically use a Mealy output.

The timing analysis for the Moore machine is very simple due to clean register-to-register path but for the Mealy machine there might be chances of timing violations if the input changes during the setup time window. But the disadvantage of the Moore machine is it needs more states compared to the Mealy machine. The practical scenario is that the Mealy machine has one state less compared to the Moore machine.

ii). Binary -vs- OneHot encoding:

The second major classification is whether the state encoding of the FSM designs are binary (also referred to as highly encoded) or if they are OneHot. There are multiple binary encoded styles but what they have in common is that they typically use fewer flip‐flops to create unique binary encodings for each state in the FSM design than OneHot FSM designs. OneHot encoding uses one flip‐flop for each state in the state machine and when the state machine is in that state, that flip‐flop is "hot" or equal to "1" while the rest of the states are equal to "0." Since transitioning from one state to another only requires that the previous hot flip‐flop be set to 0 and the new hot flip‐flop be set to 1, the combinatorial logic to transition between states is typically very simple. OneHot FSM designs are typically inferred automatically by FPGA synthesis tools.

Fig.2 Binary -vs- OneHot state diagrams

2). FSM Encoding Styles:
FSM can be described by many styles and practically there are three encoding styles used to describe the FSMs. These styles are named as

i). Binary Encoding:  

g FSM can be described by using binary encoding styles and by using this style, the number of register elements used is equal to the log(number of states) 2 base. Consider an FSM has four states; then, the number of registers equal to log4(base 2) is equal to 2.

ii). Gray Encoding: 

FSM can be efficiently described by using the Gray encoding technique and in this style, the gray codes are used to represent the states. The number of register elements used is equal to log( number of states) 2 base. Consider an FSM has four states; then, the number of registers equal to log4(base 2) is equal to 2.

iii). One-hot Encoding: 

g FSMs can be efficiently described using a one-hot encoding style. One-hot indicates that only one bit is active high at a time or hot at a time. The number of register elements used is equal to the number of states in the FSM. Consider an FSM has four states than the number of registers also equals 4. This style requires more area but the advantage is it has a clean register-to-register path and it makes STA very simple. If FSM has 16 states then one-hot encoding needs 16 flip-flops. So let's start modeling FSM of level to pulse converter.

The level to pulse converter partial state transition diagram is shown in Fig.3. As shown in the diagram the FSM remains in the state ‘S0’ for the input data_in=0 and for the data input data_in=1, it remains in the state ‘S1.’ The state transition table for the Mealy level to pulse converter is shown in Fig.4.

Fig.3 http://courses.csail.mit.edu/

Fig.4 http://courses.csail.mit.edu/

3). Verilog Code:

module levelTopulse(data_in,clk,rst,y_out);
input data_in,clk,rst;
output reg y_out;
parameter s0=0,s1=1;
reg current_state,next_state;
// state logic definition
always @(posedge clk or negedge rst)
begin
  if(~rst)
     current_state<=s0;
else
     current_state<=next_state;
end
// next state logic definition
always @(data_in or current_state)
begin
case (current_state)
s0:begin if(data_in) next_state=s1;
         else next_state=s0;
end
s1:begin if(data_in) next_state=s1;
         else next_state=s0;
end
default: next_state=s0;
endcase
end
//output logic definition
always @(current_state,data_in)
begin
case(current_state)
s0:begin if(data_in) y_out=1'b1;
         else y_out=1'b0;
end
s1:y_out=1'b0;
default: y_out=1'b0;
endcase
end
endmodule

4). Simulational Results:



5). Layout of FSM:
Here RTL to GDSII flow is implemented in Qflow using OSU180nm technology node shown in Fig.5.

Fig.5  Final Layout of Level to Pulse converter









Comments

  1. Superb post now I got verilog code understanding of level to pulse conversion.

    ReplyDelete
  2. What a contents I hope your blog achieve sky keep it up. I regularly read your every post.

    ReplyDelete
  3. Thanks for posting I have try level to pulse state diagram but now my doubts solve.

    ReplyDelete
  4. Extremely useful Post, solved my miniproject doubts.

    ReplyDelete
  5. Really interesting way of your explanation and most important code is given to us free.

    ReplyDelete
  6. nice article ...
    https://www.vigyankiduniya.com/
    please support us also

    ReplyDelete

Post a Comment

Popular posts from this blog

Exploring the Role of LEF Files in VLSI Chip Design: A Beginner's Guide

Hello Dear Readers,   Today in this post, I will provide some deep insight into the LEF file role during the VLSI Chip Design process. In VLSI (Very Large Scale Integration) design, a LEF file is a file that contains information about the physical geometry of the standard cells used in a circuit. LEF stands for Library Exchange Format. A standard cell is a pre-designed logic cell that contains a specific function, such as a flip-flop or an AND gate. Standard cells are designed to be easily combinable and scalable to create more complex circuits. The physical geometry of each standard cell is defined in the LEF file. The LEF file contains information such as the width, height, and position of the pins and metal layers of each standard cell. It also contains information about the physical design rules that govern the placement of these cells on the chip. LEF files are important in VLSI design because they enable the interoperability of different design tools from different vend...

Internship - SoC /IP Design at NXP India

Hello Dear Readers, Currently, at NXP India  vacancy for  Internship - SoC /IP Design   role.   We are looking for a Master degree student with Electronics and Communication Engineering, or related field, with an emphasis on SoC design. This is a full-time internship with a duration of about 11-12 months. Job Responsibility: Working with our experienced design team to design state of the art SoC hardware specific segment applications like Automotive, IoT, voice/object recognition, security, smart connectivity and touch sensing . Assisting experienced engineers with End-to-end ownership of SoC Design, Verification and implementation (Physical Design). Design and verify digital and Mixed-signal IPs. Document designs and present results. Job Qualification: Master student in electronic/computer engineering Creative and positive mindset Good knowledge on CMOS technologies Great communication skills, interpersonal skills, teamwork skills and can-do attitude Desire for a ca...

IC Design Engineer at Broadcom

  Hello Dear Readers, Currently, at Broadcom vacancy for an IC Design Engineer role. Job Description: Candidate would be required to work on various phases of SOC physical design activities. The job will include but not limited to block level – floor-planning, partitioning, placement, clock tree synthesis, route, physical verification (LVS/DRC/ERC/Antenna etc). Should be able to meet congestion, timing and area metrics.  Candidate would be required to do equivalence checks, STA, Crosstalk delay analysis, noise analysis, power optimization. Should be able to implement timing and functional ECOs. Should have excellent problem-solving skill to help through congestion resolution and timing closure. Should have experience formal verification and timing analysis and ECO implementation. Experience with tools such as Innovus/Encounter, ICC, Caliber, LEC, Primetime etc is highly desirable. Candidate should be able to work independently and guide other team members. Should be ...