OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [perl_gui/] [lib/] [ip/] [Timer/] [timer.IP] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 25 alirezamon
#######################################################################
2
##      File: timer.IP
3
##
4 48 alirezamon
##      Copyright (C) 2014-2019  Alireza Monemi
5 25 alirezamon
##
6 48 alirezamon
##      This file is part of ProNoC 1.9.1
7 25 alirezamon
##
8
##      WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT
9
##      MAY CAUSE UNEXPECTED BEHAIVOR.
10
################################################################################
11
 
12 48 alirezamon
$ipgen = bless( {
13 25 alirezamon
                  'plugs' => {
14 48 alirezamon
                               'wb_slave' => {
15
                                               'wb_slave' => {},
16
                                               'type' => 'num',
17
                                               'value' => 1,
18
                                               '0' => {
19
                                                        'addr' => '0x9600_0000  0x96ff_ffff             PWM/Timer/Counter Ctrl',
20
                                                        'name' => 'wb',
21
                                                        'width' => 5
22
                                                      }
23
                                             },
24 38 alirezamon
                               'interrupt_peripheral' => {
25
                                                           'value' => 1,
26
                                                           '0' => {
27
                                                                    'name' => 'intrp'
28 48 alirezamon
                                                                  },
29
                                                           'type' => 'num',
30
                                                           'interrupt_peripheral' => {}
31 38 alirezamon
                                                         },
32 25 alirezamon
                               'reset' => {
33 48 alirezamon
                                            'type' => 'num',
34 25 alirezamon
                                            'value' => 1,
35
                                            '0' => {
36
                                                     'name' => 'reset'
37
                                                   },
38 48 alirezamon
                                            'reset' => {}
39 25 alirezamon
                                          },
40
                               'clk' => {
41 38 alirezamon
                                          'type' => 'num',
42 48 alirezamon
                                          'value' => 1,
43 25 alirezamon
                                          '0' => {
44
                                                   'name' => 'clk'
45
                                                 },
46 48 alirezamon
                                          'clk' => {}
47 38 alirezamon
                                        }
48 25 alirezamon
                             },
49 48 alirezamon
                  'description' => 'A simple, general purpose, Wishbone bus-based, 32-bit timer.',
50
                  'file_name' => 'mpsoc/rtl/src_peripheral/timer/timer.v',
51
                  'module_name' => 'timer',
52
                  'parameters_order' => [
53
                                          'CNTw',
54
                                          'Dw',
55
                                          'Aw',
56
                                          'TAGw',
57
                                          'SELw',
58
                                          'PRESCALER_WIDTH'
59
                                        ],
60 25 alirezamon
                  'ports' => {
61 48 alirezamon
                               'sa_err_o' => {
62
                                               'intfc_port' => 'err_o',
63
                                               'range' => '',
64
                                               'intfc_name' => 'plug:wb_slave[0]',
65
                                               'type' => 'output'
66
                                             },
67
                               'sa_rty_o' => {
68
                                               'intfc_port' => 'rty_o',
69
                                               'range' => '',
70
                                               'intfc_name' => 'plug:wb_slave[0]',
71
                                               'type' => 'output'
72
                                             },
73
                               'sa_dat_o' => {
74
                                               'intfc_port' => 'dat_o',
75
                                               'intfc_name' => 'plug:wb_slave[0]',
76
                                               'range' => 'Dw-1       :   0',
77
                                               'type' => 'output'
78
                                             },
79
                               'sa_sel_i' => {
80
                                               'intfc_name' => 'plug:wb_slave[0]',
81
                                               'range' => 'SELw-1     :   0',
82
                                               'intfc_port' => 'sel_i',
83
                                               'type' => 'input'
84
                                             },
85 38 alirezamon
                               'sa_we_i' => {
86 48 alirezamon
                                              'range' => '',
87 38 alirezamon
                                              'intfc_name' => 'plug:wb_slave[0]',
88
                                              'intfc_port' => 'we_i',
89 48 alirezamon
                                              'type' => 'input'
90 38 alirezamon
                                            },
91 48 alirezamon
                               'sa_cyc_i' => {
92 38 alirezamon
                                               'type' => 'input',
93
                                               'range' => '',
94 48 alirezamon
                                               'intfc_name' => 'plug:wb_slave[0]',
95
                                               'intfc_port' => 'cyc_i'
96 25 alirezamon
                                             },
97 38 alirezamon
                               'irq' => {
98
                                          'intfc_name' => 'plug:interrupt_peripheral[0]',
99
                                          'range' => '',
100 48 alirezamon
                                          'intfc_port' => 'int_o',
101
                                          'type' => 'output'
102 38 alirezamon
                                        },
103 48 alirezamon
                               'sa_tag_i' => {
104
                                               'intfc_port' => 'tag_i',
105
                                               'intfc_name' => 'plug:wb_slave[0]',
106
                                               'range' => 'TAGw-1     :   0',
107
                                               'type' => 'input'
108
                                             },
109 38 alirezamon
                               'reset' => {
110 48 alirezamon
                                            'type' => 'input',
111
                                            'intfc_port' => 'reset_i',
112 38 alirezamon
                                            'intfc_name' => 'plug:reset[0]',
113 48 alirezamon
                                            'range' => ''
114 38 alirezamon
                                          },
115 48 alirezamon
                               'sa_addr_i' => {
116
                                                'range' => 'Aw-1       :   0',
117
                                                'intfc_name' => 'plug:wb_slave[0]',
118
                                                'intfc_port' => 'adr_i',
119
                                                'type' => 'input'
120
                                              },
121 25 alirezamon
                               'clk' => {
122 48 alirezamon
                                          'type' => 'input',
123 25 alirezamon
                                          'intfc_port' => 'clk_i',
124
                                          'range' => '',
125 38 alirezamon
                                          'intfc_name' => 'plug:clk[0]'
126 25 alirezamon
                                        },
127 48 alirezamon
                               'sa_dat_i' => {
128 25 alirezamon
                                               'intfc_name' => 'plug:wb_slave[0]',
129 38 alirezamon
                                               'range' => 'Dw-1       :   0',
130 48 alirezamon
                                               'intfc_port' => 'dat_i',
131
                                               'type' => 'input'
132 25 alirezamon
                                             },
133 48 alirezamon
                               'sa_stb_i' => {
134
                                               'range' => '',
135
                                               'intfc_name' => 'plug:wb_slave[0]',
136
                                               'intfc_port' => 'stb_i',
137
                                               'type' => 'input'
138
                                             },
139 38 alirezamon
                               'sa_ack_o' => {
140 48 alirezamon
                                               'type' => 'output',
141 25 alirezamon
                                               'intfc_name' => 'plug:wb_slave[0]',
142
                                               'range' => '',
143 38 alirezamon
                                               'intfc_port' => 'ack_o'
144 25 alirezamon
                                             }
145
                             },
146 38 alirezamon
                  'modules' => {
147
                                 'timer' => {}
148
                               },
149
                  'ip_name' => 'timer',
150 48 alirezamon
                  'description_pdf' => '/mpsoc/rtl/src_peripheral/timer/timer.pdf',
151
                  'version' => 12,
152
                  'system_h' => '#define ${IP}_TCSR                             (*((volatile unsigned int *) ($BASE     )))
153
 
154
/*
155
//timer control register
156
TCSR
157
bit
158
PRESCALER WIDTH+3:4     :       clk_dev_ctrl
159
3               :       timer_isr
160
2               :       rst_on_cmp_value
161
1               :       int_enble_on_cmp_value
162
 
163
*/
164
        #define ${IP}_TLR                               (*((volatile unsigned int *) ($BASE+4   )))
165
        #define ${IP}_TCMR                              (*((volatile unsigned int *) ($BASE+8   )))
166
        #define ${IP}_EN                                (1 << 0)
167
        #define ${IP}_INT_EN                            (1 << 1)
168
        #define ${IP}_RST_ON_CMP                        (1 << 2)
169
//Initialize the timer. Enable the timer, reset on compare value, and interrupt
170
        static inline void ${IP}_int_init ( unsigned int compare ){
171
                ${IP}_TCMR      =       compare;
172
                ${IP}_TCSR   =  ( ${IP}_EN | ${IP}_INT_EN | ${IP}_RST_ON_CMP);
173
        }
174
 
175
#define ${IP}_start()  ${IP}_TCSR|=${IP}_EN
176
#define ${IP}_stop()  ${IP}_TCSR&=~${IP}_EN
177
#define ${IP}_reset() ${IP}_TLR=0
178
#define ${IP}_read() ${IP}_TLR',
179
                  'hdl_files' => [
180
                                   '/mpsoc/rtl/src_peripheral/timer/timer.v'
181
                                 ],
182
                  'parameters' => {
183
                                    'CNTw' => {
184
                                                'info' => undef,
185
                                                'redefine_param' => 1,
186
                                                'content' => '',
187
                                                'global_param' => 'Localparam',
188
                                                'default' => '32     ',
189
                                                'type' => 'Fixed'
190
                                              },
191
                                    'TAGw' => {
192
                                                'global_param' => 'Localparam',
193
                                                'type' => 'Fixed',
194
                                                'default' => '3',
195
                                                'info' => undef,
196
                                                'redefine_param' => 1,
197
                                                'content' => ''
198
                                              },
199
                                    'SELw' => {
200
                                                'global_param' => 'Localparam',
201
                                                'default' => '4',
202
                                                'type' => 'Fixed',
203
                                                'content' => '',
204
                                                'info' => undef,
205
                                                'redefine_param' => 1
206
                                              },
207
                                    'PRESCALER_WIDTH' => {
208
                                                           'info' => ' The prescaler  timer width. The prescaler takes the basic timer clock frequency and divides it by some value before feeding it to the timer, according to how the prescaler register(s) are configured.
209
 
210
 
211
',
212
                                                           'redefine_param' => 1,
213
                                                           'content' => '1,32,1',
214
                                                           'global_param' => 'Localparam',
215
                                                           'type' => 'Spin-button',
216
                                                           'default' => '8'
217
                                                         },
218
                                    'Aw' => {
219
                                              'info' => undef,
220
                                              'redefine_param' => 1,
221
                                              'content' => '',
222
                                              'global_param' => 'Localparam',
223
                                              'type' => 'Fixed',
224
                                              'default' => '3'
225
                                            },
226
                                    'Dw' => {
227
                                              'content' => '',
228
                                              'info' => undef,
229
                                              'redefine_param' => 1,
230
                                              'global_param' => 'Localparam',
231
                                              'default' => '32',
232
                                              'type' => 'Fixed'
233
                                            }
234
                                  },
235
                  'category' => 'Timer',
236
                  'sockets' => {},
237
                  'gui_status' => {
238
                                    'timeout' => 0,
239
                                    'status' => 'ideal'
240
                                  },
241
                  'unused' => {
242
                                'plug:wb_slave[0]' => [
243
                                                        'bte_i',
244
                                                        'cti_i'
245
                                                      ]
246
                              }
247 25 alirezamon
                }, 'ip_gen' );

powered by: WebSVN 2.1.0

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