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 38

Go to most recent revision | Details | Compare with Previous | View Log

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