Index: trunk/modules/vci_io_bridge/caba/metadata/vci_io_bridge.sd
===================================================================
--- trunk/modules/vci_io_bridge/caba/metadata/vci_io_bridge.sd	(revision 375)
+++ trunk/modules/vci_io_bridge/caba/metadata/vci_io_bridge.sd	(revision 434)
@@ -6,93 +6,61 @@
 Module('caba:vci_io_bridge',
 	classname = 'soclib::caba::VciIoBridge',
-	tmpl_parameters = [ 
-        parameter.Module('vci_param_d', default = 'caba:vci_param',
-                            cell_size   = parameter.Reference("cell_size_d"),
-                            plen_size   = parameter.Reference("plen_size_d"),
-                            addr_size   = parameter.Reference("addr_size_d"),
-                            rerror_size = parameter.Reference("rerror_size_d"),
-                            clen_size   = parameter.Reference("clen_size_d"),  
-                            rflag_size  = parameter.Reference("rflag_size_d"), 
-                            srcid_size  = parameter.Reference("srcid_size_d"),
-                            pktid_size  = parameter.Reference("pktid_size_d"),
-                            trdid_size  = parameter.Reference("trdid_size_d"),
-                            wrplen_size = parameter.Reference("wrplen_size_d")),
-	    parameter.Module('vci_param_x', default = 'caba:vci_param',
-                            cell_size   = parameter.Reference("cell_size_x"),
-                            plen_size   = parameter.Reference("plen_size_x"),
-                            addr_size   = parameter.Reference("addr_size_x"),
-                            rerror_size = parameter.Reference("rerror_size_x"),
-                            clen_size   = parameter.Reference("clen_size_x"),  
-                            rflag_size  = parameter.Reference("rflag_size_x"), 
-                            srcid_size  = parameter.Reference("srcid_size_x"),
-                            pktid_size  = parameter.Reference("pktid_size_x"),
-                            trdid_size  = parameter.Reference("trdid_size_x"),
-                            wrplen_size = parameter.Reference("wrplen_size_x")),
-        parameter.Module('vci_param_io', default = 'caba:vci_param', 
-                            cell_size   = parameter.Reference("cell_size_io"),
-                            plen_size   = parameter.Reference("plen_size_io"),
-                            addr_size   = parameter.Reference("addr_size_io"),
-                            rerror_size = parameter.Reference("rerror_size_io"),
-                            clen_size   = parameter.Reference("clen_size_io"),  
-                            rflag_size  = parameter.Reference("rflag_size_io"), 
-                            srcid_size  = parameter.Reference("srcid_size_io"),
-                            pktid_size  = parameter.Reference("pktid_size_io"),
-                            trdid_size  = parameter.Reference("trdid_size_io"),
-                            wrplen_size = parameter.Reference("wrplen_size_io")),
+
+	tmpl_parameters = [
+        parameter.Module('vci_param_int',
+                          default = 'caba:vci_param',
+                          cell_size = parameter.Reference('iob_cell_size_int')),
+	    parameter.Module('vci_param_ext',
+                          default = 'caba:vci_param',
+                          cell_size = parameter.Reference('iob_cell_size_ext')),
     ],
-	header_files =         [ '../source/include/vci_io_bridge.h',
-	                         '../source/include/transaction_tab_io.h'],
+
+	header_files =         [ 
+        '../source/include/vci_io_bridge.h',
+	    '../source/include/transaction_tab_io.h'
+    ],
+
 	implementation_files = [ '../source/src/vci_io_bridge.cpp' ],
+
 	uses = [ Uses('caba:base_module'),
-	         Uses('common:mapping_table'),
-	         Uses('caba:generic_fifo'),
-	         Uses('caba:generic_tlb', 
-                       addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
-                       parameter.Reference('addr_size'))),
- 	         Uses('common:address_decoding_table', 
-                       input_t  = 'unsigned long',
-                       output_t = 'bool'),
- 	         Uses('common:address_decoding_table', 
-                       input_t  = 'unsigned long',
-                       output_t = 'int'),
-#	         Uses('common:address_masking_table', 
-#                       data_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
-#                       parameter.Reference('addr_size'))),
-           ],
-	ports = [ Port('caba:vci_initiator', 'p_vci_ini_dma'),
-	          Port('caba:vci_target', 'p_vci_tgt_dma'),
-              Port('caba:vci_initiator', 'p_vci_ini_config'),
-	          Port('caba:vci_target', 'p_vci_tgt_config'),
-              Port('caba:vci_initiator', 'p_vci_ini_miss'),
-	          Port('caba:bit_in','p_irq', parameter.Reference('nb_periph')),
+	    Uses('common:mapping_table'),
+	    Uses('caba:generic_fifo'),
+	    Uses('caba:generic_tlb', 
+              addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
+              parameter.Reference('addr_size'))),
+ 	    Uses('common:address_decoding_table', 
+              input_t  = 'unsigned long',
+              output_t = 'bool'),
+ 	    Uses('common:address_decoding_table', 
+              input_t  = 'unsigned long',
+              output_t = 'int'),
+    ],
+
+	ports = [ 
+              Port('caba:vci_initiator', 'p_vci_ini_ram'),
+	          Port('caba:vci_target',    'p_vci_tgt_iox'),
+              Port('caba:vci_initiator', 'p_vci_ini_iox'),
+	          Port('caba:vci_target',    'p_vci_tgt_int'),
+              Port('caba:vci_initiator', 'p_vci_ini_int'),
+	          Port('caba:bit_in','p_irq', 32),
 	          Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
-	          Port('caba:clock_in', 'p_clk', auto = 'clock'), ],
-	instance_parameters = [ parameter.Int('nd_periph'),
-	                        parameter.Module('mtx', 'common:mapping_table'),
-	                        parameter.Module('mtd', 'common:mapping_table'),
-	                        parameter.Module('mtio', 'common:mapping_table'),
-	                        parameter.Module('seg_config_iob', 'common:segment'), 
-                            parameter.IntTab('tgt_index_iocluster'),
-#	                        parameter.IntTab('tgt_index_config'),
-	                        parameter.IntTab('init_index_direct'),
-	                        parameter.IntTab('tgt_index_iospace'),
-	                        parameter.IntTab('init_index_iospace'),
-	                        parameter.IntTab('init_index_dma'),
-    	                        parameter.Int('dcache_words'),
-    	                        parameter.Int('iotlb_ways'),
-    	                        parameter.Int('iotlb_sets'),
-    	                        parameter.Int('max_frozen_cycles'), ],
-	extensions = [ 'dsx:get_ident='
-                       'tgt_index_config:p_vci_tgt_config:mtd,'
-                       'init_index_direct:p_vci_init_miss:mtd,'
-                       'tgt_index_iospace:p_vci_tgt_dma:mtio,'
-                       'init_index_iospace:p_vci_init_config:mtio,'
-                       'init_index_dma:p_vci_ini_dma:mtx,'
-	               'dsx:cpu=wrapper:iss_t',
-	               'dsx:addressable=tgt_index_config,tgt_index_iospace',
-#                       'dsx:on_segment=mc:add_index:initiator_rw_index',
-	               ],
+	          Port('caba:clock_in', 'p_clk', auto = 'clock'), 
+    ],
 
-#       debug = True,
+    instance_parameters = [ 
+        parameter.Module('mt_ext', 'common:mapping_table'),
+        parameter.Module('mt_int', 'common:mapping_table'),
+        parameter.Module('mt_iox', 'common:mapping_table'),
+        parameter.IntTab('int_tgtid'),
+        parameter.IntTab('int_srcid'),
+        parameter.IntTab('iox_tgtid'),
+        parameter.IntTab('iox_srcid'),
+        parameter.IntTab('ext_srcid'),
+        parameter.Int('dcache_words'),
+        parameter.Int('iotlb_ways'),
+        parameter.Int('iotlb_sets'),
+        parameter.Int('debug_start_cycle'),
+        parameter.Bool('debug_ok'),
+    ],
 )
 
