Docsity

Understanding eCode Functionality, Input Differences, and Fragment Outputs with Examples, Exams of Engineering Mathematics

Toggle sidebar
bg1
1. Explain the functionality of the following e codes (5 points)
(a)
extend transaction {
keep address in [10..50];
keep soft address == select {
20: min;
60: others;
30: max;
};
};
(b)
extend instr {
keep soft opcode == select {
40: [ADD, ADDI, SUB, SUBI];
20: [AND, ANDI, XOR, XORI];
10: [JMP, CALL, RET, NOP];
‘top.carry' * 90: JMPC;
};
};
2. Explain the difference between the input generated using the following two
constrained structures (7 points)
pf3
pf4

Partial preview of the text

Download Understanding eCode Functionality, Input Differences, and Fragment Outputs with Examples and more Exams Engineering Mathematics in PDF only on Docsity!

  1. Explain the functionality of the following e codes (5 points)

(a)

extend transaction { keep address in [10..50]; keep soft address == select { 20: min; 60: others; 30: max; }; };

(b)

extend instr { keep soft opcode == select { 40: [ADD, ADDI, SUB, SUBI]; 20: [AND, ANDI, XOR, XORI]; 10: [JMP, CALL, RET, NOP]; ‘top.carry' * 90: JMPC; }; };

  1. Explain the difference between the input generated using the following two constrained structures (7 points)

struct packet {

kind: [tx, rx]; size: byte; keep size > 15 => kind == rx; };

struct packet {

size: byte; kind: [tx, rx]; keep size > 15 => kind == rx; };

  1. What is the output of Num1 and Num4 produced by following e code fragment ( points)? Num2 = 0x1234; Num3 = 0x7777;

Num1 = %{Num2,Num3};

Num4 = pack(packing.high,num2,num3);

  1. Explain in your own words the temporal relationship expressed by the expect command in the following code (8 points)

event enter_exec_st is (change('top.cpu.curr_FSM') and true('top.cpu.curr_FSM' == exec_st))@sys.cpuclk; event fetch1_assert is (change('top.fetch1') and true('top.fetch1' == 1))@sys.cpuclk; expect @enter_exec_st => { @fetch1_assert}@sys.cpuclk else dut_error("PROTOCOL ERROR");