Changeset 875
- Timestamp:
- Nov 11, 2014, 6:53:54 PM (10 years ago)
- Location:
- branches/reconfiguration/platforms/tsar_generic_iob
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/scripts/arch.py
r858 r875 24 24 # - y_size : number of clusters in a column 25 25 # - nb_procs : number of processors per cluster 26 # - nb_ttys : number of TTY channels 26 27 # - fbf_width : frame_buffer width = frame_buffer heigth 27 28 # 28 29 # The "hidden" parameters (defined below) are: 29 # - NB_TTYS : number of TTY channels30 30 # - NB_NICS : number of NIC channels 31 31 # - X_IO : cluster_io x coordinate … … 44 44 # define architecture constants 45 45 PADDR_WIDTH = 40 46 NB_TTYS = 147 46 NB_NICS = 2 48 47 FBF_WIDTH = 128 … … 69 68 y_size=2, 70 69 nb_procs=4, 70 nb_ttys=1, 71 71 fbf_width=FBF_WIDTH): 72 72 """This function describes the tsar_generic_iob platform and defines its … … 82 82 (y_size == 16)) 83 83 84 assert NB_TTYS == 184 assert ((nb_ttys >= 1) and (nb_ttys <= 16)) 85 85 86 86 assert (((X_IO == 0) and (Y_IO == 0)) or … … 160 160 161 161 mapping.addPeriph('TTY', base=tty_base, size=tty_size, 162 ptype='TTY', channels= NB_TTYS)162 ptype='TTY', channels=nb_ttys) 163 163 164 164 mapping.addPeriph('NIC', base=nic_base, size=nic_size, … … 186 186 mapping.addIrq(pic, index=7, isrtype='ISR_CMA', channel=3) 187 187 mapping.addIrq(pic, index=8, isrtype='ISR_BDV', channel=0) 188 mapping.addIrq(pic, index=9, isrtype='ISR_TTY_RX', channel=0) 188 189 for i in xrange(nb_ttys): 190 mapping.addIrq(pic, index=16+i, isrtype='ISR_TTY_RX', channel=i) 189 191 190 192 # hardware components replicated in all clusters -
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.