CODE

https://drive.google.com/drive/folders/1rHtTGMBZwmpckFHQrTmcwqDBDiIR-pzu?usp=sharing

################################################################

NOTES

MAY_08_2019

questions from interviews:

  1. Ethernet switch : verification environemtn for the same
  1. TB architercture
  2. Features
    o mostly will be taken from specification
  3. Scenarios
    o generate packets from all the ports
    o generate packets to different ports
  4. testplan
  5. TB components
  6. TB Coding
    top down approach
    Top most module

Notes:

  1. physical interface is the actual memory allocation for itnerface signals.
    Virtual interface is the pointer to above allocated memory. Physical interface is instantiated in top most module, virtual interface is used everywhere else(BFM, monitor, etc)
  2. mbox.get(pkt);
    before this line, we should have done pkt = new();
  3. explain what is input skew and output skew in clocking block?
    Input skew is the -delay used for sampling the clocking block inputs w.r.t active edge of clock. This is the time before which inputs are sampled
    Output skew is the delay applied for driving the clocking block output w.r.t active edge of clock. This is the time after which outputs are driven
  4. for any interface how many types of modports are required?
    3
    one for Master behavior
    one for Slave behavior
    one for monitor behavior
  5. WHy data signals are not declared as input in inteface definition, whereas clk, rst are declared as inputs?
    • clk, rst are inputs to all the blocks connected to itnerface(master, slave, monitor)
    • data can be input to bfm, then it will be output of DUT, it is input to monitor
  6. why signals in interface are declared as logic?
    • logic ensures that we can driven an unkonwn value(x) on the interface port

bit a;
logic b;
b = 1’bx;
a = b;
a ? 0

  1. what is difference between int and integer?
    int is 2 state variable
    integre is a 4 state varibale
  2. what is difference between mailbox and sempahore?
    mailbox and sempahore are used for inter process synchronization.
    milabox is specifically used for connecting a producer component to consumer component
    – it helps synchronize the data flow from producer to consumer
    – ex: mailbox is used to connect gen to bfm.
    sempahore is used for synchronizing various processes(components) that are trying to access a common resource
    – ex: sempahore is used when multiple bfm are writing to write
    in to a memory. Semaphore ensures that only one BFM will access memory at any time
    sempahore smp = new(1);
    smp.get(1);
    write_mem();
    smp.put(1);
  3. what is scheduling scemantics in SV? what are different scheduling regions?
  1. what is parameterization? how parameterization differs between Verilog and SV?
  1. what is the difference between functional coveage and code coverage?
    functional coveage gives the measure how much %age of design functionality has been covered by various testcases. It is defined by functional verification engineer.
    code coverage gives the measure how much %age of design code has been exercised by various testcases. It is not used defined, tools generates the report based on various tests run.
  2. write assertion for req to ack(max delay: 3 clocks), followed by data delay of exact 5 clock after ack
    property req_ack_data_prop;
    @(posedge clk) req |-> ##[0:3] $rose(ack) ##5 not($isunknown(data));
    endproperty
    REQ_ACK_PROP : assert property(req_ack_data_prop);
  3. difference between concurrent and immeditate assertiotns?
    immeditate assertiotn checks happens at same time, it does not involve any delay
    concurrent assertiotn checks happens over multiple clock cycles. It involves a antecedeant and consequent.
    antecedeant : reason which triggers the check
    consequent : check that happens for assertion pass/fail
  4. what is difference between #, ##? : number of time steps : number of clock cycles
  5. what is the difference between parameterzied mailbox and non-parameterzied mailbox?
  6. what is callbacks in verification enviornemnt?
  1. what is interative constraint?
  1. what is distribution constraint? explain with an example?
    type of constraints used when a value needs to be assigned in range of values with some weigfhtage
    constraint {
    len dist {[100:200]:\5, [1000:1500]:\1};
    }
  2. what is soft constraint and hard constraint? explain with an example?
    soft constraint are type of constraints, which can be overriden. If there is constraint which conflicts with soft constraint, then overriden value will eb taken.
    hard constraint are type of constraints, which can’t be overriden. If we try to override, it will result in constraints solving error. Hence randomization will fail.

how to declare these constraints?

  1. wirte a simple way to sum all the array elements?
    sum = array_name.sum();
  2. difference between delay, latency, throughput?
    throughput : essential BW we are getting from the system. for ex: for every clock cycle, some specific amount of data is driven.
    delay :
    latency: refers to wait cycles introduced between request and response

################################################################

Course Registration