1 | |
---|
2 | # -*- python -*- |
---|
3 | |
---|
4 | Module('caba:vci_spi', |
---|
5 | classname = 'soclib::caba::VciSpi', |
---|
6 | |
---|
7 | tmpl_parameters = [ |
---|
8 | parameter.Module('vci_param', default = 'caba:vci_param'), |
---|
9 | ], |
---|
10 | |
---|
11 | header_files = [ |
---|
12 | '../source/include/vci_spi.h', |
---|
13 | ], |
---|
14 | |
---|
15 | interface_files = [ |
---|
16 | '../../include/soclib/vcispi.h', |
---|
17 | ], |
---|
18 | |
---|
19 | implementation_files = [ |
---|
20 | '../source/src/vci_spi.cpp', |
---|
21 | ], |
---|
22 | |
---|
23 | ports = [ |
---|
24 | Port('caba:vci_target', 'p_vci_target'), |
---|
25 | Port('caba:vci_initiator', 'p_vci_initiator'), |
---|
26 | Port('caba:bit_out', 'p_irq'), |
---|
27 | Port('caba:bit_out', 'p_spi_clk'), |
---|
28 | Port('caba:bit_out', 'p_spi_ss'), |
---|
29 | Port('caba:bit_out', 'p_spi_mosi'), |
---|
30 | Port('caba:bit_in', 'p_spi_miso'), |
---|
31 | Port('caba:bit_in', 'p_resetn', auto = 'resetn'), |
---|
32 | Port('caba:clock_in', 'p_clk', auto = 'clock'), |
---|
33 | ], |
---|
34 | |
---|
35 | uses = [ |
---|
36 | Uses('caba:base_module'), |
---|
37 | Uses('common:mapping_table'), |
---|
38 | Uses('caba:generic_fifo'), |
---|
39 | ], |
---|
40 | |
---|
41 | instance_parameters = [ |
---|
42 | parameter.Module('mt', typename = 'common:mapping_table', auto = 'env:mapping_table'), |
---|
43 | parameter.IntTab('srcid'), |
---|
44 | parameter.IntTab('tgtid'), |
---|
45 | parameter.Int('burst_size'), |
---|
46 | ], |
---|
47 | |
---|
48 | extensions = [ |
---|
49 | 'dsx:addressable=tgtid', |
---|
50 | 'dsx:max_segments=1', |
---|
51 | 'dsx:get_ident=tgtid:p_vci_target:mt,srcid:p_vci_initiator:mt', |
---|
52 | ], |
---|
53 | ) |
---|