Re: Examples to include for B13 - Indexed Parts Select

From: Adam Krolnik (adamk@cyrix.com)
Date: Mon Jul 27 1998 - 20:59:03 PDT


Anders writes:
>Do you think you could include an example in the proposal
>prior to the call. I think it would be easier to get it

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];

<p><p> Adam Krolnik
    Verification Engineer
    Cyrix - NSC.
    Richardson TX. 75085
     



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