Beruflich Dokumente
Kultur Dokumente
2. a) Give the Patterns to match URL and extract protocol, server, port, path. [7]
For eg:
set url http://www.beedub.com:80/index.html
The final answer should be like this
set match
=> http://www.beedub.com:80/index.html
set protocol
=> http
set server
=> www.beedub.com
set x
=> :80
set port
=> 80
set path
=> /index.html
Page 1 of 5
b) Explain the use of regsub command with examples. [3]
3. a) Create a menu named STUD in the Custom Designer layout editor or Cosmos layout [5]
editor. The STUD menu should contain a button named PrintLibName. When pushing
the button the library name of the open cell should be printed in the console window.
Write TK script to get user interface.
b) Develop a tcl script that recursively searches all files and directories of the given [5]
directory and returns the list of files that contain the given word. The script must have
two command line arguments, the first is a directory name and the second is a search
string.
4. a) Write a Perl script to read a first name, last name and phone number from the console. [5]
If the user does not type at least some characters for each of these, print “Do not leave
any fields empty” otherwise print “Thank you”.
b) Write a perl script that prints the count of all devices used in the given cell of spice [5]
netlist. The report should contain the number of each model of a device and the total
value of all models of the device type. Device types are: mosfet, diode, resistor,
capacitor, bjt.
5.(a) Write a perl program that reads a list of numbers (on separate lines) until the number 999 is [10]
read, and then prints the total of all the numbers added together. (Be sure not to add in the
999!) For example, if you enter 1, 2, 3, and 999, the program should reply with the answer
of 6 (1+2+3).
OR
5.(b) Create a TCL command called “unshift” which takes a list and an element as an argument, [10]
it deletes the first element in the list and adds the new element in place of that.
6. Declare a two dimensional array mem, using the following statement: [10]
reg [M-1:0] mem [N-1:0];
Use the address to field to either read from or write onto a memory address location,
depending on the value of the ~READ or ~WR signals.
Declare data as inout and address as input. Draw the timing diagram for read and write
protocol.
Page 2 of 5
Write verilog tasks (BFMs) for the read and write operations.
READ: Select the memory by lowering a CS signal. Latch the address, after 3ns (enable)
lower the READ signal, hold the READ signal low for 5ns (so that the read data is stable)
WRITE: Select the memory by selecting
selecting a CS signal. Signal WE must wait for 3 ns after
the address is stable, after which the WE signal is lowered (enabled). The WE signal is held
low for a time of 5ns after the data is stable.
Fig 1 Fig 2
a) Design a simulation strategy (verification plan) to verify error at the output of the 1-hot
1
encoder. Assume that the initial state of the encoder is ‘0010’. Compute the error
detection latency (that is the number of clock cycles required between the application of
the inputs and the detection of error in the output).
b) What type of verification methodology and test scenarios
scen are used for this design
verification?
Page 3 of 5
8. a) Consider the following property of an asynchronous handshake between Block1 and [5]
Block2. Property: The ack signal goes high on the assertion of req followed by two
positive edges of the clock signals. Choose the suitable verification topology and test
cases to verify the suitable design.
b) Write a short note on the following terms bringing out the difference between the two: [5]
(i) Formal and functional based verification
(ii) Random and Directed verification
(iii) Error based test case and performance test case.
9. a) What type of verification topology used for 4 bit counter verification and state the [5]
verification scenarios?
b) Packets dispatched can be of 3 network types: atm, ieee or Ethernet. The packets have a [5]
Boolean flag field which indicates whether the packet is “good” or “bad”. The header of
the packets is 32 bits in length. When the packet is atm, the entire header is randomly
r
generated, but when it is ieee or Ethernet the lowest 4 bits are always zero. 20% of the
time atm packets are generated, while remaining time ieee or Ethernet packets are
generated uniformly.. Model the testcase scenarios using Verilog HDL.
HDL
Page 4 of 5
10.(a) What is code coverage in verification? Difference between code coverage and functional [10]
coverage. Explain different types of code coverage and its examples.
OR
10.(b) Define the code coverage metrics and write the different coverage metrics in the following [10]
code.
⇔⇔⇔
Page 5 of 5