BTF - B13 - Indexed part selects proposal

From: Adam Krolnik (adamk@cyrix.com)
Date: Fri Aug 28 1998 - 01:59:52 PDT


Yet Another version of this proposal.

Example code:

Example 1. Indexed part select in procedural code.

task update_longword;
  inout[63:0] long;
  input[2:0] byte_index;
  input[7:0] byte;
  begin
  long[7+8*byte_index:8*byte_index] = byte;
  end
endtask

<p>Example 2. Indexed part select in a continuous assignment.

wire [0:63] data;
wire [0:2] select;
wire [0:7] muxed_byte = data[{select, 3'b0}: {select, 3'b0} + 7];

Changes:

Net continuous assignments shall not allow indexed part-selects as lvalues for
assignments.
  Added changes to Table 6-1 and Section 9.2.
  Removed BNF specification for net_lvalue.

[Only added for Stu - I don't care! These statements to me are equivalent:

wire [15:0] data;
assign data[8*side+7:8*side] = newdata[7:0]; // Form 1.

assign data = side ? {newdata[7:0], data[7:0]} : {data[15:8], newdata[7:0]}; //Form2
]

       Adam Krolnik
       Verification Engineer
       Cyrix - NSC.
       Richardson TX. 75085

[An attachment was originally included here]

 
<x-rich>

Yet Another version of this proposal.

<p>Example code:

<p>Example 1. Indexed part select in procedural code.

<p>task update_longword;

  inout[63:0] long;

  input[2:0] byte_index;

  input[7:0] byte;

  begin

  long[7+8*byte_index:8*byte_index] = byte;

  end

endtask

<p><p>Example 2. Indexed part select in a continuous assignment.

<p>wire [0:63] data;

wire [0:2] select;

wire [0:7] muxed_byte = data[select, 3'b0: select, 3'b0 + 7];

<p>Changes:

<p>Net continuous assignments shall not allow indexed part-selects as lvalues for

assignments.

  Added changes to Table 6-1 and Section 9.2.

  Removed BNF specification for net_lvalue.

<p>[Only added for Stu - I don't care! These statements to me are equivalent:

<p>wire [15:0] data;

assign data[8*side+7:8*side] = newdata[7:0]; // Form 1.

<p>assign data = side ? newdata[7:0], data[7:0] : data[15:8], newdata[7:0]; //Form2

]

<p> Adam Krolnik

       Verification Engineer

       Cyrix - NSC.

       Richardson TX. 75085

<p></x-rich>

Attachment Converted: "E:\INCOMING\B13_mutable_part_selects-396-122.htm"



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:52:59 PDT and
sponsored by Boyd Technology, Inc.