~ubuntu-branches/ubuntu/wily/acl2/wily

« back to all changes in this revision

Viewing changes to books/centaur/vl/failtest/bigwire1.v

  • Committer: Package Import Robot
  • Author(s): Camm Maguire
  • Date: 2015-01-16 10:35:45 UTC
  • mfrom: (3.3.26 sid)
  • Revision ID: package-import@ubuntu.com-20150116103545-prehe9thgo79o8w8
Tags: 7.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module top ;
 
2
 
 
3
  wire o, a;
 
4
  sub #(1) mysub (o, a);
 
5
 
 
6
endmodule
 
7
 
 
8
module sub (o, a);
 
9
  parameter size = 4;
 
10
  localparam sizedec = size - 2;
 
11
  output o;
 
12
  input  a;
 
13
 
 
14
  // NCV/VCS seem to handle negative indices in some smarter way.
 
15
  // The spec is unclear about what to do here, but we think this
 
16
  // should be a huge wire.
 
17
  wire [sizedec:0] oops = 0; // the spec is unclear but we think this is a huge wire
 
18
  assign oops = a;
 
19
 
 
20
 
 
21
/*
 
22
  initial begin
 
23
    $display("Sizedec is %b", sizedec);           // NCV: 11111111111111111111111111111111
 
24
    $display("Oops is %b", oops);                 // NCV: XX
 
25
    $display("Sizeof oops is %d", $bits(oops));   // NCV: 2
 
26
  end
 
27
 */
 
28
 
 
29
 
 
30
endmodule