OpenCores
URL https://opencores.org/ocsvn/nlprg/nlprg/trunk

Subversion Repositories nlprg

[/] [nlprg/] [trunk/] [nlprg/] [rtl/] [nlprg3.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 fra93
/*
2
 * Generated by Digital. Don't modify this file!
3
 * Any changes will be lost if this file is regenerated.
4
 */
5
 
6
module DIG_D_FF_AS_1bit
7
#(
8
    parameter Default = 0
9
)
10
(
11
   input Set,
12
   input D,
13
   input C,
14
   input Clr,
15
   output Q,
16
   output \~Q
17
);
18
    reg state;
19
 
20
    assign Q = state;
21
    assign \~Q  = ~state;
22
 
23
    always @ (posedge C or posedge Clr or posedge Set)
24
    begin
25
        if (Set)
26
            state <= 1'b1;
27
        else if (Clr)
28
            state <= 'h0;
29
        else
30
            state <= D;
31
    end
32
 
33
    initial begin
34
        state = Default;
35
    end
36
endmodule
37
 
38
module nlprg3 (
39
  input ck,
40
  input rst,
41
  output [2:0] o
42
);
43
  wire o1;
44
  wire s0;
45
  wire o0;
46
  wire o2;
47
  wire s1;
48
  DIG_D_FF_AS_1bit #(
49
    .Default(0)
50
  )
51
  DIG_D_FF_AS_1bit_i0 (
52
    .Set( 1'b0 ),
53
    .D( s0 ),
54
    .C( ck ),
55
    .Clr( rst ),
56
    .Q( o0 )
57
  );
58
  DIG_D_FF_AS_1bit #(
59
    .Default(0)
60
  )
61
  DIG_D_FF_AS_1bit_i1 (
62
    .Set( 1'b0 ),
63
    .D( o1 ),
64
    .C( ck ),
65
    .Clr( rst ),
66
    .Q( o2 )
67
  );
68
  DIG_D_FF_AS_1bit #(
69
    .Default(0)
70
  )
71
  DIG_D_FF_AS_1bit_i2 (
72
    .Set( 1'b0 ),
73
    .D( s1 ),
74
    .C( ck ),
75
    .Clr( rst ),
76
    .Q( o1 )
77
  );
78
  assign s0 = ~ ((o1 ^ o2) ^ o1);
79
  assign s1 = (~ (o1 ^ o0) ^ ~ (o2 | o1));
80
  assign o[0] = o0;
81
  assign o[1] = o1;
82
  assign o[2] = o2;
83
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.