Changeset 1053 for trunk/platforms


Ignore:
Timestamp:
Sep 15, 2017, 12:32:44 AM (7 years ago)
Author:
alain
Message:

Replace the "vci_mlti_tty" component by the "vci_tty_tsar" component,
in yje tsar_generic_iob platform.
This new component povide two IRQs per channel:

  • RX_IRQ, when the read buffer is non-empty
  • TX_IRQ, when the write buffer is not full.

The new tsar_generic_iob platform supports up to 8 TTY channels.
The new vci_tty_tsar component is stored in the TSAR SVN.

Location:
trunk/platforms/tsar_generic_iob
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_iob/arch_info.py

    r1051 r1053  
    99#########################################################################################
    1010#  This python script defines a specific instance of "tsar_generic_iob" architecture
    11 #  for the ALMOS-MK operating system. It is used to generate the "hard_config.h"
    12 #  and the "arch_info.bin files, used by bthe ALMOS-MK bootloader.
     11#  for the ALMOS-MKH operating system. It is used to generate the "hard_config.h" file,
     12#  used to configure the hardware architecture, and the "arch_info.bin" file, used by
     13#  the ALMOS-MK bootloader.
    1314#
    1415#  The constructor prototype format is imposed by the genarch.py application,
     
    3132#  - fbf_width      : frame_buffer width = frame_buffer heigth
    3233#  - ioc_type       : can be 'IOC_BDV','IOC_HBA','IOC_SDC', 'IOC_SPI','NONE'
    33 #  - io_cxy         : IO cluster identifier
    34 #  - boot_cxy       : boot cluster identifier
    35 #  - cache_line     : number of bytes in cache line (in 16,32,64)
    3634#
    3735#  The following parameters are imposed by the "tsar_generic_iob" architecture:
     
    4240#  - p_width        : number of bits for local processor index
    4341#  - irqs_per_core  : number of input IRQs per processor
     42#  - io_cxy         : IO cluster identifier
     43#  - boot_cxy       : boot cluster identifier
     44#  - cache_line     : number of bytes in cache line (in 16,32,64)
    4445########################################################################################
    4546
     
    5152          nb_nics       = 1,
    5253          fbf_width     = 128,
    53           ioc_type      = 'IOC_BDV',
    54           io_cxy        = 0,
    55           boot_cxy      = 0,
    56           cache_line    = 64):
     54          ioc_type      = 'IOC_BDV'):
    5755
    5856    ### architecture constants
     
    6462    irqs_per_core = 4           
    6563    devices_max   = 16 
     64    boot_cxy      = 0
     65    cache_line    = 64
     66    io_cxy        = ((x_size-1)<<y_width) + (y_size-1)   # upper right cluster
    6667
    6768    ### constructor parameters checking
     
    182183                                   channels = nb_cores )
    183184
    184             archi.addIrq( dstdev = xcu, port = 1, srcdev = dma, channel = 0 )
    185             archi.addIrq( dstdev = xcu, port = 2, srcdev = dma, channel = 1 )
    186             archi.addIrq( dstdev = xcu, port = 3, srcdev = dma, channel = 2 )
    187             archi.addIrq( dstdev = xcu, port = 4, srcdev = dma, channel = 3 )
     185            for i in xrange( nb_cores ):
     186                archi.addIrq( dstdev = xcu, port = i+1 , srcdev = dma, channel = i )
    188187
    189188            # define external devices
     
    244243                archi.addIrq( dstdev = pic, port = 23, srcdev = tty, channel = 7 , is_rx = True )
    245244
     245                archi.addIrq( dstdev = pic, port = 24, srcdev = tty, channel = 0 , is_rx = False )
     246                archi.addIrq( dstdev = pic, port = 25, srcdev = tty, channel = 1 , is_rx = False )
     247                archi.addIrq( dstdev = pic, port = 26, srcdev = tty, channel = 2 , is_rx = False )
     248                archi.addIrq( dstdev = pic, port = 27, srcdev = tty, channel = 3 , is_rx = False )
     249                archi.addIrq( dstdev = pic, port = 28, srcdev = tty, channel = 4 , is_rx = False )
     250                archi.addIrq( dstdev = pic, port = 29, srcdev = tty, channel = 5 , is_rx = False )
     251                archi.addIrq( dstdev = pic, port = 30, srcdev = tty, channel = 6 , is_rx = False )
     252                archi.addIrq( dstdev = pic, port = 31, srcdev = tty, channel = 7 , is_rx = False )
     253
    246254            # define cores
    247255            for p in xrange ( nb_cores ):
  • trunk/platforms/tsar_generic_iob/top.cpp

    r1051 r1053  
    1111// - BROM : boot ROM
    1212// - FBUF : Frame Buffer
    13 // - MTTY : multi TTY (one channel)
     13// - MTTY : multi TTY (up to 8 channels)
    1414// - MNIC : Network controller (up to 4 channels)
    1515// - DISK : Block device controler (BDV / HBA / SDC)
     
    4444// - IOPIC HWI[7:4]     connected to IRQ_NIC_TX[3:0]
    4545// - IOPIC HWI[12]      connected to IRQ_IOC
    46 // - IOPIC HWI[31:16]   connected to IRQ_TTY_RX[15:0]
     46// - IOPIC HWI[23:16]   connected to IRQ_TTY_RX[7:0]
     47// - IOPIC HWI[31:24]   connected to IRQ_TTY_TX[7:0]
    4748//
    4849// Each cluster contains the following component:
     
    135136#include "tsar_iob_cluster.h"
    136137#include "vci_chbuf_dma.h"
    137 #include "vci_multi_tty.h"
     138#include "vci_tty_tsar.h"
    138139#include "vci_master_nic.h"
    139140#include "vci_simple_rom.h"
     
    460461   "Error in tsar_generic_iob : ICU_NB_OUT cannot be smaller than 4*NB_PROCS_MAX" );
    461462   
    462    assert( (NB_TXT_CHANNELS >= 1) and (NB_TXT_CHANNELS <= 16) and
     463   assert( (NB_TXT_CHANNELS >= 1) and (NB_TXT_CHANNELS <= 8) and
    463464   "Error in tsar_generic_iob : NB_TXT_CHANNELS parameter cannot be larger than 16" );
    464465
     
    821822    sc_signal<bool>                   signal_irq_disk;
    822823    sc_signal<bool>                   signal_irq_mtty_rx[NB_TXT_CHANNELS];
     824    sc_signal<bool>                   signal_irq_mtty_tx[NB_TXT_CHANNELS];
    823825    sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
    824826    sc_signal<bool>                   signal_irq_mnic_tx[NB_NIC_CHANNELS];
     
    10721074#endif
    10731075
    1074     // Multi-TTY controller
     1076    // TTY controller
    10751077    std::vector<std::string> vect_names;
    10761078    for( size_t tid = 0 ; tid < NB_TXT_CHANNELS ; tid++ )
     
    10801082 
    10811083         vect_names.push_back(term_name.str().c_str());
    1082       }
    1083       VciMultiTty<vci_param_ext>*  mtty;
    1084       mtty = new VciMultiTty<vci_param_ext>( "mtty",
    1085                                              IntTab(0, IOX_MTTY_TGT_ID),
    1086                                              maptab_iox,
    1087                                              vect_names);
     1084    }
     1085    VciTtyTsar<vci_param_ext>*  mtty;
     1086    mtty = new VciTtyTsar<vci_param_ext>( "mtty",
     1087                                          IntTab(0, IOX_MTTY_TGT_ID),
     1088                                          maptab_iox,
     1089                                          vect_names);
    10881090
    10891091    // IOPIC
     
    13351337    for ( size_t i=0 ; i<NB_TXT_CHANNELS ; i++ )
    13361338    {
    1337         mtty->p_irq[i]                                   (signal_irq_mtty_rx[i]);
     1339        mtty->p_irq_rx[i]                                (signal_irq_mtty_rx[i]);
     1340        mtty->p_irq_tx[i]                                (signal_irq_mtty_tx[i]);
    13381341    }
    13391342    std::cout << "  - MTTY connected" << std::endl;
     
    13531356       else if(i < 16)                 iopi->p_hwi[i] (signal_irq_false);
    13541357       else if(i < 16+NB_TXT_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]);
     1358       else if(i < 24)                 iopi->p_hwi[i] (signal_irq_false);
     1359       else if(i < 24+NB_TXT_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_tx[i-24]);
    13551360       else                            iopi->p_hwi[i] (signal_irq_false);
    13561361    }
     
    16511656
    16521657        // Monitor a specific address for one L1 cache
    1653         // clusters[0][0]->proc[0]->cache_monitor(0x800080ULL);
     1658        // clusters[0][0]->proc[0]->cache_monitor( 0x00032D74ULL );
    16541659
    16551660        // Monitor a specific address for one L2 cache (single word if second argument true)
    1656         // clusters[0][0]->memc->cache_monitor( 0x00007000ULL, false  );
     1661        // clusters[0][0]->memc->cache_monitor( 0x00032D74ULL, false  );
    16571662
    16581663        // Monitor a specific address for one XRAM
    1659         // clusters[0][0]->xram->start_monitor( 0x00007000ULL , 64);
     1664        // clusters[0][0]->xram->start_monitor( 0x0008A000ULL , 64);
    16601665
    16611666        if ( debug_ok and (n > debug_from) )
     
    16711676                size_t x          = cluster_xy >> 4;
    16721677                size_t y          = cluster_xy & 0xF;
    1673 
     1678/*
     1679            size_t l          = 0;
     1680            size_t x          = 0;
     1681            size_t y;
     1682           
     1683            for( y = 0 ; y < 2 ; y++ )
     1684            {
     1685*/
    16741686                clusters[x][y]->proc[l]->print_trace(0x1);
    16751687                std::ostringstream proc_signame;
     
    17481760//              signal_vci_tgt_brom.print_trace("[SIG]BROM_TGT");
    17491761
    1750 //              mtty->print_trace();
    1751 //              signal_vci_tgt_mtty.print_trace("[SIG]MTTY_TGT");
     1762                mtty->print_trace( 1 );
     1763                signal_vci_tgt_mtty.print_trace("[SIG]MTTY_TGT");
    17521764
    17531765//              disk->print_trace();
     
    17591771#endif
    17601772
    1761                 mnic->print_trace( 0 );
    1762                 signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT");
    1763                 signal_vci_ini_mnic.print_trace("[SIG]MNIC_INI");
     1773//              mnic->print_trace( 0 );
     1774//              signal_vci_tgt_mnic.print_trace("[SIG]MNIC_TGT");
     1775//              signal_vci_ini_mnic.print_trace("[SIG]MNIC_INI");
    17641776
    17651777//              fbuf->print_trace();
    17661778//              signal_vci_tgt_fbuf.print_trace("[SIG]FBUF_TGT");
    17671779
    1768 //              iopi->print_trace();
    1769 //              signal_vci_ini_iopi.print_trace("[SIG]IOPI_INI");
    1770 //              signal_vci_tgt_iopi.print_trace("[SIG]IOPI_TGT");
     1780                iopi->print_trace();
     1781                signal_vci_ini_iopi.print_trace("[SIG]IOPI_INI");
     1782                signal_vci_tgt_iopi.print_trace("[SIG]IOPI_TGT");
    17711783
    17721784//              iox_network->print_trace();
     
    17761788                std::cout << "### IRQ_DISK ACTIVE" << std::endl;
    17771789
    1778                 if ( signal_irq_mtty_rx[0].read() )
    1779                 std::cout << "### IRQ_MTTY_RX[0] ACTIVE" << std::endl;
    1780 
    1781                 if ( signal_irq_mnic_rx[0].read() )
    1782                 std::cout << "### IRQ_MNIC_RX[0] ACTIVE" << std::endl;
    1783 
    1784                 if ( signal_irq_mnic_tx[0].read() )
    1785                 std::cout << "### IRQ_MNIC_TX[0] ACTIVE" << std::endl;
     1790                for( size_t k = 0 ; k < NB_TXT_CHANNELS ; k++ )
     1791                {
     1792                    if ( signal_irq_mtty_rx[k].read() )
     1793                    std::cout << "### IRQ_MTTY_RX[" << k << "] ACTIVE" << std::endl;
     1794
     1795                    if ( signal_irq_mtty_tx[k].read() )
     1796                    std::cout << "### IRQ_MTTY_TX[" << k << "] ACTIVE" << std::endl;
     1797                }
     1798
     1799                for( size_t k = 0 ; k < NB_NIC_CHANNELS ; k++ )
     1800                {
     1801                    if ( signal_irq_mnic_rx[k].read() )
     1802                    std::cout << "### IRQ_MNIC_RX[" << k << "] ACTIVE" << std::endl;
     1803
     1804                    if ( signal_irq_mnic_tx[k].read() )
     1805                    std::cout << "### IRQ_MNIC_TX[" << k << "] ACTIVE" << std::endl;
     1806                }
    17861807            }
    17871808        }
  • trunk/platforms/tsar_generic_iob/top.desc

    r1050 r1053  
    6969
    7070            # TTY
    71             Uses('caba:vci_multi_tty',
     71            Uses('caba:vci_tty_tsar',
    7272                  cell_size = vci_cell_size_ext),
    7373
Note: See TracChangeset for help on using the changeset viewer.