vim: tabstop=4 noexpandtab textwidth=72 shiftwidth=4 autoindent scrolloff=0 nowrap Joe Daniels, Please note that 4-space tab characters are used in the following code corrections because each level of indentation is four spaces, following the convention of the LRM. A substantial number of other corrections were discovered during this code transformation, such as mis-capitalized key words and braces substituted for parentheses. All page numbers refer to PDF file page numbers, not page footer page numbers. Thanks. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 39, lines 26-29: <' import cpu_test_env '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 39, lines 39-40: a = 5; -- This is an inline comment b = 7 // This is also an inline comment Note that the semicolon is a statement and action separator, not a terminator. The end-code ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 39, lines 49-51: <' import cpu_test_env '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 40, lines 1-4: <' import bypass_bug72; import cpu_test0012 '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 41, line 37: type mvl : [MVL_U,MVL_X,MVL_0,MVL_1,MVL_Z,MVL_W,MVL_L,MVL_H,MVL_N] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 41, line 43: sig$ = {MVL_X; MVL_X; MVL_X} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 41, line 48: sig.put_mvl_list({MVL_X; MVL_X; MVL_X}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 46, lines 37-40: <' import bypass_bug72; struct foo{} '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 47, lines 34-37: struct packet { %len : int; %data[len] : list of byte } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 48, lines 29-35: struct packet { event xmit_ready is rise('top.ready'); on xmit_ready { transmit() }; transmit() is { out("transmitting packet...") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 53, lines 25-30: post_generate() is also { check that mlist.size() > 0 else dut_error("Empty list"); if session.check_ok then { check that mlist[0] == 0xa else dut_error("Error at index 0") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 54, lines 21-39: <' struct meth { %size : int; %taken : int; get_free(size: int, taken: int): int is inline { result = size - taken } }; extend sys { !area : int; mi : meth; post_generate() is also { sys.area = sys.mi.get_free(sys.mi.size, sys.mi.taken); print sys.area } } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 54, lines 50-55: <' struct meth { %data : list of int; keep data.size() <= 10 } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 55, lines 10-11: type destination : [a, b, c, d]; type source : [a, b, c, d] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 55, lines 24-28 type destination : [a, b, c, d]; type source : [a, b, c, d]; struct packet { dest : destination; keep me.dest == b -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 55, lines 33-38: type destination : [a, b, c, d]; type source : [a, b, e, f]; ... m() is { var tmp := destination'b } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 56, lines 27-29: sum(a: int, b: int): int is { result = a + b } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 57, lines 6-9: for each in packets do { packets[index].len = 5; .id = index } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 57, lines 23-25: keep for each in lof_packet { (index > 0) => it.size == prev.size + 1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 58, line 52: u : uint[5..7, 15] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 61, line 25: print (x & y) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 62, line 27: out(!(3 > 2)) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 62, lines 45-47: if (2 > 1) and (3 > 2) then { out("3 > 2 > 1") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 63, lines 18-21: if FALSE || ('top.a' > 1) then { out("'top.a' > 1") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 63, line 42: out((2 > 1) => (3 > 2)) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 64, line 20: if now @sys.tx_set then { out("sys.tx_set occurred") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 64, line 45: out(5," == ", +5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 65, line 26: out(10 + 5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 66, line 3: print 'top.a' >= 2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 66, lines 54-55: print lob1 == lob2; print p1 != p2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 67, lines 54-55 and page 68, lines 1-3: // Test a single bit to determine its current state case { 'TOP.write_en' === 1'b0 : {out("write_en is 0")}; 'TOP.write_en' === 1'b1 : {out("write_en is 1")}; 'TOP.write_en' === 1'bx : {out("write_en is x")}; 'TOP.write_en' === 1'bz : {out("write_en is z")} } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 68, lines 36-37: print s ~ "blue*"; print s !~ "/^Bl.*d$/" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 69, lines 35-36: keep x in [1..5]; check that x in {1; 2; 3; 4; 5} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 70, lines 20-26: m() is { var x := "pp kkk"; print x ~ "* *"; print $1; print $2; print x ~ "..."; print $1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 71, lines 41-45: m() is { var x := "pp--kkk"; print (x ~ "/--/"); print (x ~ "/^pp--kkk$/") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 72, line 20: ints[size] = 8 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 72, line 55: print u[15:0] using hex -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 73, lines 14-16: var big_i : int (bits:64) = 0xffff1000ffff1000; print big_i[1:0:byte]; print big_i[1:1:int] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 73, line 30: pack(packing.low, A[5:3], B[i:3]) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 74, line 19: print packets[0..14] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 74, lines 42-43: var x : list of uint = {1; 2; 3}; // list of uint var y := {50'1; 2; 3} // list of int 50 bits wide -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 75, lines 26-27: num1 = %{num2, num3}; %{num2, num3} = num1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 75, line 55: u : uint[5..7, 15] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 76, lines 20-21: type word : uint(bits:16); type address : uint(bytes:2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 76, line 55: print me.my_list.is_empty() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 77, lines 35-40: if me is a long packet (lp) then { print lp }; if me is not an extra packet then { print kind } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 78, line 42: var q : packet = new packet_s -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 79, line 35: keep soft port.sender.cell.u == 0xFF -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 80, line 23: z = (flag ? 7 : 15) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 82, lines 26-27: int (bits:8); int (bytes:1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 82, lines 41-42: type int_count : int [0..99] (bits:7); var count : int_count -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, line 12: var kind : [immediate, register] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, line 19: var kind : [immediate = 1, register = 2] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, line 29: var kind : [immediate = 3, register] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, lines 38-39: type instr_kind : [immediate, register]; var i_kind : instr_kind -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, line 43: type instr_kind : [immediate, register] (bits:2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, lines 48-49: type packet_protocol : [Ethernet, IEEE, foreign]; var p : packet_protocol [Ethernet..IEEE] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 83, lines 54-55: type instr_kind : [immediate = 1, register = 2]; var i_kind : instr_kind -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 84, lines 19-21: struct packet { protocol : packet_protocol } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 84, lines 26-28: struct port { data_in : packet } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 84, lines 42-55: type packet_protocol : [Ethernet, IEEE, foreign]; struct packet { protocol : packet_protocol; size : int [0..1k]; data[size] : list of byte; legal : bool }; extend sys { gen_eth_packet () is { var packet : legal Ethernet packet; gen packet keeping {it.size < 10}; print packet } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 85, lines 38-39: var lob : list of byte = {15; 31; 63; 127; 255}; print lob[0..2] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 86, lines 3-10: struct location { address : uint; data : uint }; struct holder { !locations : list(key:address) of location } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 86, lines 17-18: var message : string; message = "Beginning initialization sequence..." -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 86, lines 23-26: var dir : string = "/tmp/test1"; var tmp := dir.as_a(list of byte); tmp = tmp[4..9]; print tmp.as_a(string) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 86, line 39: var c_handle : external_pointer // holds a foreign pointer -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 87, line 1: -- bit concatenations, such as %{slb1, slb2} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 87, lines 54-55, page 88, lines 1-6: extend sys { x : int; m() is { var x: int; sys.x = '~/top/address'; x = sys.x + 1 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 88, lines 1-5: extend sys { n(): int (bits:64) is { return 1 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 88, lines 19-27: extend sys { k(i: int) @sys.any is { wait [i] * cycle }; run() is also { start k(6) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 88, lines 30-35: extend sys { b() is { var x : int = 5; var y := "ABC" } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 88, lines 46-51: data1 : list of byte; data2 : list of byte; run() is also { data2 = data1; data1[0] = 0 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 89, lines 19-20: var x : bool; x = 'top.a' >= 16 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 89, line 28: var x : color = blue -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 89, line 32: var y : color2 = x -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 89, line 43: p2 = p1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 89, lines 45-46: var p : Ether_8023 packet; set_cell(p) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 89, lines 50-52: set_cell(p:packet) is { p.cell = new cell_8023; ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 90, lines 5-10: extend sys { m(): string is { return "aaa" // assignment of a string } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 92, lines 34-36: var x : uint; var y : int; x = y -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 93, line 29: type PacketType : [rx=1, tx, ctrl] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 93, line 55: type size : int [8, 16] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 94, lines 30-31: type word : uint( bits:16); type address : uint(bytes: 2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 94, lines 54-55: type PacketType : [rx, tx, ctrl]; extend PacketType : [status] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 95, line 33: print (b).as_a(uint) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 96, lines 17-22: var int : int; var bool : bool; var enum : enum; var list_of_bit : list of bit; var list_of_byte : list of byte; var list_of_int : list of int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 98, lines 3-8: var int : int; var list_of_byte : list of byte; var list_of_int : list of int; var bool : bool; var enum : enum; var string : string -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 99, lines 18-19: var pkts : list (key:len) of packet; pkts = sys.packets.as_a(list (key:len) of packet) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 100, line 20: print all_values(reg_address) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 102, lines 12-21: type AGPModeType : [AGP_2X, AGP_4X]; struct agp_transaction like pci_transaction { block_size : uint; mode : AGPModeType; when AGP_2X agp_transaction { keep block_size == 32 }; when AGP_4X agp_transaction { keep block_size == 64 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 103, lines 3-10: type packet_kind : [atm, eth]; struct packet { len : int; kind : packet_kind }; extend packet { keep len < 256 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 103, lines 30-36: type packet_kind : [atm, eth]; struct packet { len : int; kind : packet_kind }; extend atm packet { keep len == 53 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 104, lines 46-54: struct packet { len : uint; good : bool; when FALSE'good packet { pkt_msg() is { out("bad packet") } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 106, line 38: private const %packet : packet_t -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 108, line 36: packets : list of packet -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 109, line 50: !locations : list(key:address) of location -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 111, line 10: attribute channel deep_copy = reference -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 114, lines 52-55: extend sys { unit_core : XYZ_router is instance; keep unit_core.hdl_path() == "top.router_i" } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 115, lines 5-12: unit XYZ_router { channels : list of XYZ_channel is instance; keep channels.size() == 3; keep for each in channels { .hdl_path() == append("chan", index) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 116, lines 36-55: unit XYZ_channel { event external_clock; event packet_start is rise('valid_out')@sim; event data_passed; data_checker() @external_clock is { while 'valid_out' == 1 do { wait cycle; check that 'data_out' == 'data_in' }; emit data_passed }; on packet_start { start data_checker() } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 117, line 25: cpu : XYZ_cpu is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 117, lines 53-55: extend XYZ_router { !current_chan : XYZ_channel } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 118, line 26: channels : list of XYZ_channel is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 118, line 55: var currently_valid_channels : list of XYZ_channel -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 119, line 6: keep [soft] [unit-exp.]attribute() == value ^^^^ ^^^^ ^ ^^^^^^^^^^^^^^ <----- points to bold red text -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 119, lines 43-55: extend dut_error_struct { write() is first { var channel : XYZ_channel = source_struct().try_enclosing_unit(XYZ_channel); if channel != NULL then { out("Error in XYZ channel: instance ", channel.hdl_path()) } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 120, lines 47-48: router : XYZ_router is instance; keep router.agent() == "verilog" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 121, line 20: out("Mutex violation in ", get_unit().full_hdl_path()) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 121, line 40: out("Started checking ", get_unit().e_path()) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 122, line 2: out(sys.unit_core.channels[0].get_parent_unit()) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 122, line 36: out("Mutex violation in ", get_unit().full_hdl_path()) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 123, lines 28-29: unpack(p.get_enclosing_unit(XYZ_router).pack_config, 'data', current_packet) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 124, line 2: var MIPS := source_struct().try_enclosing_unit(MIPS) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 125, line 37: set_config_max(memory, gc_threshold, 100M) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 125, line 55: print get_all_units(XYZ_channel) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 127, line 44: port-instance-name : [direction] port-kind [of type-specifier] is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 127, line 51: data_in : in buffer_port of packet is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 128, line 10: ports : list of simple_port of bit is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 128, lines 18-20: data : inout simple_port of list of bit is instance; keep bind(data, external); keep data.hdl_path() == "data" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 128, lines 25-34: data_out : out buffer_port of cell is instance; drive_all() @sys.any is { var stimuli : cell; var counter : int = 0; while counter < cells do { wait [1]*cycle; gen stimuli; data_out.put(stimuli); counter += 1 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 129, lines 22-28: a print p$ Prints the value of a simple port, p. b p$ = 0 Assigns the value 0 to a simple port, p. force p$ = 0 Forces a simple external port to 0. print q$[1:0] Prints the two LSBs of the value of q. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 129, lines 35-38: print p Prints the information about port p. Port p is defined as: p : simple_port of int (bits:8) is instance keep q == p q refers to the port instance p. Port reference q is defined as: !q : simple_port of int (bits:8) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 130, line 8: [change | rise | fall] (simple-port$)@sim -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 130, lines 14-20: transaction_complete : in simple_port of bit is instance; keep bind(transaction_complete, external); write_transaction(data: list of byte) @clk$ is { //... data_port$ = data; wait rise(transaction_complete$)@sim } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 130, lines 51-53: unit consumer { in_p : in buffer_port of atm_cell is instance } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 131, lines 1-12: unit producer { out_p : out buffer_port of atm_cell is instance }; extend sys { consumer : consumer is instance; producer : producer is instance; keep bind(producer.out_p, consumer.in_p); keep producer.out_p.buffer_size() == 0 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 131, lines 35-55: unit u1 { in_ep : in event_port is instance; tcm1()@in_ep$ is { // ... } }; unit u2 { out_ep : out event_port is instance; counter : uint; event clk is @sys.any; on clk { counter = counter + 1; if counter %10 == 0 then { emit out_ep$ } } }; extend sys { u1 : u1 is instance; u2 : u2 is instance; keep bind(u1.in_ep, u2.out_ep) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 132, line 18: method_type adder_method_t(arg1:int, arg2:int): int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 132, line 23: method_type local_adder_method_t(arg1:int, arg2:int): int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 132, line 27: method_type send_packet_method_t(p:packet)@sys.any -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 132, line 33: add : out method_port of adder_method_t is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 133, lines 31-34: bind(Ao, Ai); bind(Bo, Bi); bind(Ao, ABi); bind(Bo, ABi) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 133, lines 47-55: type src_t : [A, B]; method_type p_t(s:src_t); extend sys { Ao : out method_port of p_t is instance; Bo : out method_port of p_t is instance; ABi : list of in method_port of p_t is instance; keep ABi.size() == 2; ABi(src: src_t) is { out("AB(", src, ")") }; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 134, lines 6-15: // each output also invokes the common input keep bind(Ao, ABi[0]); keep bind(Bo, ABi[1]); run() is also { Ao$(A); Bo$(B) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 134, line 28: Syntax port-instance-name : [list of] [direction] simple_port of element-type is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 134, lines 50-51: data : simple_port of byte is instance; data : inout simple_port of byte is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 134, line 55: data : in simple_port of byte is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 135, line 8: Syntax port-instance-name : [list of] direction buffer_port of element-type is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 135, line 37: rq : in buffer_port of bool is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 135, line 45: Syntax event-port-field-name : [list of] [direction] event_port is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 136, lines 4-5: clk1 : event_port is instance; clk2 : inout event_port is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 136, lines 16-18: ep : in event_port is instance; keep bind(ep, external); event e is @ep$ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 136, line 22: clk : in event_port is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 136, line 30: Syntax port-instance-name : [list of] direction method_port of method-type is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 136, line 45: convert_string : out method_port of str2uint_method_t is instance -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 137, line 8: Syntax method_type method-type-name ([param-list]) [:return-type] [@sys.any] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 137, line 26: method_type str2uint_method_t(s:string): uint -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 137, line 50: !in_int_buffer_port_ref : in buffer_port of int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 138, line 23: p$ = 32'bz // Assigns an mvl literal to the port 'p' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 138, line 48: !in_method_port_ref : in method_port of burst_method_t -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 139, line 23: u = convert_string$("32") // calls the convert_string out method port -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 139, line 30: keep [soft] port_instance.attribute() == value -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 141, lines 17-25: data : inout simple_port of uint(bits:8) is instance; keep bind(data, external); keep data.hdl_path() == "sig"; keep data.declared_range() == "[7:0]"; keep data.verilog_strobe() == "#1"; keep data.verilog_drive() == "#5" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 142, lines 24-25: Syntax bind(exp1, exp2) bind(exp1, (external | empty | undefined)) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 143, lines 43-44: buf_in1 : in buffer_port of int(bits:16) is instance; keep bind(buf_in1, empty) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 144, line 28: keep u.p.buffer_size() == 20 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 144, line 55: keep u.p.declared_range() == "[31:0]" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 145, line 8: exp.delayed() Syntax not exp.delayed() exp.delayed() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 145, line 28: keep not u.p.delayed() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 145, line 37: exp.driver() Syntax not exp.driver() exp.driver() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 145, line 55: keep u.p.driver() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 146, line 21: keep u.p.driver_delay() == 2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 146, line 43: keep u.p.driver_initial_value() == {MVL_X; MVL_X; MVL_1; MVL_1} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 147, line 34: keep e.edge() == any_change -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 148, lines 2-3: clk : in event_port is instance; keep clk.hdl_path() == "clk" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 148, line 25: keep u.p.pack_options() == packing.low_big_endian -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 148, line 34: exp.pass_by_pointer() Syntax not exp.pass_by_pointer() exp.pass_by_pointer() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 148, lines 46-47: keep u.p.pass_by_pointer(); keep not u.p.pass_by_pointer() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 149, line 20: keep u.p.verilog_drive() == "@posedge clk2" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 149, line 40: keep u.p.verilog_drive_hold() == "@negedge clk2" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 150, line 8: exp.verilog_forcible() Syntax not exp.verilog_forcible() exp.verilog_forcible() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 150, line 21: keep u.p.verilog_forcible() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 150, line 40: keep u.p.verilog_strobe() == "@posedge clk1" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 151, lines 8-10: exp.verilog_wire() Syntax not exp.verilog_wire() exp.verilog_wire() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 151, line 25: keep u.p.verilog_wire() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 151, line 55: keep u.p.vhdl_delay_mode() == INERTIAL -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 152, line 30: rec_cell = in_port.get() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 153, line 2: out_port.put(trans_cell) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 153, lines 13-15: in-port-instance-name.is_empty() Syntax not in-port-instance-name.is_empty() in-port-instance-name.is_empty() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 153, lines 43-44: var readable : bool; readable = not cell_in.is_empty() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 153, lines 32-34: out-port-instance-name.is_full() Syntax not out-port-instance-name.is_full() out-port-instance-name.is_full() == bool -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 153, lines 43-44: var overflow : bool; overflow = cell_out.is_full() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 153, line 52: type mvl : [MVL_U, MVL_X, MVL_0, MVL_1, MVL_Z, MVL_W, MVL_L, MVL_H, MVL_N] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 155, line 40: check that pbi.get_mvl() != MVL_X else dut_error("Bad value") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 156, line 20: pbo.put_mvl_list({MVL_H; MVL_0; MVL_L; MVL_0}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 157, lines 3-4: check that not pbil.get_mvl_list().has(it == MVL_U) else dut_error("Bad list") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 157, line 25: pbol.put_mvl_string("32'hxxxxllll") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 157, line 44: print pbis.get_mvl_string(BIN) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 158, line 19: check that pbi.get_mvl4() != MVL_Z else dut_error("Bad value") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 158, lines 38-39: check that not pbi4l.get_mvl4_list().has(it == MVL_X) else dut_error("Bad list") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 159, line 6: print pbi4s.get_mvl4_string(BIN) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 159, line 24: print pbi4s.has_x() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 159, line 41: print pbi4s.has_z() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 160, line 19: print pbi4s.has_unknown() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 160, line 40: mlist = string_to_mvl("8'bxz1") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 161, lines 2-3: mstring = mvl_to_string({MVL_Z; MVL_Z; MVL_Z; MVL_Z; MVL_X; MVL_X; MVL_X; MVL_X}, BIN) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 161, line 27: var ma : uint = mvl_to_int(l, {MVL_X}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 161, line 47: var mlist : list of mvl = int_to_mvl(12, MVL_X) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 162, line 20: var bl : list of bit = mvl_to_bits({MVL_Z; MVL_Z; MVL_X; MVL_L}, {MVL_Z; MVL_X}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 162, line 41: var ml : list of mvl = bits_to_mvl({1; 0; 1; 0}, MVL_Z) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 163, line 3: var m4 : mvl = mvl_to_mvl4(MVL_U) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 163, line 22: var m4l : list of mvl = mvl_list_to_mvl4_list({MVL_N; MVL_L; MVL_H; MVL_1}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 163, line 41: mlist = string_to_mvl4("8'bxz") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 164, lines 6-20: data : inout simple_port of int is instance; keep bind (data, external); keep data.hdl_path() == "data"; d : int; d = 'data'; d = data$; 'data' = 32'bz; data.put_mvl_list(32'bz); Check that 'data@x' == 0; check that not data.get_mvl_list().has(it == MVL_X); check that not data.has_x(); d = 'data[31:10]@z' d = mvl_to_int(data.get_mvl_list(), {MVL_Z})[31:0] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 164, lines 27-34: data : inout simple_port of list of mvl is instance; keep bind (data, external); keep data.hdl_path() == "data"; check that 'data@x' == 0; check that not data$.has(it == MVL_X); check that not data.has_x(); 'data' = 32'bz data$ = 32'bz -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 165, lines 30-33: x : int[1, 3, 5, 10..100]; \\ is the same as: x : int; keep x in [1, 3, 5, 10..100]; l[20] : list of int; \\ is the same as: l : list of int; keep l.size() == 20; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 166, lines 27-31: struct s { a : int; b : t; // 't' is some other struct type keep a == f(b) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 166, lines 50-55: struct s { x : int[0..5]; q : t; keep x < m(q).y; m(param:t): t is { result = param } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 167, lines 3-5: struct t { y : int[0..5] } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 167, lines 28-35: struct packet { data : list of byte; checksum : uint; keep checksum == calc_checksum(data); calc_checksum(data:list of byte): uint is { // use 'data' to calculate checksum } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 167, lines 48-53: extend sys { l[1000] : list of uint; keep for each in l { it == read_machine_real_time_clock_msec() } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 168, lines 6-16: struct packet { data : list of data_item; post_generate() is { var id; for each in data do { if it.x < 100 then { it.id = id; id += 1 } } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 168, lines 47-55 and page 169, lines 1-2: struct packet { x : int; !y : int }; extend sys { p1 : packet; -- generated during pre-generation !p2 : packet; -- skipped during pre-generation post_generate() is also { gen p2 -- this allocates p2 and generates p2.x but not p2.y } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 169, line 30: value(arg : TYPE) is { result = arg } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 170, line 1: keep 0b101010010101[j:i] == 0b100 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 170, line 7: keep ({1; 2; 3; 4; 5})[i..j] in {2; 3} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 170, line 13: keep 0b1110011010 >> k == 0b1110 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 170, lines 32-47: struct packet { x : uint; y : uint; keep x < y }; extend sys { !p1 : packet; keep p1.y == 8; !p2 : packet; post_generate() is also { gen p1 keeping {it.x > 5}; p2 = new; gen p2.x } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 171, lines 5-9: keep soft constraint; gen item keeping {soft constraint; ...}; keep soft item = select { ... } Preserve the italics of "constraint" and "item." -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 171, lines 34-43: struct s { x : int; y : int; z : int; keep x in [1..100]; keep x < y or y < z } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 171, lines 47-55: struct s { x : int; y : int; z : int; keep soft x in [1..100]; keep soft x < y or y < z } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 172, line 24: keep c.reset_soft() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 174, lines 2-7: keep soft me.opcode == select { 30 : ADD; 20 : ADDI; 10 : [SUB, SUBI] } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 174, lines 26-36; struct packet { x : int; y : int }; extend sys { p1 : packet; p2 : packet; keep p1 == p2; post_generate() is also { p1.x = 5 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 174, lines 44-55: struct packet { x : int; y : int }; extend sys { p1 : packet; p2 : packet; keep p1.x == p2.x; keep p1.y == p2.y; post_generate() is also { p1.x = 5 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 175, lines 16-30: struct packet { x : int; y : int }; extend sys { p1 : packet; p2 : packet; keep p1 in sys.list_of_input_packets; keep p2 in sys.list_of_input_packets; keep p1 != p2; keep p1.x == p2.x; keep p1.y == p2.y } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 175, lines 44-45: p : packet; keep (packet == sys.input_packet1) or (packet == sys.input_packet2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 175, line 50: keep packet != sys.input_packet1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 176, lines 12-21: extend sys { l1 : list of int; l2 : list of int; !x : int; keep l1 == l2; post_generate() is also { x = l2.pop() } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 176, lines 44-48: keep sys.packets[5] == x; -- element extraction from fixed list keep l[7] < 25; -- constraining certain element of list keep sys.packets[i].id == 10; -- index look-up for fixed list and value keep l[i] < x -- multi-way constraint -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 176, line 53: keep x in l -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 177, lines 39-40: keep list1.is_a_permutation(list2); keep list2.is_a_permutation(list1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 178, lines 47-49: keep for each (p) in pkl { soft p.protocol in [atm, eth] } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 179, lines 8-20: struct s { b1 : bool; b2 : bool; x : int }; extend sys { l : list of s; keep l.is_all_iterations(.b1, .b2) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 179, line 55: keep kind != tx or len == 16 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 180, lines 19-23: keep all of { kind != tx; len == 16 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 181, line 3: keep packets.is_all_iterations(.kind, .protocol) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 181, line 33: keep soft legal -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 182, line 2: keep gen (y) before (x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 183, line 17: keep gen_before_subtypes(format) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 183, line 37: keep reset_gen_before_subtypes() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 183, line 55: keep a == value(b + c) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 184, line 8: keep i < value(j) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 185, lines 8-10: keep a => b => c; // is equivalent to: keep (not a or b) => c; // is equivalent to: keep a and (not b) or c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 185, lines 15-17: keep a => (b => c); // is equivalent to: keep a => (not b) or c; // is equivalent to: keep (not a) or (not b) or c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 185, lines 23-26: not short // where "short" is of type "bool" long == TRUE soft x > y x + z == y + 7 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 187, lines 3-5: gen next_packet keeping { .kind in [normal, control] } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 187, lines 29-31: pre_generate() is also { m = 7 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 187, lines 51-53: post_generate() is also { m = m1 + 1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 190, line 46: emit ready -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 197, line 49: wait cycle -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 198, line 29: event rst is true(reset == 1) @clk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 199, line 3: wait @rst -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 199, line 37: wait {@start; cycle} @clk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_3_071008.pdf, page 200, line 2.5: event e12 is (@TE1 and @TE2) @clk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 200, line 25: event e12 is (@TE1 or @TE2) @clk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 200, line 55: {@ev_a; @ev_b; @ev_c} @qclk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 201, line 29: event de is {@ev_d; @ev_e} @ev_f -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 201, line 55: wait [2]*cycle -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 202, line 48: event p2_4 is ~[2..4]*@pclk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 203, line 44: event ev_1 is {[2..4]*@pclk; @reset} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 205, line 3: event ev_1 is fail{@ev_b; @ev_c} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 205, line 36: expect @A => {[1..2]*@clk; @B} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 206, line 24: expect @req => eventually @ack -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 206, lines 53-55 through page 207, lines 1-7: struct s { event pclk is @sys.pclk; event Q; event E; event T is {@E; [2]} @pclk; event S1 is {@Q; {@E; [2]}} @pclk; event S2 is {@Q; @T} @pclk; event S3 is {@Q; detach({@E; [2]})} @pclk } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 208, line 2.5: event bc_bar is not {@ev_b; @ev_c} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 209, line 47: event hv_c is change('top.hold_var')@sim -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 210, line 47: wait delay(3) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 211, line 35: wait @watcher_on exec {print watcher_status_1} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 213, line 42: on xmit_ready { transmit() } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 214, line 40: expect @a => {[1..5]; @b} @clk -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 214, lines 47-55: struct bus_e { event bus_clk is change('top.b_clk') @sim; event transmit_start is rise ('top.trans') @bus_clk; event transmit_end is rise ('top.transmit_done') @bus_clk; event bus_cycle_length; expect bus_cycle_length is @transmit_start => {[0..999]; @transmit_end} @bus_clk else dut_error("Bus cycle did not end in 1000 cycles") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 215, lines 30-31: tcm() @p_clk is { wait }; tcm() @p_clk is { wait cycle@p_clk } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 216, lines 23-24: sent_data_tcm(); sync -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 216, line 48: wait [3]*cycle -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 217, lines 37-41: all of { { check_bus_controller() }; { check_memory_controller() }; { wait cycle; check_alu() } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 218, line 14: first of { { wait [3]*cycle@ev_a }; { wait @ev_e } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 219, line 50 through page 220, line 5: var stv : [initial, running, done]; state machine stv until done { initial => running { wait until rise('top.a') }; initial => done { wait until change('top.r1'); wait until rise('top.r2') }; running => initial { wait until rise('top.b') }; running { out("Entered ", stv, " state at ", sys.time); while TRUE do { wait cycle; out("still running") } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 220, line 35: begin => run { wait [2]*cycle; out("Run state entered") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 221, line 6: * => pause { wait @sys.restart; out("Entering pause state") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 221, lines 37-41: * => run { out("* to run"); wait cycle }; run { out("In run state"); wait cycle; out("Still in run") }; run => done { out("run to done"); wait cycle } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 223, lines 13-14: cover event-type [using coverage-group-option, ...] is Syntax {coverage-item-definition [; coverage-item-definition] ...} cover event_type is empty -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 224, lines 42-45: cover inst_driven is { item opcode; item op1; cross opcode, op1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 227, lines 40-46: cover inst_driven is { item op1; item op2; item op2_big : bool = (op2 >= 64); item hdl_sig : int = 'top.sig_1' } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 228, lines 18-19: packet_type == Ethernet packet_type == ATM -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 231, lines 9-13: cover inst_driven is { item opcode; item op1; cross opcode, op1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 231, lines 36-39: cover state_change is { item st : cpu_state = 'top.cpu.main_cur_state'; transition st } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 233, lines 45-54: cover rclk is also { item rflag }; cover rclk using also text = "RX clock"; cover rclk using also no_collect is also { item rvalue } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 235, line 17: Syntax scan_cover(item-names:string) : int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 235, line 43: num_items = cover_info.scan_cover("cpu.inst_driven.*") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 235, line 51: Syntax start_group() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 236, lines 12-15: start_group() is { if group_text != NULL then { out("Description: ", group_text) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 236, lines 36-39: start_instance() is { if instance_text != NULL then { out("Description: ", instance_text) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 236, line 48: Syntax start_item() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 237, lines 5-8: start_item() is { if item_text != NULL then { out("Description: ", item_text) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 237, line 17: Syntax scan_bucket() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 237, lines 29-31: scan_bucket() is { out(count, " ", percent, "% ", bucket_name) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 237, line 39: Syntax end_item() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 237, lines 53-55: end_item() is { out("finished item ", item_name, "\n") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 238, line 9: Syntax end_instance() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 238, lines 23-25: end_instance() is { out("finished instance ", instance_name, "\n") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 238, line 34: Syntax end_group() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 238, lines 46-48: end_group() is { out("finished group", group_name, "\n") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 239, line 20: covers.include_tests("tests_A:run_A_10", TRUE) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 239, line 47: covers.set_weight("inst.done", 4, FALSE) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 240, line 28: covers.set_at_least("inst.done", 4, FALSE) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 240, line 37: Syntax covers.set_cover((item|event): string, collect-coverage: exp) ^^^^^^^A^^^^^^^^^ A A | | | Set this text ------+-----------------------------+----------------------+ in red. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 241, line 7: covers.set_cover("packet.*", FALSE) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 241, line 30: bkl = covers.get_contributing_runs("inst.done.len", "[0..4]") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 242, line 9: Syntax write_cover_file() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 242, line 20: write_cover_file() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 242, line 30: Syntax covers.get_overall_grade(): int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 242, line 39: grade = covers.get_overall_grade() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 242, line 48: Syntax covers.get_ecov_name(): string -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 242, line 55: ecov_file = covers.get_ecov_name() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 243, line 9: Syntax covers.get_test_name(): string -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 243, line 15: ecov_file = covers.get_test_name() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 243, line 24: Syntax covers.get_seed(): int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 243, line 30: seed_val = covers.get_seed() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 246, lines 3-5: define "largest " as { if > then { = } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 249, lines 11-33: define "C " as { %! : uint(bits: ) }; define "C " as { // The previous macro can never be matched because its pattern is // completely overshadowed by this one ( can always be parsed as // ) %! : uint(bits: ) }; define "C " as { // This macro is not overshadowed by the previous (even though // can be parsed as ) %! : }; extend sys { C byte f1; // matched first by // replaced by '!% f1: byte' C 4*WORD_SIZE f2 // matched first by // replaced by '!% f2: uint(bits: 4*WORD_SIZE)' } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 249, lines 41-55: define "swap [ ]" as { var tmp := ; <1> = ; = tmp }; extend sys { run() is also { var a := 5; var b := 9; var z := 13; swap a b; // a becomes 9, b becomes 5 print a, b, z; swap a; // a becomes 13, z becomes 9 print a, b, z } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 252, lines 23-28: check_count(i:int) is { check that i == expected_count else dut_error("Bad i: ", i) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 252, lines 46: check that FALSE else dut_error() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 252, lines 53-55: if 'data_out' != 'data_in' then { dut_error("DATA MISMATCH: Expected ", 'data_in') } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 253, lines 8-18: struct dut_error_struct { get_message() : string; source_struct() : any_struct; source_location() : string; source_struct_name() : string; source_method_name() : string; check_effect() : check_effect; set_check_effect(effect:check_effect); write(); pre_error() is empty } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 254, lines 5-11: extend dut_error_struct { write() is also { if source_struct() is a XYZ_packet (p) then { print p.parity_calc() } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 254, lines 51-55: extend sys { setup() is also { set_check("...", WARNING) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 255, line 37: warning("len exceeds 50") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 256, lines 5-10: check_size() is { if pkt.size != LARGE then { error("packet size is ", pkt.size) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 256, line 30: fatal("Run-time error - exiting") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 256, lines 50-55: try { var my_file : file = files.open(file_name, "w", "Log file") } else { warning("Could not open ", file_name, "; opening temporary log file sim.log") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 257, line 28: assert a < 20 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 260, lines 30-34: m(l: list of any_struct) is { for each (s) in l do { if s is a packet (p) then {}; if s is a cell (c) then {} } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 260, line 38: m({my_cell; my_packet}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 260, lines 52-55: struct A { my_type() is { out("I am type A") } }; struct B like A {}; struct C like B { my_type() is { out("I am type C, grandchild of A") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 261, lines 37-41: struct meth { get_free_area_size(size:int, taken:int):int is inline { result = size - taken } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 261, lines 53-55: struct print { print_length(length:int) is { out("The length is: ", length) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 262, lines 38-45: struct meth { main() @pclk is { wait @ready; wait [2]; init_dut(); emit init_complete } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 264, lines 10-28: module methods1.e <' struct meth { m() is { out("This is...") } }; extend sys { mi : meth }; extend meth { m() is also { out("This is also..."); return; out("This is also2...") } } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 265, lines 2-12: module methods2.e <' import methods1.e; extend meth { m() is first { out("This is first..."); return } } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 265 lines 35-42: module methods3.e <' import methods2.e; extend meth { m() is also { out("This is also3...") } } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 266, lines 8-11: struct meth { run() is also { out("Starting main..."); start main() } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 266, lines 53-55: struct packet { show() is undefined } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 267, line 48: init_dut() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 268, line 33: start main() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 269, line 34: tmp1 = get_free_area_size(size, taken) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 270, line 5: if 'top.b' > 15 then { compute inc_counter() } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 270, line 35: return i*i -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 271, lines 1-3: increment (cnt:int) is { cnt = cnt + 1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 271, lines 4-8: m() is { var tmp : int = 7; increment(tmp); print tmp } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 271, lines 19-25: increment (cnt:*int) is { cnt = cnt + 1 }; m() is { var tmp : int = 7; increment(tmp); print tmp } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 271 lines 40-44: increment_list(cnt:list of int) is { for each in cnt do { cnt[index] += 1 } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 271, lines 52-55: create_if_illegal(pkt:*packet) is { if not pkt.legal then { pkt = new } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 272, line 55: routine mean_sqrt(l:list of int): int is C routine wrap_mean_sqrt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 273, line 32: encrypt(data:byte): byte is C routine proprietary_encrypt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 273, lines 54-55: C export packet; C export packet.add() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 275, line 55: var a : int -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 276, line 25: sys.u = 0x2345 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 276, line 48: sys.c.count1 += 5 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 277, line 43 - page 278, line 17: <' extend sys { !a : int; !da : int; incrementing()@any is { for i from 1 to 5 do { a = a + 1; da <= da + 1; wait cycle }; stop_run() }; observer()@any is { while TRUE do { out("observing 'a' as ", a, " observing 'da' as ", da); wait cycle } }; run() is also { start observer(); start incrementing() } } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 279, line 55: i_stream = pack(packing.high, opcode, operand1, operand2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 281, line 55: s2 = s1.swap(2, 4) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 282, lines 13-19: struct pack_options { reverse_fields : bool; reverse_list_items : bool; final_reorder : list of int; scalar_reorder : list of int } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 284, line 53: lob = pack(packing.high, i_struct, p_struct) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 285, lines 1-2: i_struct.do_pack(packing.high, *tmp); p_struct.do_pack(packing.high, *tmp) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 285, lines 6-11: do_pack(options:pack_options, l:*list of bit) is only { var L : list of bit = pack(packing.low, operand2, operand1, operand3); l.add(L) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 285, line 55: unpack(packing.low, lob, c1, c2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 286, lines 3-4: c1.do_unpack(packing.low, lob, index); c2.do_unpack(packing.low, lob, index) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 286, lines 9-13: do_unpack(options:pack_options, l:list of bit, src:int): int is only { var L : list of bit = l[src..]; unpack(packing.low, L, op2, op1, op3); return src + 8 + 5 + 3 //bit-width of operands } I intentionally substituted the parameter name "src" for "from" above because we should not be using e key words as user-defined names in examples. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 286, lines 20-29: struct instruction { %opcode : uint (bits:3); %operand : uint (bits:5); %address : uint (bits:8); !data_packed_low : list of bit; keep opcode == 0b100; keep operand == 0b11001; keep address == 0b00001111 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 286, line 34: data_packed_low = pack(NULL, opcode, operand) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 287, lines 7-12: struct instruction { %opcode : uint (bits:3); %operand : uint (bits:5); %address : uint (bits:8) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 287, lines 17-24: extend sys { post_generate() is also { var inst : instruction; var packed_data : list of bit; packed_data = {1;1;1;1;0;0;0;0;1;0;0;1;1;0;0;1}; unpack(packing.high, packed_data, inst) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 288, lines 20-25: struct packet { %len1 : int; %len2 : int; %data1[len1] : list of byte; %data2[len1 + len2] : list of byte } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 289, lines 5-8: var my_list : list of int = {1; 2; 3}; var int_10 : int(bits:10); my_list = 'top.foo'; int_10 = pack(NULL, 5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 289, line 12: 'top.foo' = {1; 2; 3} -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 289, line 16: unpack(packing.low, 5, my_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 291, line 36: if a > b then { print a, b } else if a == b then { print a } else { print b, a } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 292, lines 31-36: case packet.length { 64 : {out("minimal packet") }; [65..256] : {out("short packet") }; [257..512] : {out("long packet") }; default : {out("illegal packet length")} } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 293, lines 34-38: case { packet.length == 64 {out("minimal packet")}; packet.length in [65..255] {out("short packet") }; default {out("illegal packet")} } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 294, line 22: while a < b do { a += 1 } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 294, line 42: repeat { i += 1 } until i == 3 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 295, line 40: for each transmit packet (tp) in sys.pkts do { print tp // "transmit packet" is a type } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 296, line 28: for i from 5 down to 1 do { out(i) } // Outputs 5,4,3,2,1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 297, line 3: for {i = 0; i <= 10; i += 1} do { out(i) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 297, lines 33-35: for each line in file "signals.dat" do { '(it)' = 1 } // Reads a list of signal names and assigns to each the value 1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 298, lines 2-4: for each file matching "*.e" do { out(it) } // lists the 'e' files in the current directory -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 299, line 55: import test_drv.e -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 301, lines 3-5: #ifdef MEM_LG then { import mml.e } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 301, line 37: define LX len + m -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 301, line 40: define LX (len + m) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 301, line 47: #define PLIST_SIZE 100 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 302, line 29: #undef PLIST_SIZE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 303, line 25: package vr_xb -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 304, line 3: package type t : int(bits:16) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 304, lines 53-55: private f : int; protected m() is {}; package event e -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 305, line 22: xbus_evc : vr_xbus::env_u -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 307, line 37: force '~/top/sig' = 7 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 307, line 55: release 'top.sig' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 308, lines 37-38: '~/top/sig' = 7; print '~/top/sig' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 309, line 3: simulator_command("force -deposit memA(31:0)") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 309, line 38: stop_run() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 312, lines 46-52: message(HIGH, "Master ", me, " has received ", the_packet) { write the_packet }; -- Output this message and write the packet, at verbosity HIGH. message(VR_XBUS_FILE, MEDIUM, "Packet ", num, " sent: ", data) -- Output this message at verbosity MEDIUM. -- Use VR_XBUS_FILE as the message-tag. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 313, line 6: type message_tag : [NORMAL] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 313, line 11: extend message_tag : [VR_XBUS_PACKET] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 313, lines 16-17: message( MEDIUM, "Packet done: ", packet); message(NORMAL, MEDIUM, "Packet done: ", packet) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 314, lines 18-20: extend vr_xbus_env_u { logger : message_logger is instance } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 315, lines 25-37 (table 47, column "Field"): tags : list of message_tag; keep soft tags == {} verbosity : message_verbosity; keep soft verbosity == NONE modules : string; keep soft modules == "*" string_pattern : string; keep soft string_pattern == "..." to_file : string; keep soft to_file == "" to_screen : bool; keep soft to_screen -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 316, lines 41-45: extend vr_xbus_env_u { run() is also { logger.set_actions(FULL, {NORMAL}, "*", "...", replace) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 317, lines 20-23: extend vr_xbus_env_u { run() is also { logger.set_unit(testbench_01, off) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 317, lines 43-46: extend vr_xbus_env_u { run() is also { logger.set_format(none) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 318, lines 19-23: extend vr_xbus_env_u { run() is also { logger.set_flush_frequency(15) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 318, lines 42-48: extend vr_xbus_env_u { run() is also { var my_file : file; my_file = files.open("my.log", "w", "Log file"); logger.set_file(my_file, on) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 319, lines 18-24: extend vr_xbus_env_u { run() is also { if logger.to_file != "" then { logger.set_screen(off) } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 320, lines 1-5: extend vr_xbus_env_u { run() is also { logger.set_leader(LOW, {NORMAL}, "*", "...", on) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 320, lines 23-28: extend message_tag : [VR_XBUS_PACKET]; extend vr_xbus_env_u { run() is also { logger.ignore_tags({VR_XBUS_PACKET}) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 321, lines 3-8: extend message_logger { accept_message(): bool is only { return get_tag() == normal } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 321, lines 28-32: extend message_logger { format_message(): list of string is only { var msg_list := get_message(); ... } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 324, lines 39-54: unit my_dsp { foo() is { ... message(LOW, "Starting transmission"); -- LOW verbosity means this is an important message that -- will be shown even when verbosity is set to 'LOW' ... message(MEDIUM, "Sending packet ", pkt); -- MEDIUM verbosity means this is a less important message ... }; logger: message_logger is instance -- Instantiate a message logger for this unit. When activated, -- it will handle all message actions executing in this unit -- or in any unit or struct under it. } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 325, lines 3-10: extend sys { dsp : my_dsp is instance; keep dsp.logger.tags == {NORMAL}; keep dsp.logger.verbosity == LOW; -- This logger will only look at important messages keep dsp.logger.to_file == "dsp_results.elog" -- Send it also to a file (it goes to the screen by default) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 325, lines 16-26: message(NONE, "I'm A0") { out("A1"); message(NONE, "I'm B0") { out("B1"); message(NONE, "I'm C0") { out("C1") }; out("B2") }; out("A2") } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 326, lines 1-30: extend sys { u1 : U1 is instance; u2 : U2 is instance; run() is also { u2.foo() } }; unit U1 { l1 : message_logger is instance; keep l1.verbosity == FULL; a : A }; unit U2 { l2 : message_logger is instance; keep l2.verbosity == FULL; foo() is { message(NONE, "foo: I'm U2") { out("foo: before"); sys.u1.a.goo(); out("foo: after") } } }; struct A { goo() is { message(NONE, "goo: I'm message from A") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 326, lines 41-45: extend sys { run() is first { u2.l2.set_leader(NONE, {NORMAL}, "*", "foo: I'm U2", on) } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 327, line 51 - page 326, line 10: define MAX_RANDOM_COUNT 10; extend MAIN sequence_name { count : uint; !sequence : sequence_name; keep soft count > 0; keep max_random_count <= MAX_RANDOM_COUNT; keep soft count <= MAX_RANDOM_COUNT; keep sequence.kind not in [RANDOM, MAIN]; body() @driver.clock is only { for i from 1 to count do { do sequence } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 330, lines 17-34: extend RANDOM sequence_name { count : uint; !sequence : sequence_name; keep all of { soft count > 0; max_random_count <= MAX_RANDOM_COUNT; soft count <= MAX_RANDOM_COUNT; sequence.kind not in [RANDOM, MAIN]; depth_from_driver >= driver.max_random_depth => sequence.kind == SIMPLE }; body() @driver.clock is only { for i from 1 to count do { do sequence } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 330, lines 40-45: extend SIMPLE sequence_name { !seq_item: item; body() @driver.clock is only { do seq_item } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 330, line 52: sequence ex_atm_sequence using item=ex_atm_cell -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 331, line 15: sequence soc_sequence -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 332, lines 11-28: extend FOO ex_atm_sequence { // Parameters i : int; b : bool; // Items/subsequences !cell : ex_atm_cell; !seq : BAR ex_atm_sequence; // The body() method body() @driver.clock is { do cell keeping {.len == 4}; do cell; for i = 1 to 20 do { do cell keeping {.address == i} }; do seq keeping {.f == 2} } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 341, line 41: n_list = p_list.apply(.length + 2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 340, lines 23-24: var i_list : list of int; i_list.add(5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 342, line 47: i_list.add(l_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 343, lines 27-28: var l_list : list of int = {4; 6; 8}; l_list.add0(2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 343, lines 53-55: var i_list : list of int = {1; 3; 5}; var l_list : list of int = {2; 4; 6}; i_list.add0(l_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 344, lines 39-40: var i_list : list of int = {2; 4; 6; 8}; i_list.delete(2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 345, lines 24-25: var l_list : list of int = {2; 4; 6; 8}; l_list.fast_delete(2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 345, lines 54-55: var l_list := {10; 20; 30; 40; 50}; l_list.insert(3, 99) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 346, lines 26-28: var l_list := {10; 20; 30; 40; 50}; var m_list := {11; 12; 13}; l_list.insert(1, m_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 346, lines 53-55: var i_list := {10; 20; 30}; var i_item : int; i_item = i_list.pop() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 347, lines 21-23: var i_list := {10; 20; 30}; var i_item : int; i_item = i_list.pop0() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 347, lines 48-49: var i_list : list of int; i_list.push(5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 348, lines 23-24: var l_list : list of int = {4; 6; 8}; l_list.push0(2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 348, line 47: i_list.push(l_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 349, lines 24-26: var i_list : list of int = {1; 3; 5}; var l_list : list of int = {2; 4; 6}; i_list.push0(l_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 350, lines 29-30: var r_list := {2; 3; 5; 6; 8; 9}; r_list.resize(10, TRUE, 1, TRUE) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 351, lines 8-9: packets.apply(it.data[0]); packets.data[0] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 351, lines 13-15: var p_list := {1; 3; 5}; var n_list : list of int; n_list = p_list.apply(it * 2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 351, lines 35-37: var strlist_1 : list of string = {"A"; "B"; "C"}; var strlist_2 : list of string; strlist_2 = strlist_1.copy() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 352, lines 3-4: var ct : int; ct = instr_list.count(it.op1 > 200) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 352, lines 27-28: var i_chk : bool; i_chk = packets.exists(5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 352, lines 54-55: var i_item : instr; i_item = instr_list.first(it.op1 > 15) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 353, lines 23-24: var i_item : int; i_item = instr_list.first_index(it.op1 > 15) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 353, lines 45-46: var i_list : list of packet; i_list = packets.get_indices({0; 1; 2}) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 354, lines 23-24: var i_ck : bool; i_ck = sys.instr_list.has(it.op1 > 31) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 354, lines 54-55: var lc : bool; lc = packets_1a.is_a_permutation(packets_1b) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 355, lines 19-20: var no_l : bool; no_l = packets.is_empty() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 355, lines 45-46: var i_item : instr; i_item = sys.instr_list.last(it.op1 > 15) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 356, lines 23-24: var i_item : int; i_item = instr_list.last_index(it.op1 > 15) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 356, lines 46-47: var high_item : item_instance; high_item = item_list.max(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 357, lines 24-25: var item_index : index; item_index = sys.item_list.max_index(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 358, lines 3-4: var item_val : int; item_val = sys.item_list.max_value(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 358, lines 29-30: var low_item : item_instance; low_item = sys.item_list.min(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 358, lines 54-55: var item_index : index; item_index = sys.item_list.min_index(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 359, lines 23-24: var item_val : int; item_val = sys.item_list.min_value(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 359, lines 44-45: var s_list := {"A"; "B"; "C"; "D"}; var r_list := s_list.reverse() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 360, line 23: print packets.size() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 360, lines 46-47: var s_list : list of packet; s_list = packets.sort(it.f_1 + it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 361, lines 24-25: var s_list : list of packet; s_list = sys.packets.sort_by_field(length) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 361, line 55: var sl_hold := s_list.split(it.f_1 == 16) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 362, lines 20-21: var pk : packet; pk = sys.packets.top() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 362, lines 43-44: var pk : packet; pk = sys.packets.top0() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 363, lines 23-24: var u_list : list of l_item; u_list = sys.l_list.unique(it.f_1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 363, lines 45-46: var l_2 : list of packet; l_2 = sys.packets.all(it.length > 64) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 364, lines 24-25: var l_2 : list of int; l_2 = sys.packets.all_indices(it.length > 5) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 364, lines 54-55: var bool_val : bool; bool_val = m_list.and_all(it >= 1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 365, lines 23-24: var bool_val : bool; bool_val = m_list.or_all(it >= 100) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 365, lines 45-46: var list_ave : int; list_ave = sys.item_list.average(it.f_1 * it.f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 366, lines 24-25: var list_prod : int; list_prod = sys.item_list.product(it.f_1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 366, lines 48-49: var op_sum : int; op_sum = sys.instr_list.sum(.op1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 367, line 31: print b_data.crc_8(2, 4) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 368, line 10: print b_data.crc_32(2, 4) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 368, line 41: print b_data.crc_32_flip(2, 4) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 369, lines 22-25: var loc_list_item : location; var i_key : uint; i_key = 5; loc_list_item = locations.key(i_key) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 369, lines 47-48: var loc_list_ix : int; loc_list_ix = locations.key_index(i) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 370, lines 21-23: var loc_list_k : bool; var i := 5; loc_list_k = locations.key_exists(i) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 372, lines 18-21: init() is also { is_ok = TRUE; list_subs = {320; 330; 340; 350; 360}; list_color = {black; red; green; blue; yellow; white} } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 373, lines 2-4: run() is also { start monitor() } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 373, line 29: packet.quit() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 374, lines 3-5: do_print() is first { outf("Struct %s :", me.s) } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 374, lines 33-34: sys.pmi[0].print_line(sys.pmi[0]); sys.pmi[0].print_line(NULL) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 375, line 46: var pmv : packet = sys.pmi.copy() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 376, line 29: print pkts[0].to_string() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 378, line 29: var pmv : packet = deep_copy(sys.pmi) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 380, line 22: var diff : list of string = deep_compare(pmi[0], pmi[1], 100) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 380, line 40: var diff : list of string = deep_compare_physical(pmi[0], pmi[1], 100) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 381, line 19: print min((x + 5), y) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 381, line 38: print max((x + 5), y) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 381, line 55: print abs(x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 382, line 18: print odd(x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 382, line 37: print even(x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 382, line 55: print ilog2(x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 383, line 18: print ilog10(x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 383, line 37: print ipow(x, y) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 383, line 55: print isqrt(x) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 384, line 19: print div_round_up(x, y) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 385, line 3: print bitwise_and(b) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 385, line 23: print get_all_units(XYZ_channel) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 385, line 49: message = append(list1, " ", list2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 386, line 26: message = appendf("%4d\n %4d\n %4d\n", 255, 54, 1570) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 386, line 45: var my_string : string = bin(pi.i, " ", list1, " ", 8) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 387, line 20: var my_string : string = dec(pi.i, " ", list1, " ", 8) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 387, line 40: var my_string : string = hex(pi.i, " ", list1, " ", 8) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 388, line 3: out(quote(message)) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 388, line 23: var test_dir : string = str_chop(tmp_dir, 13) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 388, line 40: print str_empty(s1) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 389, line 21: var long : string = str_exactly("123", 6) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 389, line 39: var insensitive : string = str_insensitive("/hello.*/") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 390, line 3: var s := str_join(slist," - ") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 390, line 21: var length : int = str_len("hello") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 390, line 39: var lower : string = str_lower("UPPER") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 391, line 7: print str_match("ace", "/c(e)?$/") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 391, line 29: var s : string = str_pad("hello world", 14) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 392, line 3: var s : string = str_replace("crc32", "/(.*32)/", "32_flip") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 392, line 30: var s : list of string = str_split("first-second-third", "-") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 392, line 55: var s : list of string = str_split_all(" A B C", "/ +/") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 393, line 23: var dir : string = str_sub("/rtests/test32/tmp", 8, 6) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 393, line 40: var upper : string = str_upper("lower") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 394, line 20: out("pkts[1].data is ", pkts[1].data) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 394, line 49: outf("%s %#08x", "pkts[1].data[0] is ", pkts[1].data[0]) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 396, line 3: spawn("touch error.log && ", "grep Error my.elog >error.log") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 396, line 22: spawn_check("grep Error my.elog >& error.log") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 396, line 41: stub = system("cat my.v") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 397, line 3: log_list = output_from("ls *log") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 397, line 24: log_list = output_from_check("ls *.log") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 397, line 43: current_display = get_symbol("DISPLAY") Substituted "DISPLAY" for "PWD" because "PWD" is actually a shell variable, not an environment variable whereas "DISPLAY" is an environment variable. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 398, line 3: print date_time() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 398, line 20: print getpid() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 398, line 55: set_config(memory, gc_threshold, 100m) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 400, lines 15-16: var fv : string; fv = files.add_file_type("fname", ".e", FALSE) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 400, line 35: files.close(f_desc) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 400, line 55: files.flush(a_file) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 401, lines 33-34: var m_file : file; m_file = files.open("a_file.txt", "r", "Text File") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 401, line 55: r_b = files.read(f_desc, m_string) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 402, lines 21-23: var m_file : file = files.open("a_file.dat", "r", "Data"); var b_l : list of bit; b_l = files.read_lob(m_file, 32) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 403, line 3: files.write(m_file, "Test Procedure") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 403, lines 30-32: var m_file : file = files.open("a_f.dat", "w", "My data"); var b_l : list of bit; files.write_lob(m_file, b_l) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 404, lines 2-5: var m_file : file = files.open("a_f.txt", "w", "My data"); var m_i := new m_struct_s; writef(m_file, "Type: %s\tData: %s\n", m_i.s_type, m_i.data) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 404, lines 34-35: var f_data : int; f_data = files.file_age("f.txt") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 404, line 55: files.file_append(f_1, f_2) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 405, line 24: files.file_copy("file_1.txt", "tmp_file.txt") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 405, line 40: files.file_delete("run_1.log") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 406, lines 21-22: var f_e : bool; f_e = files.file_exists("file_1.e") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 406, lines 40-41: var f_ext : string; f_ext = files.file_extension("f_1.exa") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 407, lines 2-3: var is_d : bool; is_d = files.file_is_dir("a_fil") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 407, lines 23-24: var is_l : bool; is_l = files.file_is_link("a_fil") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 407, lines 43-44: var is_rd : bool; is_rd = files.file_is_readable("a_fil") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 408, lines 18-19: var is_rg : bool; is_rg = files.file_is_regular("a_fil") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 408, lines 37-38: var is_tmp : bool; is_tmp = files.file_is_temp("a_fil") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 409, lines 2-3: var is_txt : bool; is_txt = files.file_is_text("a_fil") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 409, line 26: files.file_rename("f_1.exa", "b_1.exa") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 409, lines 43-44: var f_s : int; f_s = files.file_size("a_file.txt") -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 410, lines 20-21: var t_name : string; t_name = files.new_temp_file() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 410, lines 47-48: var s_list := {"a string"; "another string"}; files.write_string_list("a_file.txt", s_list) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 411, lines 21-23: var a_str : s_struct; a_str = files.read_ascii_struct("a_s.out", "s_struct").as_a(s_struct) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 411, lines 53-55: var b_str : s_struct; b_str = files.read_binary_struct("b.out", "s_struct", TRUE).as_a(s_struct); -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 412, lines 37-38: files.write_ascii_struct("a_file.dat", a_str, "my_struct", TRUE, 2, 10) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 413, line 3: files.write_binary_struct("b_file.dat", b_str) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 435, lines 6-7: sem1.up(); sem1.down() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 435, lines 34-35: compute sem1.try_up(); compute sem1.try_down() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 436, lines 9-10: sem1.set_value(7); cur_value = sem1.get_value() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 436, lines 40-41: sem1.set_max_value(17); cur_max_value = sem1.get_max_value() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 437, lines 44-45: lckr.lock(); lckr.release() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 446, line 24: import top -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 446, lines 31-32: import a; import b -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 447, lines 12-13: import a; import b; import c import top -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 447, lines 35-55: top.e <' import a; import b '> a.e <' import top; #define A_SCANNED; type t_a : t_b // 't_a' definition presupposes 't_b' definition '> b.e <' #ifdef A_SCANNED { type t_b : int // 't_b' definition presupposes the C-like // define 'A_SCANNED' } '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 448, lines 15-49: a.e <' #define A_SCANNED; sys_add_field foo '> b.e <' #ifdef A_SCANNED { define "sys_add_field " as { extend sys { : int } } } '> c.e <' import b; import top '> top.e <' import a; import c '> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 449, lines 47-55: struct packet { legal : bool; when legal packet { pkt_msg() is { out("good packet") } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 450, lines 18-31: type packet_protocol : [Ethernet, IEEE, foreign]; struct packet { protocol : packet_protocol; size : int [0..1k]; data[size] : list of byte; show() is undefined // To be defined by children }; extend Ethernet packet { e_field : int; show() is { out("I am an Ethernet packet") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 450, lines 38-48: type Ethernet_op : [e1, e2, e3]; extend Ethernet packet { op : Ethernet_op }; extend e1 Ethernet packet { e1_foo : int; show() is { out("I am an e1 Ethernet packet") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft_6_080129.pdf, page 451, lines 34-42: struct packet { size : int [0..1k]; data[size] : list of byte; show() is undefined // To be defined by children }; struct Ethernet_packet like packet { e_field : int; show() is { out("I am an Ethernet packet") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 451, lines 45-48: struct IEEE_packet like packet { i_field : int; show() is { out("I am an IEEE packet") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 451, lines 52-55: struct e1_Ethernet_packet like Ethernet_packet { e1_foo : int; show() is { out("I am an e1 Ethernet packet") } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 453, lines 1-5: var pkt : packet; case protocol { Ethernet {var epkt : Ethernet packet; gen epkt; pkt = epkt}; IEEE {var ipkt : IEEE packet; gen ipkt; pkt = ipkt} } Please do not split this code across a page boundary. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 453, lines 13-16: keep protocol in [Ethernet, IEEE]; keep protocol != IEEE; keep soft protocol == select { 20 : IEEE; 80 : foreign }; keep packets.is_all_iterations(.protocol, ...) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 453, lines 21-22: keep me is an Ethernet_packet or me is an IEEE_packet // This pseudocode is not a legal constraint specification -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 453, lines 34-39: type packet_kind: [normal, ack, nack]; extend packet { kind : packet_kind; keep protocol == foreign => kind == normal }; extend normal packet { n1 : int } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 453, lines 45-51: struct normal_Ethernet_packet like Ethernet_packet { n1 : int }; struct ack_Ethernet_packet like Ethernet_packet { ... }; struct nack_Ethernet_packet like Ethernet_packet { ... }; struct normal_IEEE_packet like IEEE_packet { ... } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 454, lines 13-14: extend normal IEEE packet { ni_field : int }; // Adds a field extend ack e1 Ethernet packet { keep size == 0 } // Adds a constraint -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 454, line 28: extend sys { packets : list of packet } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 454, lines 37-38: pkt : packet; gen pkt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 454, lines 42-43: p : e1_Ethernet_packet; gen p -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 455, lines 1-4: extend packet_protocol : [brand_new]; extend brand_new packet { ...new struct members... } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 455, lines 27-37: type packet_protocol : [Ethernet, IEEE, foreign]; struct packet { protocol : packet_protocol; when Ethernet packet { e_field0 : int; e_field1 : int; e_field2 : int; e_field3 : int; // ... } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 455, lines 41-55: type packet_protocol : [Ethernet, IEEE, foreign]; struct Ethernet_packet { e_field0 : int; e_field1 : int; e_field2 : int; e_field3 : int; // ... }; struct packet { protocol : packet_protocol; when Ethernet packet { e_packet : Ethernet_packet } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 460, lines 38-51: m.e package B a.e package A; import m test.e import a -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 461, lines 12-25: a.e b.e c.e package A package B package C b_top.e package B; import a; import b; import c -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 462, lines 2-18: a1.e package A b.e a2.e package B; package A import a1 c1.e c2.e package C; package C; import b import a2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 463, lines 32-55: vr_xbus_*.e vr_xbus_*.e package vr_xbus; package vr_xbus; type vr_xbus_env_name_t : []; type env_name_t : []; unit vr_xbus_env_u { unit env_u { name : vr_xbus_env_name_t; name : env_name_t; monitor : vr_xbus_monitor_u monitor : monitor_u }; }; unit vr_xbus_monitor_u {...} unit monitor_u {...} vr_xserial_*.e vr_xserial_*.e package vr_xserial; package vr_xserial; type vr_xserial_env_name_t : []; type env_name_t : []; unit vr_xserial_env_u { unit env_u { name : vr_xserial_env_name_t; name : env_name_t; agent : vr_xserial_agent_u agent : agent_u is instance is instance }; }; unit agent_u {...} unit vr_xserial_agent_u {...} vr_xsoc_*.e vr_xsoc_*.e package vr_xsoc; package vr_xsoc; type env_name_t : []; type vr_xsoc_env_name_t : []; unit env_u { unit vr_xsoc_env_u { name : env_name_t; name : vr_xsoc_env_name_t; xbus_evc : vr_xbus::env_u; xbus_evc : vr_xbus_env_u; // No qualification would result xserial_A_evc : vr_serial_env_u; // in an ambiguity error xserial_B_evc : vr_serial_env_u xserial_A_evc : vr_serial::env_u; } xserial_B_evc : vr_serial::env_u } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 465, lines 17-39: print_struct(name: string) is { var s : rf_struct = rf_manager.get_type_by_name(name) .as_a(rf_struct); outf("struct - %s\n",s.get_name()); if s is a rf_like_struct (ls) then { outf("\t inherits from - %s\n", ls.get_supertype().get_name()) }; for each (f) in s.get_declared_fields() do { outf("\t field - %s: %s\n", f.get_name(), f.get_type().get_name()) }; for each (m) in s.get_declared_methods() do { outf("\t method - %s()\n",m.get_name()); for each (p) in m.get_parameters() do { outf("\t\t parameter - %s: %s\n", p.get_name(), p.get_type().get_name()) }; if m.get_result_type() != NULL then { outf("\t\t result type - %s\n", m.get_result_type().get_name()) } } } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 465, line 45 - page 466, line 21: file1.e type size_t : [big, medium, small]; struct packet { size : size_t; data : int (bits:256); foo(id:int, name:string) is empty }; extend sys { packets : list of packet; keep packets.size() > 3 and packets.size() < 7 } file2.e import file1.e; extend packet { corrupt : bool; foo(id:int, name:string) is also {}; bar(): int is empty } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 466, lines 30-49: print_user_modules() is { for each (m) in rf_manager.get_all_user_modules() do { outf("module - %s\n",m.get_name()); for each (tl) in m.get_type_layers() do { if tl is a rf_struct_layer (sl) then { outf("struct layer - %s\n", sl.get_defined_entity().get_name()); for each (fd) in sl.get_field_declarations() do { outf("\t\t field declaration - %s\n", fd.get_defined_entity().get_name()) }; for each (ml) in sl.get_method_layers() do { outf("\t\t method layer - %s (%s)\n", ml.get_defined_entity().get_name(), ml.as_a(rf_method_layer).get_method_kind() .to_string()) } } } } } Please do not split this code across a page break because of the nested matching braces. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P1647_Draft 6_080129.pdf, page 467, lines 19-42: print_struct_recursive(obj: any_struct) is { var s : rf_struct = rf_manager.get_struct_of_instance(obj); outf("instance of %s\n",s.get_name()); for each (f) in s.get_fields() do { if f.get_declaration().get_module().is_user_module() then { outf("field %s - ",f.get_name()); var vh : rf_value_holder = f.get_value(obj); if vh.get_type() is a rf_scalar (e) then { outf("%s",vh.get_type(). value_to_string(vh.get_value().unsafe())) } else if vh.get_type() is a rf_struct (s) then { print_struct_recursive(vh.get_value().unsafe()) } else if vh.get_type() is a rf_list (l) and l.get_element_type() is a rf_struct { outf("\n"); var size : int = rf_manager.get_list_size(vh.get_value()); for i from 0 to size-1 do { outf("%d: ",i); print_struct_recursive(rf_manager. get_list_element(vh,i).get_value().unsafe()) } }; outf("\n") } } }