150

## Top Interview Questions

Sort: Relevance Popular Date

Sep 21, 2010

Mar 12, 2012

### ASIC Design Engineer at NVIDIA was asked...

Apr 19, 2012
 Design a divide by 3 counter. Bonus for 50% duty cycle 4 Answers Take 3 dual edge flip flops and create a Johnson's counter. The output will be divide by 3 with exactly 50% duty cycle is dual edge flip flop a kind of cheating? I think this is the fastest way to do it. http://www.onsemi.com/pub_link/Collateral/AND8001-D.PDF Of course, I would not have been able to just innovate this in the blue in the middle of an interview tough... Show More Responses reg [2:0] counter1 ; reg [2:0] counter2 ; always @ (posedge clk_in) if (enable == 1'b0) counter1 <= 3'b001; else counter1 <= {counter1[1:0],counter1[2]}; always @ (negedge clk_in) if (enable == 1'b0) counter2 <= 3'b001; else counter2 <= {counter2[1:0],counter2[2]}; assign clk_out = (counter1[0]|counter2[0]);

May 12, 2012
 there is a disk half painted white and the other half black. There are two sensors and the outputs of these sensors are the only signals available. How will you determine if the disk is rotating clockwise or anti-clockwise? 3 Answers Got an idea however it is valid only if clock can be used additionally to the two sensors. I use clock hours to describe the locations of the 2 sensors. The first sensor will be located at hour 12:00 the second will be located at hour 3:00. Then the first sensor will have to calculate the time it takes for one complete circle by: T=(time change from black to white) * 2 or T=(time change from white to black) * 2 The first sensor deliver signal to the second sensor when there is a change from black to white (or white to black) and the sensor is expecting the change. if the change (from black to white or from white to black) detected at the second sensor T/4 after getting the signal from the first sensor then the disk rounds clockwise else (when it take more then T/4 time) it runs counter clockwise when the second sensor get the signal it start timer to 1/4 Disk - vertically divided, left side White, right side Black, sensors - on upper quadrants horizontal division line of the disk, white sensor in left upper quadrant, black - in the right upper quadrant. 1. No rotation, initial state - White sensor (WS) = HI, Black sensor (BS) = LO 2. Clockwise rotation to 90" : WS =HI, BS changes from LO to HI Truth table (for each 90") WS BS 1 0 1 1 0 1 0 0 1 0 etc WS ==__==__==__==__==__==__==__==__==__==__== BS _==__==__==__==__==__==__==__==__==__==__= 3. Anti-clockwise rotation to - 90" : WS changes from HI to LO, BS=LO Truth table (for each - 90") WS BS 1 0 0 0 0 1 1 1 1 0 etc WS =__==__==__==__==__==__==__==__==__==__ BS __==__==__==__==__==__==__==__==__==__= There is a much simpler solution. Place the sensors about 1/4 circumference apart. Use one FF. Feed one sensor into the clock pin and the other sensor into the D pin. Let's say bottom left sensor is A is is used for the clock. Lets say bottom right sensor (90 degrees apart from A) is connected to the D pin. When the wheel spins, the transition from black to light (0->1) cause the FF to sample the other input. If the D input is 1, the Q will become one and you are rotating CW. If there is a 0->1 transition and the D input is a 0, the Q becomes 0 and we are rotating CCW.

### Senior ASIC Design Engineer at Applied Micro Circuits was asked...

Jun 15, 2009
 which is hard to fix -- setup violation or hold violation? And why? 3 Answers I answered setup, then they asked again how to fix the setup violation. Should be the hold time violation. Setup time violation can be solved by increasing the time period; however, hold time violation should be solved by inserting delay into the timing path carefully I think it depends on which stage the problem is detected. If after tape out, it's absolutely hold time because you cannot easily change the logic of chip. But if it is still in RTL coding stage, hold time may be easily fixed by adding some buffers.

### ASIC Design Engineer at NVIDIA was asked...

Apr 19, 2012
 Complete the C function (body) that uses recursion to determine if the string is a palindrome 4 Answers int isPalin(char *str){ int l = strlen(str); return isPalinHelper(str,0,l-1); } int isPalinHelper(char *str,int i,int j){ if(i= tail) return 1; return (palindrome(head+1,tail-1) && (*tail == *head)); } int check_palindrome (const char* str) { const char* tail = str + strlen(str) - 1; const char* head = str; return palindrome(head,tail); } int main(int argc, void* argv[] ) { if (check_palindrome (argv[1])) printf("true\n"); else printf("false\n"); } At my previous solution, please ignore the local variable int val at the palindrome function Show More Responses bool palindrome(char* str, int len) { if(len<=1) return true; if(len == 2) if(str[0] == str[1]) return true; return (str[0] == str[len-1]) && palindrome(str+1, len-2); }

### ASIC Design Engineer at Hewlett-Packard was asked...

Aug 22, 2013
 The I-V characteristic and five regions of MOS operation. 5 Answers Hi, Can you be more specific as to what are the five region of MOS operation? I think it should be cmos inverter operation. Yes, it is CMOS inverter operation. Could you please give any more information about the interview? like what all topics were covered. Show More Responses pmos/nmos: on/off -> triode/sat -> sat/sat -> sat/triode -> off/on. linear/cutoff linear/saturated saturated/saturated saturated/linear cutoff/linear

### ASIC Design Engineer at Marvell Technology was asked...

Sep 19, 2010
 frequency divide by 3 clk circuit 2 Answers its on the net u can google it out Suppose N=3; duty not 50%: you can use a ring counter, or a Moore FSM; duty 50%, first build a counter 0->2; then generate two enable signals, one active at time n=0, the other active at n=(N+1)/2; apply the two enable signals to two T-FF, the fiest one triggered on posedge, the second one triggered on negedge; the xor the T-FF outputs

Aug 24, 2012