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

Subversion Repositories nlprg

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

powered by: WebSVN 2.1.0

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