Changeset 941 for branches/reconfiguration
- Timestamp:
- Feb 12, 2015, 2:59:19 PM (10 years ago)
- Location:
- branches/reconfiguration/platforms/tsar_generic_iob
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r935 r941 129 129 #include "vci_multi_tty.h" 130 130 #include "vci_multi_nic.h" 131 #include "vci_target_error.h" 131 132 #include "vci_simple_rom.h" 132 133 #include "vci_block_device_tsar.h" … … 186 187 187 188 #include "hard_config.h" 189 190 #define USE_NIC 0 188 191 189 192 //////////////////////////////////////////////////////////// … … 974 977 975 978 // Network Controller 979 #if USE_NIC 976 980 VciMultiNic<vci_param_ext>* mnic; 981 int nicMode = VciMultiNic<vci_param_ext>::NIC_MODE_SYNTHESIS; 977 982 mnic = new VciMultiNic<vci_param_ext>( "mnic", 978 983 IntTab(0, IOX_MNIC_TGT_ID), … … 981 986 0, // mac_4 address 982 987 0, // mac_2 address 983 1 ); // NIC_MODE_SYNTHESIS 988 nicMode ); 989 990 // Chained Buffer DMA controller 991 VciChbufDma<vci_param_ext>* cdma; 992 cdma = new VciChbufDma<vci_param_ext>( "cdma", 993 maptab_iox, 994 IntTab(0, CDMA_LOCAL_SRCID), 995 IntTab(0, IOX_CDMA_TGT_ID), 996 64, // burst size (bytes) 997 2*NB_NIC_CHANNELS ); 998 #else 999 VciTargetError<vci_param_ext> merror_nic( "merror_nic", 1000 IntTab(0, IOX_MNIC_TGT_ID), 1001 maptab_iox ); 1002 1003 VciTargetError<vci_param_ext> merror_dma( "merror_dma", 1004 IntTab(0, IOX_CDMA_TGT_ID), 1005 maptab_iox ); 1006 #endif 984 1007 985 1008 // Frame Buffer … … 1004 1027 0 ); // disk latency 1005 1028 1006 // Chained Buffer DMA controller1007 VciChbufDma<vci_param_ext>* cdma;1008 cdma = new VciChbufDma<vci_param_ext>( "cdma",1009 maptab_iox,1010 IntTab(0, CDMA_LOCAL_SRCID),1011 IntTab(0, IOX_CDMA_TGT_ID),1012 64, // burst size (bytes)1013 2*NB_NIC_CHANNELS );1014 1029 // Multi-TTY controller 1015 1030 std::vector<std::string> vect_names; … … 1252 1267 std::cout << " - FBUF connected" << std::endl; 1253 1268 1269 #if USE_NIC 1254 1270 // MNIC connexion 1255 1271 mnic->p_clk (signal_clk); … … 1261 1277 mnic->p_tx_irq[i] (signal_irq_mnic_tx[i]); 1262 1278 } 1263 1264 1279 std::cout << " - MNIC connected" << std::endl; 1280 1281 // CDMA connexion 1282 cdma->p_clk (signal_clk); 1283 cdma->p_resetn (signal_resetn); 1284 cdma->p_vci_target (signal_vci_tgt_cdma); 1285 cdma->p_vci_initiator (signal_vci_ini_cdma); 1286 for ( size_t i=0 ; i<(NB_NIC_CHANNELS*2) ; i++) 1287 { 1288 cdma->p_irq[i] (signal_irq_cdma[i]); 1289 } 1290 std::cout << " - CDMA connected" << std::endl; 1291 1292 #else 1293 merror_nic.p_clk (signal_clk); 1294 merror_nic.p_resetn (signal_resetn); 1295 merror_nic.p_vci (signal_vci_tgt_mnic); 1296 1297 merror_dma.p_clk (signal_clk); 1298 merror_dma.p_resetn (signal_resetn); 1299 merror_dma.p_vci (signal_vci_tgt_cdma); 1300 #endif 1265 1301 1266 1302 // MTTY connexion … … 1273 1309 } 1274 1310 std::cout << " - MTTY connected" << std::endl; 1275 1276 // CDMA connexion1277 cdma->p_clk (signal_clk);1278 cdma->p_resetn (signal_resetn);1279 cdma->p_vci_target (signal_vci_tgt_cdma);1280 cdma->p_vci_initiator (signal_vci_ini_cdma);1281 for ( size_t i=0 ; i<(NB_NIC_CHANNELS*2) ; i++)1282 {1283 cdma->p_irq[i] (signal_irq_cdma[i]);1284 }1285 1286 std::cout << " - CDMA connected" << std::endl;1287 1311 1288 1312 // IOPI connexion … … 1522 1546 } 1523 1547 1548 #if USE_NIC == 0 1549 for (int i = 0; i < NB_NIC_CHANNELS; i++) 1550 { 1551 signal_irq_mnic_rx[i].write(false); 1552 signal_irq_mnic_tx[i].write(false); 1553 } 1554 1555 signal_vci_ini_cdma.cmdval.write(false); 1556 signal_vci_ini_cdma.rspack.write(true); 1557 for (int i = 0; i < (NB_NIC_CHANNELS*2); i++) 1558 { 1559 signal_irq_cdma[i].write(false); 1560 } 1561 #endif 1562 1524 1563 sc_start(sc_core::sc_time(1, SC_NS)); 1525 1564 signal_resetn = true; … … 1653 1692 signal_vci_tgt_iob0.print_trace("[SIG]IOB0_IOX_TGT"); 1654 1693 1655 // cdma->print_trace(); 1656 // signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT"); 1657 // signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI"); 1658 1659 // mtty->print_trace(); 1660 // signal_vci_tgt_mtty.print_trace("[SIG]IOX_MTTY_TGT"); 1694 // mtty->print_trace(); 1695 // signal_vci_tgt_mtty.print_trace("[SIG]IOX_MTTY_TGT"); 1661 1696 1662 1697 bdev->print_trace(); … … 1664 1699 signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI"); 1665 1700 1666 mnic->print_trace(); 1667 signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT"); 1668 1669 // fbuf->print_trace(); 1670 // signal_vci_tgt_fbuf.print_trace("[SIG]FBUF"); 1701 // mnic->print_trace(); 1702 // signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT"); 1703 1704 // cdma->print_trace(); 1705 // signal_vci_tgt_cdma.print_trace("[SIG]IOX_CDMA_TGT"); 1706 // signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI"); 1707 1708 // fbuf->print_trace(); 1709 // signal_vci_tgt_fbuf.print_trace("[SIG]FBUF"); 1671 1710 1672 1711 iopi->print_trace(); -
branches/reconfiguration/platforms/tsar_generic_iob/top.desc
r926 r941 52 52 cell_size = vci_cell_size_ext), 53 53 54 # ERROR 55 Uses('caba:vci_target_error', 56 cell_size = vci_cell_size_ext), 57 54 58 # Chained DMA 55 59 Uses('caba:vci_chbuf_dma',
Note: See TracChangeset
for help on using the changeset viewer.