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

Subversion Repositories nlprg

[/] [nlprg/] [trunk/] [nlprg/] [rtl/] [nlprg5.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 nlprg5 (
39
  input ck,
40
  input rst,
41
  output [4:0] o
42
);
43
  wire o0;
44
  wire o1;
45
  wire o2;
46
  wire o3;
47
  wire o4;
48
  wire s0;
49
  wire s1;
50
  wire s2;
51
  DIG_D_FF_AS_1bit #(
52
    .Default(0)
53
  )
54
  DIG_D_FF_AS_1bit_i0 (
55
    .Set( 1'b0 ),
56
    .D( s0 ),
57
    .C( ck ),
58
    .Clr( rst ),
59
    .Q( o0 )
60
  );
61
  DIG_D_FF_AS_1bit #(
62
    .Default(0)
63
  )
64
  DIG_D_FF_AS_1bit_i1 (
65
    .Set( 1'b0 ),
66
    .D( s1 ),
67
    .C( ck ),
68
    .Clr( rst ),
69
    .Q( o2 )
70
  );
71
  DIG_D_FF_AS_1bit #(
72
    .Default(0)
73
  )
74
  DIG_D_FF_AS_1bit_i2 (
75
    .Set( 1'b0 ),
76
    .D( s2 ),
77
    .C( ck ),
78
    .Clr( rst ),
79
    .Q( o1 )
80
  );
81
  DIG_D_FF_AS_1bit #(
82
    .Default(0)
83
  )
84
  DIG_D_FF_AS_1bit_i3 (
85
    .Set( 1'b0 ),
86
    .D( o2 ),
87
    .C( ck ),
88
    .Clr( rst ),
89
    .Q( o3 )
90
  );
91
  DIG_D_FF_AS_1bit #(
92
    .Default(0)
93
  )
94
  DIG_D_FF_AS_1bit_i4 (
95
    .Set( 1'b0 ),
96
    .D( o3 ),
97
    .C( ck ),
98
    .Clr( rst ),
99
    .Q( o4 )
100
  );
101
  assign o[0] = o0;
102
  assign o[1] = o1;
103
  assign o[2] = o2;
104
  assign o[3] = o3;
105
  assign o[4] = o4;
106
  assign s0 = ~ ((o2 ^ o4) ^ o2);
107
  assign s2 = ((o3 ^ o4) ^ o0);
108
  assign s1 = (~ (o2 ^ o1) ^ (o0 & (~ (o4 | o3) & ~ o2)));
109
endmodule

powered by: WebSVN 2.1.0

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