- Timestamp:
- Nov 11, 2014, 6:53:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
r859 r875 5 5 // Date : august 2013 6 6 // This program is released under the GNU public license 7 // 8 // Modified by: Cesar Fuguet 7 9 /////////////////////////////////////////////////////////////////////////////// 8 10 // This file define a generic TSAR architecture with an IO network emulating … … 15 17 // - BDEV : Dlock Device controler (one channel) 16 18 // - IOPI : HWI to SWI translator. 19 // - SIMH : Simulation Helper 17 20 // 18 21 // The internal physical address space is 40 bits, and the cluster index … … 37 40 // The external peripherals HWI IRQs are translated to WTI IRQs by the 38 41 // external IOPIC component, that must be configured by the OS to route 39 // these WTI I TQS to one or several internal XICU components.42 // these WTI IRQS to one or several internal XICU components. 40 43 // - IOPIC HWI[1:0] connected to IRQ_NIC_RX[1:0] 41 44 // - IOPIC HWI[3:2] connected to IRQ_NIC_TX[1:0] 42 45 // - IOPIC HWI[7:4] connected to IRQ_CMA_TX[3:0]] 43 46 // - IOPIC HWI[8] connected to IRQ_BDEV 44 // - IOPIC HWI[9] connected to IRQ_TTY_RX[0] 45 // - IOPIC HWI[31:9] unused (grounded) 47 // - IOPIC HWI[31:16] connected to IRQ_TTY_RX[15:0] 46 48 // 47 49 // Besides the external peripherals, each cluster contains one XICU component, … … 78 80 // - Y_SIZE : number of clusters in a column 79 81 // - NB_PROCS_MAX : number of processors per cluster (power of 2) 80 // - NB_TTY_CHANNELS : number of TTY channels in I/O network ( must be 1)82 // - NB_TTY_CHANNELS : number of TTY channels in I/O network (up to 16) 81 83 // - NB_NIC_CHANNELS : number of NIC channels in I/O network (up to 2) 82 84 // - NB_CMA_CHANNELS : number of CMA channels in I/O network (up to 4) … … 241 243 // All initiators are in the same indexing space (14 bits). 242 244 // The SRCID is structured in two fields: 243 // - The 10MSB bits define the cluster index (left aligned)244 // - The 4LSB bits define the local index.245 // - The 8 MSB bits define the cluster index (left aligned) 246 // - The 6 LSB bits define the local index. 245 247 // Two different initiators cannot have the same SRCID, but a given 246 248 // initiator can have two alias SRCIDs: … … 467 469 "The Y_SIZE parameter cannot be larger than 16" ); 468 470 469 assert( (NB_PROCS_MAX <= 8) and470 " The NB_PROCS_MAX parameter cannot be larger than 8" );471 assert( (NB_PROCS_MAX <= (1 << P_WIDTH)) and 472 "NB_PROCS_MAX parameter cannot be larger than 2^P_WIDTH" ); 471 473 472 474 assert( (NB_DMA_CHANNELS <= 4) and 473 475 "The NB_DMA_CHANNELS parameter cannot be larger than 4" ); 474 476 475 assert( (NB_TTY_CHANNELS == 1) and476 "The NB_TTY_CHANNELS parameter must be 1" );477 assert( (NB_TTY_CHANNELS >= 1) and (NB_TTY_CHANNELS <= 16) and 478 "The NB_TTY_CHANNELS parameter cannot be larger than 16" ); 477 479 478 480 assert( (NB_NIC_CHANNELS == 2) and … … 829 831 sc_signal<bool> signal_irq_false; 830 832 sc_signal<bool> signal_irq_bdev; 831 sc_signal<bool> signal_irq_mtty_rx ;833 sc_signal<bool> signal_irq_mtty_rx[NB_TTY_CHANNELS]; 832 834 sc_signal<bool> signal_irq_mnic_rx[NB_NIC_CHANNELS]; 833 835 sc_signal<bool> signal_irq_mnic_tx[NB_NIC_CHANNELS]; … … 1195 1197 mtty->p_resetn (signal_resetn); 1196 1198 mtty->p_vci (signal_vci_tgt_mtty); 1197 mtty->p_irq[0] (signal_irq_mtty_rx); 1198 1199 for ( size_t i=0 ; i<NB_TTY_CHANNELS ; i++ ) 1200 { 1201 mtty->p_irq[i] (signal_irq_mtty_rx[i]); 1202 } 1199 1203 std::cout << " - MTTY connected" << std::endl; 1200 1204 … … 1224 1228 else if(i < 4+NB_CMA_CHANNELS) iopi->p_hwi[i] (signal_irq_cdma[i-4]); 1225 1229 else if(i < 8) iopi->p_hwi[i] (signal_irq_false); 1226 else if(i == 8) iopi->p_hwi[i] (signal_irq_bdev); 1227 else if(i == 9) iopi->p_hwi[i] (signal_irq_mtty_rx); 1230 else if(i < 9) iopi->p_hwi[i] (signal_irq_bdev); 1231 else if(i < 16) iopi->p_hwi[i] (signal_irq_false); 1232 else if(i < 16+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]); 1228 1233 else iopi->p_hwi[i] (signal_irq_false); 1229 1234 } … … 1588 1593 // interrupts 1589 1594 if (signal_irq_bdev) std::cout << "### IRQ_BDEV ACTIVE" << std::endl; 1590 if (signal_irq_mtty_rx )std::cout << "### IRQ_MTTY ACTIVE" << std::endl;1595 if (signal_irq_mtty_rx[0]) std::cout << "### IRQ_MTTY ACTIVE" << std::endl; 1591 1596 if (signal_irq_mnic_rx[0]) std::cout << "### IRQ_MNIC_RX[0] ACTIVE" << std::endl; 1592 1597 if (signal_irq_mnic_rx[1]) std::cout << "### IRQ_MNIC_RX[1] ACTIVE" << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.