0% found this document useful (0 votes)
7 views2 pages

VI Editor Practice Assignment Guide

Uploaded by

Kushagra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

VI Editor Practice Assignment Guide

Uploaded by

Kushagra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

VI EDITOR ASSIGNMENT

(Note: Each of these steps has a specific command for it)

Ques 1.: Let’s start by making a new file ‘[Link]’.

o Open the file and write a line of your choice, example:


“This is just a practice assignment.”
o Copy this line 3 times.
o Add a different sentence at the last of the text file.
o Try navigating to the start of the file and the last line of the file.

Ques 2.: Create a new file called ‘[Link]’.

o Copy the last line of the text file ‘[Link]’ into this file.
o Try navigating to the end & start of the line.
o Copy the same or write 4 new lines
o Try navigating to the second line of the file.

Ques 3.: The following module has some corrections that are to be made, try fixing the errors using

VI editor:

module Simple Adder (a, b, sum);

input a;

b;

output sum;

always @(a or b) begin

assign sum = a + b;

end

endmodule

Corrections to be made: a) There should be no space between module name: make it

SimpleAdder.

b) delete the “b; “ line and add b to the input list along with a.

c) Since there is only one sequential statement in the always

block, there is no need for ‘begin…. end’. Therefore, the

words can be deleted.

d) An ‘assign’ statement cannot be used within the “always”


block. Hence, delete the “assign” word.

You might also like