Skip to main content

Product Engineer II at Cadence Design Systems

Hello Dear Readers, Cadence Design Systems has a vacancy for a Product Engineer II role. Cadence is a pivotal leader in electronic design, building upon more than 30 years of computational software expertise. The company applies its underlying Intelligent System Design strategy to deliver software, hardware and IP that turn design concepts into reality.  Cadence customers are the world’s most innovative companies, delivering extraordinary electronic products from chips to boards to systems for the most dynamic market applications including consumer, hyperscale computing, 5G communications, automotive, aerospace industrial and health. The Cadence Advantage: The opportunity to work on cutting-edge technology in an environment that encourages you to be creative, innovative, and to make an impact. Cadence’s employee-friendly policies focus on the physical and mental well-being of employees, career development, providing opportunities for learning, and celebrating success in recog...

Multiplexer Verilog Code

Hello Dear Readers,

Here I have giving Verilog code of 32-bit Multiplexer which is a common digital system block. A multiplexer selects an input from multiple inputs. The following code implements a 32-bit 2-to-1 multiplexer as well as a 4-to-1 multiplexer using a function. The [31:0] denotes a bus that has 32 bits. So Let's Start it code.

Verilog Code:

1) Multiplexer Using Dataflow Level:

module mux2to1 (a0,a1,s,y); // multiplexer, 32 bits 
 // inputs, 32 bits
input [31:0] a0, a1;    
  // input selection line, 1 bit    
 input s;   
  // output, 32 bits        
output [31:0] y;       
// ternary operator is used so if (s==1) y=a1; else y=a0;    
assign y = s ? a1 : a0;      
endmodule

Now there is also a function facility available in Verilog similar to C language such functions are sections of Verilog code that allow the Digital Designer to write more reusable and maintainable code. Often a function is created when the same operation is done over and over throughout Verilog code. Rather than rewriting code, one can just call the function. This prevents copy and paste errors and allows for more maintainable code: if the behavior of the function changes, it only needs to be updated in one location. One rule about functions is that they cannot have any time delay (# delay, posedge). This is one way in which they differ from tasks. For this reason, functions are used for creating combinational logic. Yes, functions are synthesizable!

Below is a list of rules for functions:

  • Functions can have any number of inputs but only one output (one return value)
  • The order of inputs to a function dictates how it should be wired up when called
  • The return type defaults to one bit unless defined otherwise
  • Functions execute immediately (zero time delay)
  • Functions can call other functions but they cannot call tasks
  • Functions can drive global variables external to the function
  • Variables declared inside a function are local to that function
  • Non-blocking assignment in function is illegal
  • Functions can be automatic 
The following code implements a 32-bit 4-to-1 multiplexer. A 4-to-1 multiplexer selects one input from four inputs and needs a 2-bit selection signal. The assign statement can also be put in above the function block or the below as shown in the below,

2) Multiplexer Using Function:

module mux4to1 (a0,a1,a2,a3,s,y); // 4-to-1 multiplexer, 32-bit
input [31:0] a0, a1, a2, a3; // inputs, 32 bits 
input [1:0] s; // input, 2 bits 
output [31:0] y; // output, 32 bits 
function [31:0] select; // function name (= return value, 32 bits) 
            input [31:0] a0,a1,a2,a3; // notice the order of the input arguments
            input [1:0] s; // notice the order of the input arguments 
            case (s) // cases:
                 2’b00: select = a0; // if (s==0) return value = a0
                 2’b01: select = a1; // if (s==1) return value = a1
                 2’b10: select = a2; // if (s==2) return value = a2 
                 2’b11: select = a3; // if (s==3) return value = a3
            endcase 
endfunction 
assign y = select(a0,a1,a2,a3,s); // call the function with parameters 
endmodule

Thanks For Reading if any doubts write them in the comments I will be giving a reply asap.

Comments

Post a Comment

Popular posts from this blog

SDC (Synopsys Design Constraints) contents part 4

Today, we will be discussing the remaining constraints mentioned in the SDC, which pertain to timing exceptions and design rules. This is the final part of the SDC contents. This is going to be interesting, especially with multicycle paths. Take time to read and try to comprehend. 10. set_max_transition     By setting max transition value, our design checks that all ports and pins are meeting the specified limits mentioned in SDC. If these are not satisfied then timing report will give DRVs (design rule violations) in terms of slack. This is specified as               set_max_transition 0.5  UBUF1/A setting maximum limit of 500ps on pin A of Buffer1. 11. set_max_capacitance     This is same as max transition, setting the maximum capacitance value. if our design not meeting this value then violation will occur. This will also reports under design rule violations in terms of slack.     set_max_capacitance 0.7 [all_...

Apprenticeship CAI at MediaTek Bangalore

Hello Dear Readers,   Currently at MediaTek Bangalore vacancy for an Apprenticeship CAI role. Job Description: B.Tech degree in Electrical/Electronics Engineering with a strong educational background in Digital circuit design Experience in physical design of high performance design with frequencies > 2 Ghz. Experienced in hierarchical design, budgeting, multiple voltage domains and multiple clock domains. Strong skills with Cadence Encounter. Solid understanding of STA and timing constraints. Experienced in working on advanced process nodes (16nm). Strong expertise in Physical Verification to debug LVS/DRC issues at the block level. Requirement: B.Tech degree in Electrical/Electronics Engineering with strong educational background in Digital circuit design Experience in physical design of high performance design with frequencies > 2 Ghz. Experienced in hierarchical design, budgeting, multiple voltage domains and multiple clock domains. Strong skills with Cadence Enc...

IC Physical Design (PnR) at Ulkasemi

Hello Dear Readers,   Ulkasemi  has a vacancy for an IC Physical Design (PnR) role. Job Overview: As a full-time Trainee Engineer, the individual will be working on IC Physical Design implementation from RTL to GDSII to create design databases ready for manufacturing with a special focus on power, performance & area optimization with next-generation state-of-the-art process technologies. Job Responsibilities: Perform physical design implementation which includes Floor planning, Power Planning, Clock Tree Synthesis, Place and Route, ECO, Logic Equivalence checks Timing analysis, physical & electrical verification, driving the sign-off closure meeting schedule, and design goals Develop flow, methodologies, and automation scripts for various implementation steps Follow the instructions, compile documents, prepare deliverables, and report to the team lead Should remain up to date with the latest technology trends Educational Qualification:   B.Sc/M.Sc   in EEE or...